define* call per resource. The CLI (cargo-ai) deploys that folder declaratively, so your connectors, data models, tools, agents, and plays are versioned, diffable, and reproducible.
A workspace at a glance
Each resource type has a home. Thefull starter template lays out the whole surface:
The files are the interface
Importing a.ts file is registration. There is no central manifest to keep in sync: each define* call registers a resource as a side effect, and you wire resources together by passing one resource’s handle into another.
tools/enrich.ts
enricher handle into uses is what creates the dependency edge — the dependency graph is just your variable graph. Cargo deploys the agent first and injects its real uuid into the tool.
Deploy declaratively
The CLI reconciles your code against the live workspace.plan is offline; deploy creates or updates only what changed and records the result in cargo.state.json.
What to read next
Quickstart
Install, authenticate, and deploy your first tool in a few minutes.
Project layout
The folder-per-resource convention, the loader, and state hygiene.
Connectors
defineConnector — link CRMs, warehouses, enrichment, and AI providers.Workflows
defineWorkflow — the TypeScript DSL that backs tools and plays.Agents
defineAgent — LLM workers with tools, models, and sub-agents.CLI
Day-to-day operations: run tools, trigger plays, query data.

