af-component-agent
Homepage · Documentation · Support
The agent component
The agent template provides a set of utilities for constructing a single or multi-agent workflow using frameworks such as Nvidia NAT, CrewAI, LangGraph, LlamaIndex, and others. It's designed to be flexible and extensible, allowing you to create a wide range of agent-based applications on DataRobot.
This component is part of the DataRobot App Framework, a modular system for building and deploying DataRobot-integrated applications. The repo ships agentic workflow templates for multiple frameworks, a CLI harness for local testing, and Pulumi-based infrastructure for end-to-end deployment. It targets app developers and platform engineers who want to add agentic AI capabilities to their DataRobot projects.
- Prerequisites
- Quick start
- Component dependencies
- Authentication and configuration
- Local development
- Updating
- Deployment
- Troubleshooting
- Next steps and cross-links
- Contributing, changelog, support, and legal
The following tools are required before applying this component.
- Python 3.11+
uvanduvxinstalled.drinstalled.- A DataRobot account with API access and a valid API token.
Run the following command in your project directory:
dr component add https://github.com/datarobot-community/af-component-agent .If you need additional control, you can run this to use copier directly:
uvx copier copy datarobot-community/af-component-agent .The wizard prompts you for your agent name, framework choice (base, crewai, langgraph, llamaindex, or nat), and other configuration options. After the wizard completes, your project directory contains the agent template files ready for customization and deployment.
The following components must be applied to the project before this component:
| Name | Repository | Repeatable |
|---|---|---|
base |
https://github.com/datarobot-community/af-component-base | No |
llm |
https://github.com/datarobot-community/af-component-llm | Yes |
mcp |
https://github.com/datarobot-community/af-component-datarobot-mcp | Yes |
Set the following environment variables before running or deploying the agent:
export DATAROBOT_ENDPOINT=https://app.datarobot.com/api/v2
export DATAROBOT_API_TOKEN=YOUR_API_TOKENYou can also place these in a .env file at the root of your project instead of exporting them in your shell.
The component ships a Taskfile with targets for running tests and linters locally.
To run tests and linters across all agent frameworks:
task testTo test an individual framework:
task test-AGENT_FRAMEWORKTo test the CLI on the base agent:
task test-cli
task test-cli-jsonThese targets mirror the checks run in CI when you open a pull request. Results are also visible in the GitHub Actions panel on the PR.
For full details on directory layout, hot paths, and service-by-service workflows, see the development documentation.
All components should be regularly updated to pick up bug fixes, new features, and compatibility with the latest DataRobot App Framework.
For automatic updates to the latest version, run the following command in your project directory:
dr component update .datarobot/answers/agent-AGENT_APP_NAME.ymlIf you need more fine-grained control and prefer using copier directly, you can run this to have more control over the process:
uvx copier update -a .datarobot/answers/agent-AGENT_APP_NAME.yml -AThe component includes an optional end-to-end test that exercises a full lifecycle: render → build → deploy → test → destroy.
Set DATAROBOT_ENDPOINT and DATAROBOT_API_TOKEN as environment variables or in a local .env file, then run:
task test-e2eNotes:
- By default the E2E test runs for all agent frameworks (
base,crewai,langgraph,llamaindex,nat). - To run a subset, set the
E2E_AGENT_FRAMEWORKSvariable, for exampleE2E_AGENT_FRAMEWORKS=base,nat task test-e2e. - The test uses a local Pulumi backend and a unique stack name per run, then cleans up after itself.
If the component fails to apply or your agent does not start, check the following common issues first.
uvxordrcommand not found—ensure both tools are installed and on yourPATH. Runuv --versionanddr --versionto confirm.- Authentication errors at startup—verify that
DATAROBOT_ENDPOINTandDATAROBOT_API_TOKENare set correctly and that the token has the required permissions. - Framework import errors—some frameworks have optional heavy dependencies. Run
task test-AGENT_FRAMEWORKto isolate the failing framework and check its dependency group inpyproject.toml. - E2E test failures—confirm that your DataRobot account has access to the deployment target and that the Pulumi local backend is writable.
For additional help:
- See the agent documentation for your chosen framework.
- Contact DataRobot support.
- Open an issue on the GitHub repository.
After applying the component and verifying local tests pass, explore these resources to go further.
- Customize your workflow by editing the agent template files in
template/for your chosen framework (base,crewai,langgraph,llamaindex, ornat). - If your changes have significant impact on template installation or user experience, open a branch in recipe-datarobot-agent-templates to validate end-to-end before merging.
- After merging a pull request, create a new release in this repository to bump the component version—required for
dr component updateand downstream repos to pick up your changes. - Browse the DataRobot App Framework documentation for the full component catalog and architecture reference.
See AUTHORS and LICENSE for authorship and licensing information.
Changelog entries are managed via RELEASE.yaml. After merging a pull request, cut a new release to publish the changelog and bump the component version.
To contribute, fork the repository, make your changes on a branch, and open a pull request. Ensure task test passes before submitting. See CONTRIBUTING.md if present for additional guidelines.
For support, see the troubleshooting section above or contact DataRobot.