Skip to main content

Admin Storage

The admin package persists entity blueprints to a StorageDriver, ensuring they survive server restarts. Any storage backend supported by @agentium/core works.

Storage Backends

Data is lost on server restart. Use for development only.

How It Works

The admin layer uses four namespaces to organize data: Each record is stored as a plain JSON object keyed by the entity’s name (or instanceName for toolkit configs). No class instances or functions are persisted — only serializable configuration.
Toolkit configs may contain sensitive values (API keys, tokens). These are stored as-is in the storage driver. Use an encrypted-at-rest storage backend (e.g., PostgreSQL with disk encryption) for production deployments. API responses always mask secret fields.

Hydration Flow

On server startup, call hydrate() to restore entities:
Toolkit configs are hydrated first (so their tools are available), then agents (which may reference those tools), then teams (which reference agents). Entities already in the registry are skipped.

Sharing Storage

The admin storage can use the same StorageDriver instance as your agents’ memory and sessions. Namespaces prevent collisions: