Skip to content

Registry API

All registry endpoints are under the /registry prefix. Authentication is required on all endpoints.

An agentspace is a named container for agents, secrets, and parameters. It maps to a TinyDB-backed local store and can be published to an OCI registry as a versioned artifact.



Retrieve a single agentspace by ID.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Agentspace identifier |

{
"agentspace_id": "default",
"name": "my-agents",
"namespace": "local",
"tag": "latest",
"visibility": "private",
"status": "enabled",
"description": null,
"user_id": null,
"source_repo_id": null,
"on_hold": []
}

| Status | Condition | |---|---| | 404 | Agentspace not found |


Create a new agentspace.

{
"name": "my-agents",
"namespace": "local",
"tag": "latest",
"description": "Production agents",
"visibility": "private",
"status": "enabled",
"user_id": null,
"source_repo_id": null
}

| Field | Type | Required | Description | |---|---|---|---| | name | string | Yes | Agentspace name | | namespace | string | Yes | Namespace (e.g., local, prod) | | tag | string | No | Version tag (default: latest) | | description | string | No | Human-readable description | | visibility | "private" \| "public" | No | Visibility (default: private) | | status | "enabled" \| "disabled" | No | Status (default: enabled) |

The created RepositoryMetadata object.

| Status | Condition | |---|---| | 400 | Agentspace with this name/namespace already exists |

Terminal window
curl -X POST http://localhost:8080/registry/ \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-agents", "namespace": "local", "tag": "latest"}'

Update an existing agentspace.

{
"agentspace_id": "default",
"name": "my-agents-v2",
"description": "Updated description"
}

agentspace_id is required. All other fields are optional — only provided fields are updated.

The updated RepositoryMetadata object.


Delete an agentspace and all its data (agents, secrets, parameters).

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Agentspace to delete |

| Status | Condition | |---|---| | 404 | Agentspace not found |


Query agentspaces by filter.

{
"name": "my-agents",
"namespace": "local",
"status": "enabled"
}

An empty body returns all agentspaces. Supports filtering by name, namespace, tag, user_id, source_repo_id, visibility, and status.

Array of RepositoryMetadata objects.



Create or update an agent configuration.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

The full AssistantConfig JSON document. See Agent Configuration for the complete schema.

{
"assistant_id": "my-agent",
"nickname": "Helper",
"description": "A helpful assistant.",
"response": {
"provider_id": "alquimia",
"config": {
"provider_id": "generative",
"connector": {
"provider_id": "openai",
"model": "gpt-4o-mini",
"api_key": { "$secretRef": "OPENAI_API_KEY" }
}
},
"profile": {
"system_prompt": "You are a helpful assistant.",
"evaluation_strategy": { "evaluation_strategy_id": "one-shoot" }
}
}
}

The validated AssistantConfig object.

| Status | Condition | |---|---| | 400 | Validation error in the agent spec | | 404 | Agentspace not found |

Terminal window
curl -X POST "http://localhost:8080/registry/agent?agentspace_id=default" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d @my-agent.json

Query agents by filter.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

{
"assistant_id": "my-agent",
"nickname": "Helper"
}

An empty body returns all agents. Results are validated AssistantConfig objects.

Array of validated agent configuration objects.


Delete agents matching a filter.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

{
"assistant_id": "my-agent"
}

| Status | Condition | |---|---| | 400 | Empty filter — a non-empty filter is required to prevent accidental bulk deletion | | 404 | Agentspace not found |


Place an agent on hold. Held agents are excluded from runtime inference — requests to a held agent return an error.

| Parameter | Type | Description | |---|---|---| | assistant_id | string | Agent to hold |

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

The updated RepositoryMetadata object.

| Status | Condition | |---|---| | 404 | Agent not found | | 409 | Agent is already on hold |


Remove an agent from hold, allowing it to serve inference requests again.

| Status | Condition | |---|---| | 404 | Agent is not currently on hold |


Secrets are referenced in agent configurations with $secretRef markers and resolved at inference time from the configured backend (environment variables or HashiCorp Vault).


Add a secret to an agentspace.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace | | assistant_id | string | null | Scope the secret to a specific agent (optional) |

{
"secret": {
"key": "OPENAI_API_KEY",
"scope": "global",
"description": "OpenAI API key"
},
"value": "sk-..."
}

| Field | Type | Required | Description | |---|---|---|---| | secret.key | string | Yes | Secret key name | | secret.scope | "global" \| "shared" \| "local" | Yes | Secret scope | | secret.description | string | No | Human-readable description | | value | string | No | The actual secret value (stored in the configured backend) |

The registered Secret object (without the value).

| Status | Condition | |---|---| | 400 | Agentspace has unvalidated agents — run POST /registry/validate first | | 404 | Agentspace not found |


List all secrets in an agentspace.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

[
{ "key": "OPENAI_API_KEY", "scope": "global", "description": "OpenAI API key" }
]

Secret values are never returned — only metadata.


Query secrets by filter.

{
"key": "OPENAI_API_KEY",
"scope": "global"
}

An empty body returns all secrets.


POST /registry/secret/inspect/{assistant_id}

Section titled “POST /registry/secret/inspect/{assistant_id}”

Inspect secrets used by a specific agent and verify they can be resolved.

| Parameter | Type | Description | |---|---|---| | assistant_id | string | Agent to inspect |

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace | | check_resolution | bool | true | Try to resolve each secret against the configured backend |

{
"secrets": [
{ "key": "OPENAI_API_KEY", "scope": "global" }
],
"errors": []
}

errors contains secrets that failed to resolve when check_resolution is true. Use this to verify Vault connectivity and secret availability before publishing.


Delete secrets matching a filter.

{ "key": "OPENAI_API_KEY" }

A non-empty filter is required.


Parameters are typed configuration values that can be injected into agent prompts at runtime.


Add parameter definitions to an agentspace.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace |

The registered ParameterDef object.


Query parameters by filter.

{
"assistant_id": "my-agent",
"key": "language"
}

An empty body returns all parameters.


Delete parameters matching a filter. A non-empty filter is required.


Agent configurations are distributed as OCI artifacts (application/vnd.alquimia.registry.v1). This enables version-controlled, portable agent packages that can be published, pulled, and validated independently of the runtime.


Validate and auto-migrate all agent specs in an agentspace. Runs schema validation on every agent, applies known migration fixes, and removes unused secrets.

Run this before publishing to ensure the agentspace is in a consistent state.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace | | dry_run | bool | false | Preview changes without applying them — no agents are modified, no secrets deleted |

{
"validated": 3,
"errors": [],
"deleted_secrets": []
}

| Field | Type | Description | |---|---|---| | validated | int | Number of agents successfully validated | | errors | GenericError[] | Agents that failed validation with error details | | deleted_secrets | Secret[] | Secrets removed as unused (empty when dry_run=true) |

Terminal window
# Preview what would change
curl -X POST "http://localhost:8080/registry/validate?agentspace_id=default&dry_run=true" \
-H "Authorization: Bearer $API_TOKEN"
# Apply validation and cleanup
curl -X POST "http://localhost:8080/registry/validate?agentspace_id=default" \
-H "Authorization: Bearer $API_TOKEN"

Publish an agentspace to the OCI registry.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Agentspace to publish | | tag | string | null | OCI tag (e.g., v1.0.0) |

{
"description": "Production agents v1.0.0"
}

OCI push result with manifest digest.

| Status | Condition | |---|---| | 400 | Unvalidated agents detected | | 400 | Unused secrets detected | | 404 | Agentspace not found |

Terminal window
curl -X PUT "http://localhost:8080/registry/publish?agentspace_id=default&tag=v1.0.0" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Production release"}'

Pull an agentspace from the OCI registry.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace | | target | string | null | Source OCI repository ID (e.g., ghcr.io/myorg/my-agents:v1.0.0) |


Remove a published manifest from the OCI registry.

| Parameter | Type | Default | Description | |---|---|---|---| | agentspace_id | string | "default" | Target agentspace | | tag | string | null | Tag to remove |


List repositories available in the configured OCI registry.

| Parameter | Type | Default | Description | |---|---|---|---| | registry | string | null | OCI registry URL (defaults to ALQUIMIA_OCI_REGISTRY_DEFAULT) |

| Status | Condition | |---|---| | 502 | OCI registry unreachable |


List tags for a specific OCI repository.

| Parameter | Type | Required | Description | |---|---|---|---| | repo_id | string | Yes | Repository identifier |

| Status | Condition | |---|---| | 502 | OCI registry unreachable |