agent
Repository: github.com/datarobot-community/af-component-agent
Adds an agentic workflow to your recipe. The component scaffolds a single-agent or multi-agent system using your choice of framework: CrewAI, LangGraph, LlamaIndex, or NeMo Agent Toolkit (NAT). It includes a local development server, a command-line interface for testing, a test suite, and Pulumi infrastructure for deployment to DataRobot.
This component is repeatable — apply it multiple times with different agent names to run multiple independent agentic workflows from a single recipe.
Prerequisites
- Python 3.11+
uvanduvxinstalleddrinstalled- The base component already applied
- The llm component already applied
- The datarobot-mcp component already applied
Apply
Or with copier directly:
When prompted, choose your agent framework:
| Framework | When to use |
|---|---|
base |
Minimal scaffold — bring your own agentic logic. |
crewai |
Role-based multi-agent crews. |
langgraph |
Graph-based stateful agent workflows. |
llamaindex |
RAG and document-aware agent workflows. |
nat |
YAML-based NeMo Agent Toolkit. |
Component dependencies
| Component | Required |
|---|---|
| base | Yes |
| llm | Yes |
| datarobot-mcp | Yes |
What it adds
agent/
├── agent/myagent.py # Agent workflow — edit this to customize behavior
├── cli.py # Command-line interface for local testing
├── dev.py # Local development server
├── tests/ # Test suite
└── public/ # UI assets
infra/infra/agent.py # Pulumi deployment resources
Configure
The wizard asks for:
- Agent port (default: 8842).
- DataRobot execution environment.
- Execution environment version ID.
- Pulumi passphrase.
- DataRobot default use case (optional).
- LLM Gateway configuration.
Local development
Start the local server:
Run the agent from another terminal:
Testing
Run all tests:
Test a specific framework:
Test the CLI:
Deploy
After deployment, the agent is available in the DataRobot workbench under your use case, accessible via the agent playground or the deployment API endpoint.
Customizing agent behavior
Edit agent/agent/myagent.py to:
- Change agent roles and goals.
- Modify task descriptions.
- Add agents to the crew.
- Integrate MCP tools.
Update
Or with copier directly:
End-to-end test
The component includes a full lifecycle end-to-end test (render → build → deploy → test → destroy):
By default it tests all frameworks. To run a subset:
Troubleshooting
uvx or dr command not found
Ensure both tools are installed and on your PATH. Run uv --version and dr --version to confirm.
Authentication errors at startup
Verify that DATAROBOT_ENDPOINT and DATAROBOT_API_TOKEN are set correctly and that the token has the required permissions.
Framework import errors
Some frameworks have optional heavy dependencies. Run task test-AGENT_FRAMEWORK to isolate the failing framework and check its dependency group in pyproject.toml.
E2E test failures
Confirm that your DataRobot account has access to the deployment target and that the Pulumi local backend is writable.