Skip to main content

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:


Steps

1

Install the CLI

Install the Diagrid Python CLI:

pip install diagrid

Verify the installation:

diagridpy --help
2

Initialize your project

Run diagridpy init with your preferred framework:

diagridpy init my-project --framework dapr-agents

The init command performs 7 steps automatically:

  1. Authenticate with Diagrid Catalyst
  2. Validate LLM API key (OpenAI or Google)
  3. Create a Catalyst project with agent infrastructure
  4. Clone the quickstart template for your chosen framework
  5. Provision a kind cluster (or use existing kubectl context)
  6. Install the dapr-agents Helm chart with your LLM key
  7. Create an App ID for your agent
3

Deploy and trigger

Navigate to your project and deploy:

cd my-project
diagridpy deploy --trigger "Plan a trip to Paris"

The deploy command:

  1. Builds a Docker image from your project
  2. Pushes it to the local kind registry
  3. Deploys the agent as a Kubernetes pod
  4. Connects it to Catalyst via the Dapr sidecar
  5. Triggers the agent with your prompt via POST /agent/run
tip

You can use the --port option to specify a custom port for your agent container (default: 5001).

4

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:

FileDescription
main.pyAgent definition with a sample tool and runner.serve()
requirements.txtPython dependencies for the framework
DockerfileContainer 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 prompt
  • GET /agent/run/{workflow_id} — check workflow status

Next steps