Skip to main content
Resources are the infrastructure components that Pragmatiks manages: storage buckets, AI models, secrets, agents, and more. You declare resources in YAML, and Pragmatiks handles provisioning, state tracking, and lifecycle management.

Resource Structure

Every resource has a consistent structure:

Configuration Example

Here’s an Agno AI model resource:
After provisioning, the resource exposes outputs that other resources can reference:

Resource Lifecycle

Resources move through these states as pragma manages them:
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, Pragmatiks 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-is
  • resolved_config — The fully resolved version where all references have been replaced with actual values from dependency outputs
The 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 already ready and the normalized config matches, Pragmatiks 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, Pragmatiks 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 to failed.

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.
If a resource has multiple owners, it’s only deleted when the last owner is removed.

Resource Tags

Tags are key-value labels for organizing and filtering resources:
Filter resources by tag:
Manage tags on existing resources:

Applying Resources

Create and provision resources immediately:
Create resources in draft state (skip provisioning):

Next Steps

Reactive Dependencies

Automatic change propagation through dependencies.

CLI Resources

Resource management commands.