In this quickstart, you’ll deploy an AI agent powered by Claude. You’ll create four resources that form a dependency chain: a secret stores your API key, a model references the secret, an agent uses the model, and a runner deploys the agent to Kubernetes.
Time estimate: 20 minutes. You’ll need an Anthropic API key and a GCP project.
Four resources, wired together. When you apply them, pragma-os resolves the dependency chain automatically — the secret provisions first, then the model, then the agent, then the runner.
Replace sk-ant-your-key-here with your actual Anthropic API key.
pragma resources apply secret.yaml
2
Create a model
The model resource configures which LLM to use. It references your secret via a field reference — instead of hardcoding the API key, it pulls it from the secret’s outputs.Create model.yaml:
The api_key field uses a field reference: it points to the ANTHROPIC_API_KEY output of the anthropic-key secret. pragma-os resolves this automatically.
pragma resources apply model.yaml
3
Create an agent
The agent resource defines the AI agent’s behavior. It references the model as a dependency — a link to the entire resource, not just one field.Create agent.yaml:
agent.yaml
provider: agnoresource: agentname: my-assistantconfig: model: provider: agno resource: models/anthropic name: claude instructions: - "You are a helpful AI assistant." - "Be concise and accurate in your responses." markdown: true
The model field is a dependency: it references the full claude model resource. When the model changes, the agent rebuilds automatically.
pragma resources apply agent.yaml
4
Deploy it
The runner deploys your agent to a Kubernetes cluster. It needs two dependencies: the agent to deploy and a GKE cluster to deploy it on.First, create the cluster. Create cluster.yaml:
Model references the secret via a field reference (field: outputs.ANTHROPIC_API_KEY)
Agent depends on the model (whole-resource dependency)
Runner depends on both the agent and the GKE cluster
pragma-os resolved the entire chain automatically. It figured out the correct order, waited for each resource to become READY before processing its dependents, and wired the values through.If you update the secret with a new API key, pragma-os propagates the change: the model rebuilds with the new key, the agent rebuilds with the updated model, and the runner redeploys.