resources
Register and manage Resources — the reproducible state your agent reaches into during a rollout.
A Resource is a dependency your agent needs to do its job: a Postgres database, a folder of files your tools read, later other shapes. When a rollout runs, your agent sees a Sandbox — a per-rollout reproducible copy of the Resource, so "what were my last five orders" gives the same answer every time.
The resources group lets you register Resources, list them, inspect them, and tear them down. See Resources and sandboxes for the conceptual model and when each Resource type fits.
Supported types
| Type | Mode | What you provide |
|---|---|---|
postgres | n/a | Schema DDL; optional default seed rows. |
file_corpus | local (required) | A folder of files your agent reads. |
More types are on the roadmap. The CLI validates the --type / --mode combination locally before the request lands.
resources list
List Resources in your active organization.
datagen resources list [--type TYPE] [--mode MODE] [--limit N] [--cursor TOKEN]Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--type | string | None | Filter by type (postgres, file_corpus). |
--mode | string | None | Filter by mode (e.g. local). |
--limit | integer | 20 | Maximum number of Resources to return. |
--cursor | string | None | Pagination cursor, printed by the previous page. |
--format | text|json | text | Output format. |
Example
$ datagen resources list --type postgres
Resources
┃ ID ┃ Name ┃ Type ┃ Mode ┃ Description ┃
│ res_8kz23a │ prod-catalog-ro │ postgres │ - │ Product catalog │
│ res_1jm4qw │ support-tickets │ postgres │ - │ Ticket history │resources get
Fetch one Resource by ID, including its schema and default seed.
datagen resources get <resource_id>Arguments
| Argument | Description |
|---|---|
resource_id | Resource ID returned by create or list. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--format | text|json | text | Output format. |
resources create
Register a new Resource.
datagen resources create \
--name "<name>" \
--type <postgres|file_corpus> \
[--mode <mode>] \
[--schema "<json-or-path>"] \
[--default-seed "<json-or-path>"] \
[--metadata "<json-or-path>"] \
[--description "<text>"]Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | (required) | Human-readable name. |
--type | string | (required) | postgres or file_corpus. |
--mode | string | None | Required for file_corpus (local); must be omitted for postgres. |
--schema | JSON or path | {} | Inline JSON or path to a JSON file describing the Resource schema (e.g. DDL metadata for Postgres). |
--default-seed | JSON or path | {} | Inline JSON or path to seed data applied to every Sandbox unless overridden. |
--metadata | JSON or path | {} | Inline JSON or path for free-form metadata. |
--description | string | None | Short description. |
--format | text|json | text | Output format. |
Any flag that accepts JSON will treat its value as a file path if the file exists, otherwise as an inline JSON string. Values must parse to JSON objects (not arrays or scalars).
Example
$ datagen resources create \
--name "prod-catalog-ro" \
--type postgres \
--schema ./schemas/catalog.json \
--default-seed ./seeds/catalog-demo.json \
--description "Product catalog, read-only mirror of prod."
resource_id: res_8kz23a
name: prod-catalog-ro
type: postgresresources delete
Delete a Resource. Running datasets that reference it may be affected — the CLI prompts for confirmation unless --yes is set.
datagen resources delete <resource_id> [--yes]Arguments
| Argument | Description |
|---|---|
resource_id | Resource ID to delete. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--yes, -y | flag | off | Skip the confirmation prompt. |
--format | text|json | text | Output format. |
Example
$ datagen resources delete res_8kz23a -y
Deleted resource res_8kz23a.resources templates
List built-in Resource templates. A template is a ready-made Resource shape — schemas, seed data, sensible defaults — you can materialize into a concrete Resource in one step.
datagen resources templatesFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--format | text|json | text | Output format. |
Example
$ datagen resources templates
Resource Templates
┃ Template ┃ Name ┃ Type ┃ Mode ┃ Description ┃
│ postgres-ecomm │ E-commerce │ postgres │ - │ Orders, SKUs, customers │
│ files-rag │ RAG corpus │ file_... │ local │ Markdown + PDF starter │resources materialize
Instantiate a template into a real Resource. Useful for quickly spinning up a realistic Resource for a first dataset before plumbing your own.
datagen resources materialize <template_name> [--name NAME] [--default-seed JSON] [--metadata JSON]Arguments
| Argument | Description |
|---|---|
template_name | Template name from resources templates. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--name | string | template default | Override the resulting Resource name. |
--default-seed | JSON or path | template default | Override seed data. |
--metadata | JSON or path | template default | Override metadata. |
--format | text|json | text | Output format. |
Example
$ datagen resources materialize postgres-ecomm --name "my-ecomm-sandbox"
resource_id: res_1jm4qw
name: my-ecomm-sandbox
type: postgresOnce the Resource exists, any dataset brief that needs it will bind to it automatically. See Resources and sandboxes for the full model.