Skip to content

CLI reference

The alquimia CLI is the primary way to manage agentspaces, agent specs, tools, models, topics, files, secrets, and OCI artifacts from the terminal.

All commands respect these environment variables and options:

VariableDefaultDescription
ALQUIMIA_REGISTRY_DIR—Root directory for local TinyDB registries
ALQUIMIA_OCI_SUBPROCESS_TIMEOUT120Ceiling (seconds) on any single oras/cosign invocation
--namespace / -ndefaultAgentspace to operate on
--fields / -fallComma-separated field list for list commands
--debugfalseEnable verbose logging
CommandDescription
alquimia registry ...Manage agentspaces and their contents
alquimia explore ...List repositories and tags in a remote OCI registry
alquimia local ...Run local chat sessions and inspect history
alquimia code ...Alquimia Code TUI (when available)
CommandDescription
alquimia registry createCreate a new agentspace
alquimia registry updateUpdate agentspace metadata
alquimia registry listList local agentspaces
alquimia registry inspectShow agentspace metadata
alquimia registry destroyDelete an agentspace and all contents
alquimia registry publishPush an agentspace to OCI
alquimia registry promoteCopy an already-published OCI artifact to another target
alquimia registry unpublishRemove an OCI manifest
alquimia registry pullPull an agentspace from OCI and overwrite local dist.json
alquimia registry fetch [--target <repo_id>] [--tag <tag>] [--no-cache]Pull from OCI; without --tag overwrites dist.json, with --tag caches a versioned snapshot
alquimia registry versionsList cached versioned snapshots
alquimia registry flush-version <tag>Remove a cached versioned snapshot and purge tag-scoped blob IDs
alquimia registry index ensureCreate the namespace index anchor
alquimia registry index statusShow index health and unhealed publish errors
alquimia registry index reindexRe-attach index entries for locally known publishes
alquimia registry index pruneDetach index entries whose artifact is gone
alquimia registry index migrateMove an artifact into the deployment-owned namespace path
alquimia registry set-identityDefault actor and assisting parties for Boltzmann brains (Gaussia)
alquimia registry set-authenticityDefault pull authenticity policy for Boltzmann brains (Gaussia)
Terminal window
alquimia registry create \
--name production \
--tag latest \
--user-id alice \
--description "Production support agents"

registry create accepts --name, --tag, --user-id, --description, --source-repo-id, and --egress-allowlist (comma-separated allowed hosts).

Terminal window
alquimia registry update --namespace production \
--tag v1.2.0 \
--description "Production support agents"

registry update changes only the fields you pass. Missing options leave the existing value unchanged. It accepts --tag, --user-id, --description, --visibility, --status, --source-repo-id, and --egress-allowlist. Use --clear-description, --clear-source-repo-id, or --clear-egress-allowlist to remove those values. The agentspace name is not editable because it forms the published OCI path.

Terminal window
# Publish the whole agentspace to its canonical deployment path
alquimia registry publish --namespace production --tag v1.2.0
# Publish to an alternate target repository
alquimia registry publish --namespace production --target oci.example.com/agents/production
# Publish only a subset of agents and the resources they reach
alquimia registry publish --namespace production \
--include-agents onboarder,closer \
--exclude-agents deprecated-bot
# Also push secret metadata (not values) as a private layer
alquimia registry publish --namespace production --include-secrets

Publish supports:

FlagDescription
--tagOCI tag to publish under (defaults to the agentspace’s current tag).
--targetOverride the target OCI repository. Must include a repository name.
--include-agentsComma-separated assistant_ids to include. Only those agents and the tools, topics, files, models, Boltzmann brains, parameters, and secrets reachable from them are published.
--exclude-agentsComma-separated assistant_ids to exclude (applied after --include-agents).
--include-secretsAlso push secret metadata (not values) as a private layer
--forceTake over a tag published by a different author

When --include-agents or --exclude-agents is used, the publish is filtered to the selected agents and their transitive resources. The unused-secret guard is skipped during subset publishes so that intentionally omitted agents do not trigger false positives.

Copy an already-published artifact to another target without re-pushing from the local workspace. This avoids the bug fixed in 0.7.0 where external publish targets could overwrite the local version pointer or hydrate from the wrong registry.

Terminal window
# Copy the production tag to a staging OCI repository
alquimia registry promote \
--namespace production \
--tag v1.2.0 \
--target ghcr.io/acme/agents/staging
# Promote to an external registry, authorizing through the registry ACL
alquimia registry promote \
--namespace production \
--tag v1.2.0 \
--target oci.external.com/acme/agents/production \
--registry-auth external-registry

registry promote accepts the same --target, --tag, and --force flags as publish. The source digest is read from the namespace index, so the artifact must already have been published.

alquimia registry unpublish --namespace production --tag v1.2.0 accepts --target to remove a manifest from a specific repository. It also deletes the associated cosign .sig and .att tags so republishes do not leave orphan signature material behind.

Terminal window
# Remove a published manifest from the canonical path
alquimia registry unpublish --namespace production --tag v1.2.0
# Remove from an alternate target repository
alquimia registry unpublish --namespace production --tag v1.2.0 \
--target oci.example.com/agents/production
Terminal window
alquimia registry index ensure
alquimia registry index status
alquimia registry index reindex --namespace production --dry-run
alquimia registry index prune --dry-run
alquimia registry index migrate -n production

registry index reindex prints a summary of repositories visited, namespace-filter mismatches, and Boltzmann-brain namespace mismatches. Agentspace load failures are logged and cause the command to exit non-zero.

CommandDescription
alquimia registry agents add <path>Import an agent from JSON
alquimia registry agents listList agents
alquimia registry agents inspect <assistant_id>Show full spec
Terminal window
alquimia registry agents add support-bot.json --namespace default
alquimia registry agents inspect support-bot --namespace default
CommandDescription
alquimia registry secrets add <key>Register a secret definition
alquimia registry secrets put <key> <value>Store a value in the resolver
alquimia registry secrets get <key>Show the resolved value
alquimia registry secrets listList secret definitions
alquimia registry secrets requirements <assistant_id>List every secret an agent needs, including secrets reached through refs, with resolution status
Terminal window
alquimia registry secrets add RESPONSE_PROVIDER_API_KEY \
--scope shared --required
alquimia registry secrets put RESPONSE_PROVIDER_API_KEY sk-xxx
# Store a per-user value for a user-scoped secret
alquimia registry secrets add RESPONSE_PROVIDER_API_KEY \
--scope shared --user-scoped
alquimia registry secrets put RESPONSE_PROVIDER_API_KEY sk-alice-xxx \
--user-id alice
alquimia registry secrets get RESPONSE_PROVIDER_API_KEY --user-id alice

Secret environment keys use the agentspace name and assistant ID to avoid collisions:

ScopeEnv keyPer-user env key
globalKEYAGENTSPACE_NAME__USER__USER_ID__KEY
sharedAGENTSPACE_NAME__KEYAGENTSPACE_NAME__USER__USER_ID__KEY
localAGENTSPACE_NAME__ASSISTANT_ID__KEYAGENTSPACE_NAME__ASSISTANT_ID__USER__USER_ID__KEY

AGENTSPACE_NAME is normalized for environment variables: uppercased, - and . become _, and a leading digit is prefixed with _. Segments are joined with __ so boundaries cannot collide.

Use --user-scoped when adding a secret to opt into per-user values. For a user-scoped secret, supplying a user_id reads only the per-user value and fails closed if none is set; there is no fallback to the scope default. For a non-user-scoped secret, any user_id is ignored and the scope default is always used. global secrets do not support per-user overrides.

alquimia registry secrets requirements <assistant_id> lists every secret the agent references, including secrets reached only through model_ref, shield_ref, audio_ref, and tool_ref. Each key is reported with its resolution status so missing secrets can be caught before runtime.

Terminal window
alquimia registry secrets requirements support-bot --namespace default

The command mirrors the POST /registry/secret/requirements/{assistant_id} endpoint.

CommandDescription
alquimia registry parameters add <key>Register a parameter
alquimia registry parameters listList parameters
Terminal window
alquimia registry parameters add SUPPORT_TIER \
--default L1 --assistant-id support-bot \
--description "Support escalation tier"
CommandDescription
alquimia registry tools add <registered_tool_id>Register a tool connection
alquimia registry tools listList tool registrations
alquimia registry tools inspect <registered_tool_id>Show registration
alquimia registry tools set-operation <tool_id> <name>Classify one operation
Terminal window
alquimia registry tools add filesystem-tools \
--provider-id mcp \
--connection-config '{"url": {"$secretRef": "MCP_PROVIDER_URL"}}'
alquimia registry tools set-operation filesystem-tools "delete_*" \
--match glob \
--severity destructive \
--tier-grants operator \
--approval-required

A ToolRegistration JSON file includes registered_tool_id, provider_id (mcp, llama-stack, a2a, or client), connection_config, and operations. Optional fields include name, description, tags, and a shields map for content shields on tool outputs. For provider_id: "client", pass --tool-schemas with a JSON array of tool definitions instead of a connection config.

CommandDescription
alquimia registry shields add <registered_shield_id>Register a reusable shield connector
alquimia registry shields set <registered_shield_id>Update a shield registration
alquimia registry shields listList shield registrations
alquimia registry shields inspect <registered_shield_id>Show a shield registration
alquimia registry shields delete <registered_shield_id>Remove a shield registration
Terminal window
alquimia registry shields add toxicity-classifier \
--connector '{"provider_id":"huggingface/text-classification","url":"https://your-hf-endpoint.com","label_map":{"LABEL_0":"safe","LABEL_1":"toxic"}}' \
--namespace default
alquimia registry shields set toxicity-classifier \
--description "Shared toxicity endpoint" \
--tags safety,production \
--namespace default
alquimia registry shields inspect toxicity-classifier --namespace default

registry shields set changes only the options you pass; omitting --connector keeps the existing connector. Use --clear-description or --clear-tags to remove those fields.

A ShieldRegistration contains registered_shield_id, connector, and optional name, description, and tags. Reference a registered shield from an agent spec with shield_ref inside a shield-config wrapper.

CommandDescription
alquimia registry models add <path>Register a reusable model from JSON
alquimia registry models listList model registrations
Terminal window
alquimia registry models add gpt-4o-mini.json --namespace default

A model registration JSON file includes registered_model_id, provider_id, params, and optionally name, vendor, description, tags, and attribution_id:

{
"registered_model_id": "gpt-4o-mini",
"provider_id": "openai-compatible",
"name": "GPT-4o mini",
"vendor": "openai",
"params": {
"model": "gpt-4o-mini",
"temperature": 0.0,
"api_key": { "$secretRef": "RESPONSE_PROVIDER_API_KEY" }
},
"attribution_id": "openai/gpt-4o-mini"
}

attribution_id is how provenance names the model when it proposes knowledge (for example, in ingest). It defaults to <provider_id>/<params.model> when that is a usable identifier.

CommandDescription
alquimia registry topics add <topic_id>Register a knowledge topic
alquimia registry topics listList topics
alquimia registry topics inspect <topic_id>Show topic registration
alquimia registry topics set-policy <topic_id>Update access policy
alquimia registry topics add-file <topic_id>Upload and index a file
alquimia registry topics remove-file <topic_id> <file_id>Remove a file
alquimia registry topics rebuild <topic_id>Re-index all files
alquimia registry files listList file registrations
alquimia registry files inspect <file_id>Show file metadata
alquimia registry files read <file_id>Download bytes
alquimia registry files set-policy <file_id>Set or clear a file-level access policy
Terminal window
alquimia registry topics add product-docs \
--severity read-only \
--tier-grants reader,editor,operator \
--retrieval hybrid
alquimia registry topics add-file product-docs release-notes.pdf \
--hydrate

Registering a topic creates its vector collection up front by default (ensure_collection=True). Use --retrieval hybrid when adding a topic to enable dense + sparse retrieval; alquimia registry topics rebuild can switch an existing topic between dense and hybrid. alquimia registry topics add-file reports the chunk count and tells you when the uploaded blob was deduplicated, and it accepts --severity, --tier-grants, and --approval-required to set a layered FileAccessPolicy. alquimia registry topics rebuild shows each file’s name next to its registered_file_id.

CommandDescription
alquimia explore reposList repositories in a remote OCI registry
alquimia explore tags <repo_id>List tags for a repository
alquimia registry explore catalog [--kind agentspace|boltzmann-brain]List published artifacts from the namespace index
alquimia registry explore entry <repo>:<tag>Show a single index entry
Terminal window
alquimia explore repos --registry ghcr.io/acme
alquimia explore tags ghcr.io/acme/agents/production
alquimia registry explore catalog --registry ghcr.io/acme --kind agentspace
alquimia registry explore entry ghcr.io/acme/agents/production:v1.2.0

Index discovery uses a byte-stable anchor. explore catalog filters by --kind before applying the cursor, tag fallback is limited to namespaces that have not been indexed, explore tags paginates over manifests instead of fetching every manifest at once, and detaching an index entry removes orphan cosign .sig and .att tags from the anchor repository.

Run one-off or interactive chat sessions with agents from the local registry. Available only when the local-chat extra is installed. chat and exec accept a versioned reference so you can run a specific OCI tag without changing the workspace dist.json.

CommandDescription
alquimia local chat <agentspace>/<assistant>[:<tag>]Start an interactive session
alquimia local exec <agentspace>/<assistant>[:<tag>] <query>Single-turn inference
alquimia local run <assistant_id> <query>Single-turn inference against the local workspace
alquimia local sessionsList local sessions
Terminal window
# Chat against the local workspace
alquimia local chat default/support-bot --mcp-servers mcp.json
# Run a specific OCI-tagged version without mutating dist.json
alquimia local exec production/support-bot:v1.2.0 "What is the refund policy?"
alquimia local exec production/support-bot:v1.2.0 "What is the refund policy?" --no-cache
alquimia local chat production/support-bot:v1.2.0 --no-cache

Promote an agentspace from staging to production

Section titled “Promote an agentspace from staging to production”
Terminal window
alquimia registry publish --namespace staging --tag v1.0.0
alquimia registry fetch --namespace production \
--target ghcr.io/acme/agents/staging --tag v1.0.0
alquimia registry topics rebuild product-docs --namespace production

Run a versioned agentspace without changing the workspace

Section titled “Run a versioned agentspace without changing the workspace”
Terminal window
# Pull an OCI tag into a cached versioned snapshot
alquimia registry fetch --namespace myspace --tag v1.2.0
# Force a fresh pull from OCI
alquimia registry fetch --namespace myspace --tag v1.2.0 --no-cache
# List cached snapshots
alquimia registry versions --namespace myspace
# Run an agent from a snapshot
alquimia local exec myspace/support-bot:v1.2.0 "What is the refund policy?"
# Remove a cached snapshot
alquimia registry flush-version --namespace myspace v1.2.0

flush-version purges the tag-scoped blob IDs recorded during the pull, so version blobs are cleaned up even when no <tag>.json cache exists on disk.

Terminal window
alquimia registry tools inspect filesystem-tools --for-tool "delete_file"
alquimia registry tools set-operation filesystem-tools "delete_*" \
--match glob --severity destructive --tier-grants operator
Terminal window
cat > gpt-4o-mini.json <<'EOF'
{
"registered_model_id": "gpt-4o-mini",
"provider_id": "openai",
"name": "GPT-4o mini",
"vendor": "openai",
"attribution_id": "openai/gpt-4o-mini",
"params": {"model": "gpt-4o-mini", "temperature": 0.0}
}
EOF
alquimia registry models add gpt-4o-mini.json --namespace default
# Then reference `model_ref: gpt-4o-mini` in the agent spec

Every command and subcommand supports --help:

Terminal window
alquimia --help
alquimia registry tools set-operation --help
alquimia registry topics add-file --help