Quickstart: diagridpy CLI
Initialize and deploy a durable agent to Catalyst in minutes using the diagridpy CLI. Choose your preferred agent framework — the CLI handles project scaffolding, Kubernetes provisioning, and deployment.
Prerequisites
Before you begin, ensure you have:
- Python 3.11+
- Docker
- kind (for local Kubernetes)
- An LLM API key (OpenAI or Google depending on framework)
Steps
Install the CLI
Install the Diagrid Python CLI:
pip install diagrid
Verify the installation:
diagridpy --help
Initialize your project
Run diagridpy init with your preferred framework:
- Dapr Agents
- LangGraph
- Strands
- OpenAI Agents
- CrewAI
- Google ADK
- Pydantic AI
diagridpy init my-project --framework dapr-agents
diagridpy init my-project --framework langgraph
diagridpy init my-project --framework strands
diagridpy init my-project --framework openai-agents
diagridpy init my-project --framework crewai
diagridpy init my-project --framework adk
ADK uses GOOGLE_API_KEY instead of OPENAI_API_KEY. Pass it with --google-api-key or set the environment variable.
diagridpy init my-project --framework pydantic-ai
The init command performs 7 steps automatically:
- Authenticate with Diagrid Catalyst
- Validate LLM API key (OpenAI or Google)
- Create a Catalyst project with agent infrastructure
- Clone the quickstart template for your chosen framework
- Provision a kind cluster (or use existing kubectl context)
- Install the dapr-agents Helm chart with your LLM key
- Create an App ID for your agent
Deploy and trigger
Navigate to your project and deploy:
cd my-project
diagridpy deploy --trigger "Plan a trip to Paris"
The deploy command:
- Builds a Docker image from your project
- Pushes it to the local kind registry
- Deploys the agent as a Kubernetes pod
- Connects it to Catalyst via the Dapr sidecar
- Triggers the agent with your prompt via
POST /agent/run
You can use the --port option to specify a custom port for your agent container (default: 5001).
View results
After triggering, the CLI displays the workflow result. You can also check workflow status:
# Check the agent logs
kubectl logs -l app=my-project-agent -f
# Trigger the agent again via curl
curl -X POST http://localhost:5001/agent/run \
-H "Content-Type: application/json" \
-d '{"task": "Find flights to Tokyo"}'
What's in the quickstart template?
Each framework template includes:
| File | Description |
|---|---|
main.py | Agent definition with a sample tool and runner.serve() |
requirements.txt | Python dependencies for the framework |
Dockerfile | Container image build configuration |
The main.py creates a minimal agent with a sample get_weather tool, wraps it in a DaprWorkflowAgentRunner, and starts an HTTP server with runner.serve() that exposes:
POST /agent/run— trigger the agent with a promptGET /agent/run/{workflow_id}— check workflow status
Next steps
- Durable Agent Quickstart — Build a full travel assistant with conversation memory
- CLI Reference: init — All
diagridpy initoptions - CLI Reference: deploy — All
diagridpy deployoptions