**Cargo CDK** is the declarative, infrastructure-as-code layer of 📝Cargo that models a 📝Go-To-Market (GTM) stack the way the AWS CDK models cloud infrastructure — every resource declared in code through a define*() call, with a plan-then-deploy lifecycle, drift detection, and rollback.
A workspace is a directory of TypeScript files where importing a file is registration; there is no manifest file. The builders cover connectors (CRMs, warehouses, enrichment APIs, LLM providers, with secret() for credentials and adopt: true to bind an existing integration), models and relationships (the layer also surfaced as 📝Cargo Object Models), segments, workflows and tools, agents (LLM-backed workers with tools, sub-agents, triggers, and an evaluator), plays (per-row automations that fire as a model changes), folders, a git-synced context layer via defineContext, files, workers and apps for hosted edge functions and single-page UIs, defineMcpServer to expose the stack to 📝Claude or HERMES over MCP, and defineDomain plus defineMailbox for 📝Cargo Mailboxes. Handles returned by one builder are deferred tokens that establish deploy order when passed to another.
The CDK is the declarative counterpart to the imperative 📝Cargo CLI: where the CLI runs one-off commands against a workspace, the CDK captures an entire revenue system as versioned, reviewable code. cargo-ai cdk plan diffs offline against cargo.state.json, deploy applies in dependency order and persists state per resource, refresh reports resources modified or deleted in the UI, import and pull bind live resources into state, and rollback restores the pre-deploy snapshot; the docs now name the lifecycle cargo-ai project. Worked examples install with cargo-ai cdk add cookbook/<name> from a catalog that on 2026-09-15 held account-scoring, agentic-engagement, call-capture, crm-enrichment, and tam-building, and cargo-ai cdk init scaffolds a project from the 📝Cargo Manifest template. It is aimed at GTM engineers who want the reproducibility and change control of software infrastructure applied to their go-to-market operations.
