StorageDriver retains those records across restarts. It does not save active executions, conversation history, harness sessions, or workflow step functions.
Use the SQLite admin walkthrough to verify create → stop → restart → run before integrating another database.
Storage backends
Install matching@agentium/core@4.0.0 and @agentium/admin@4.0.0, plus express for the router. Add the selected database client below. These factories are host integration examples: the caller mounts the returned router, protects operator access, calls hydrate(), and eventually closes the returned storage.
In-memory (development)
hydrate() cannot recover the previous process’s in-memory records.
SQLite
Installbetter-sqlite3@11 and supply a file path on persistent storage.
PostgreSQL
Installpg@8; pass the connection string from your host’s secret configuration.
MongoDB
Installmongodb@6; pass the connection URL your deployment supplies.
storage option. Verify initialization, persistence, and close behavior for the adapter you select.
How it works
Records contain JSON configuration rather than live class instances or functions. An Agent blueprint selects provider/model, instructions, named tools, and supported settings; it is not a serialized copy of every
AgentConfig field. Memory, custom hooks, harness definitions, and executable Workflow graphs need application-owned construction.
Hydration flow
Callhydrate() before accepting operator or run traffic:
Sharing storage
Admin and manually constructed Agents may share a driver. Namespaces separate record categories; they do not authorize tenants or operators. Registering an admin Agent also does not automatically attach the admin driver to that Agent’s memory.createAdminRouter() does not take ownership of shutting down your server, Agents, or storage. See operations.
Sensitive values
Agent/TeamproviderConfig and original toolkit credential values are stored in the backing driver. Public blueprint responses omit providerConfig; toolkit API masking follows catalog fields explicitly marked secret. Masking a response does not encrypt storage or sanitize arbitrary unmarked configuration fields.
Use host-supplied environment credentials where appropriate, restrict database access, and choose encryption/backup handling suitable for the stored values. A toolkit-config update containing masked placeholders preserves existing marked secrets. Enabled toolkit changes affect future tool resolution; existing Agents are not automatically rebuilt.
Verify persistence
- Create an Agent through the operator API and retrieve its blueprint.
- Stop the application and close the driver.
- Restart with the same storage, provider registration, and tool library.
- Hydrate, then check both the saved blueprint and the executable registry entry.
- Exercise a missing-tool/provider case so startup failure is visible.