Skip to content

Registry

The registry is a local-first, OCI-distributable system for managing agent configurations, secrets, and parameters. It is backed by TinyDB for local persistence and ORAS for OCI artifact distribution.

$ALQUIMIA_REGISTRY_DIR/ (default: /tmp/.alquimia)
├── metadata.json # All agentspace metadata
├── <agentspace-id>/
│ └── dist.json # Agents, secrets, parameters (TinyDB)
└── history/ # Persisted local sessions
└── <session-id>
from alquimia.registry.registry import AlquimiaRegistry
registry = AlquimiaRegistry()
registry.load({"agentspace_id": "default"})
# registry.current_agentspace is now set
MethodDescription
create(metadata)Create a new agentspace
load(selector)Load an agentspace by selector
save(data)Update agentspace metadata
destroy()Delete the agentspace and all data
list_repos()List all agentspaces
query_repos(filters)Filter agentspaces by TinyDB predicates
MethodDescription
add_agent(spec)Upsert an agent specification
get_agent(assistant_id)Get a single agent by ID
list_agents()List all agents in the current agentspace
query_agents(selector)Filter agents by TinyDB predicates
delete_agents(filters)Delete agents matching filters
MethodDescription
add_secret(secret)Register a secret definition
list_secrets()List all secrets
query_secrets(filters)Filter secrets
delete_secrets(filters)Delete secrets matching filters
MethodDescription
add_parameters(param_def)Register parameter definitions
list_parameters()List all parameters
query_parameters(filters)Filter parameters
delete_parameters(filters)Delete parameters matching filters
MethodDescription
push(tag, **annotations)Publish agentspace to OCI registry
pull(source_repo_id)Fetch agentspace from OCI registry
delete_manifest(tag)Remove a published manifest

Secrets are referenced in agent specs with $secretRef markers:

{ "api_key": { "$secretRef": "OPENAI_API_KEY" } }
class Secret(BaseModel):
key: str # The secret key name
scope: str # "global", "shared", or "local"
description: str | None = None
ResolverALQUIMIA_REGISTRY_SECRET_RESOLVERBackend
EnvSecretResolverenv (default)Environment variables
VaultSecretResolvervaultHashiCorp Vault KV v2
ScopeKey patternExample
global{KEY}OPENAI_API_KEY
shared{realm}_{KEY}abc123_OPENAI_API_KEY
local{realm}_{assistant_id}_{KEY}abc123_mybot_OPENAI_API_KEY

Agent configurations are distributed as OCI artifacts:

  • Artifact type: application/vnd.alquimia.registry.v1
  • Layer media type: application/vnd.alquimia.registry.dist.v1+json
Terminal window
# Publish
alquimia registry publish --agentspace-id default --tag v1.0.0
# Pull
alquimia registry fetch --agentspace-id default --source ghcr.io/myorg/my-agents:v1.0.0
VariableDefaultDescription
ALQUIMIA_REGISTRY_DIR/tmp/.alquimiaLocal registry storage directory
ALQUIMIA_LOCAL_SESSIONS_DIR$ALQUIMIA_REGISTRY_DIR/historySession persistence directory
ALQUIMIA_REGISTRY_SECRET_RESOLVERenvSecret resolver backend
ALQUIMIA_OCI_REGISTRY_DEFAULTghcr.ioDefault OCI registry
ORAS_PLAIN_HTTPfalseUse plain HTTP for ORAS
ORAS_INSECUREfalseSkip TLS verification
VAULT_ADDRVault server URL
VAULT_TOKENVault authentication token
VAULT_MOUNT_POINTsecretVault KV v2 mount point
  • Alquimia-ai/alquimia-coresrc/alquimia/registry/registry.py, src/alquimia/registry/repo.py, src/alquimia/registry/secret.py