Resource Structure
Every resource has a consistent structure:| Field | Description | Example |
|---|---|---|
provider | The provider that manages this resource | agno |
resource | The type of resource | agent |
name | A unique identifier you assign | my-assistant |
config | Your settings for this resource | model_id: claude-sonnet-4-5-20250929 |
tags | Optional metadata labels | ["env:prod", "team:ml"] |
depends_on | Explicit dependencies (optional) | Other resources |
owner_references | Owner resources for cascade deletion (optional) | Parent resources |
outputs | What it exposes to other resources (set by provider) | URLs, IDs, secrets |
Configuration Example
Here’s an Agno AI model resource:Resource Lifecycle
Resources move through these states as pragma manages them:| State | Description |
|---|---|
draft | Created but not queued for processing (use --draft flag) |
pending | Queued for provider to handle. If dependencies aren’t ready, the resource waits in this state until they are. |
processing | Currently being handled by the provider |
ready | Successfully provisioned and operational |
failed | Processing failed, error recorded |
A resource in
pending state with unready dependencies has no resolved_config — this distinguishes “waiting for dependencies” from “submitted to provider.” Once all dependencies are ready, pragma-os resolves the config and submits the resource for processing.Config vs Resolved Config
Each resource has two config representations:config— Your original declaration, including FieldReferences and Dependency markers as-isresolved_config— The fully resolved version where all references have been replaced with actual values from dependency outputs
resolved_config is what gets sent to the provider. You can inspect both to debug dependency resolution:
Idempotent Apply
Re-applying a resource with identical configuration is a no-op. If the resource is alreadyready and the normalized config matches, pragma-os returns the existing resource without re-processing. This makes it safe to run pragma resources apply repeatedly in scripts and CI/CD pipelines.
Deletion Behavior
When you delete a resource, pragma-os handles its relationships:Soft Detach (Dependencies)
Resources that depend on the deleted resource are detached, not cascade-deleted. The dependency reference is removed from their config, and they are sent back to their provider for update. The provider decides whether the resource can continue without the deleted dependency — if it can’t, the resource transitions tofailed.
Cascade Delete (Owner References)
Resources with owner references follow cascade deletion. When the owner is deleted, all owned resources are deleted too. This is used for subresource patterns where child resources have no meaning without their parent.Resource Tags
Tags are key-value labels for organizing and filtering resources:Applying Resources
Create and provision resources immediately:Next Steps
Reactive Dependencies
Automatic change propagation through dependencies.
CLI Resources
Resource management commands.