Skip to main content
Use @agentium/admin when authorized operators need to create or change Agents and Teams without editing your application code. It resolves named models and tools, stores their blueprints, and creates live instances in core’s registry. @agentium/transport serves those instances to callers. The package also stores workflow metadata, but it does not construct workflow steps or recreate executable Workflows. Define and register those in application code. Admin configuration does not include harness definitions or every AgentConfig option.

Architecture

This is an operator API. Protect it independently of your application’s run endpoints. Transport’s security configuration does not authenticate admin routes or isolate admin configuration by tenant.

Installation

This local walkthrough creates a server, saves one Agent, runs it, and restores its configuration after a restart. Its deterministic provider returns a fixed response; no model key or external service is needed. SQLite writes admin-demo.db in the project directory. Use Node 22.18+ within v22 or 24.11+ within v24:

Quick start (Express)

Save this as server.ts. The demonstration token protects both route groups, and the server binds to loopback. All admitted callers are trusted operators with access to all configured entities; this is not an end-user or multi-tenant API.
Check and start the server:
In another terminal, set the same token and create an Agent:
The first request returns 401; creation returns 201; the run response includes "text":"Your configured Agent is reachable.". Creating support twice returns 409.

Hydration

Press Ctrl+C, restart with the same command and working directory, then list the saved Agent:
You should still see support, and its run endpoint should still work. The fixture provider is registered before hydrate() so stored provider IDs resolve on every startup. Hydration initializes storage, restores enabled toolkits, creates Agents, then creates Teams. Existing registry names are skipped. The returned workflows count measures stored metadata; it does not count newly constructed Workflows. Agent conversation history, in-flight runs, and model responses are not restored by admin hydration. When finished, stop the server before removing its admin-demo.db and any SQLite sidecar files. Keeping the database retains this example’s configuration.

Tool discovery

Pass a named toolLibrary, toolkit instances, or both to createAdminRouter(). The tools endpoints describe available names; blueprints reference those names. Explicit library entries override toolkit tools with the same key.
This factory is a host integration example. Mount its returned router behind your operator middleware and call its hydrate() before accepting traffic. Giving the fixture Agent a calculator does not make its fixed provider call tools; use a tool-capable model for that behavior.

Toolkit configuration (dynamic credentials)

The admin API also exposes a toolkit catalog and saved toolkit configurations. An enabled configuration instantiates a toolkit and exposes its tools for subsequent entity creation. Existing Agents keep their configured tool instances; updating a toolkit config is not an automatic rollout to every Agent. Catalog fields marked secret are masked in API responses; the original values are persisted in the backing storage. Agent and Team providerConfig is omitted from public blueprint responses but also retained privately in storage. Choose storage access and encryption appropriate to those values. See configuration storage.

AdminOptions

The admin package and transport package both export a function named createAdminRouter. Import the entity configuration router shown here from @agentium/admin; transport’s version manages its MCP/catalog administration surface.

Quick start (Socket.IO)

Use the Socket.IO host integration when an operator interface needs acknowledgements and change broadcasts. Authenticate its namespace separately from a run gateway. Every admitted operator receives namespace-wide mutations.

Adapt the example

To use a live model, install its optional SDK, set server-side credentials, and create an Agent with a real provider/model pair from example models. The run request then makes a paid provider call. Keep the fixture for testing persistence and operator access. For a hosted application, replace the demonstration token with verified operator authentication and policy. Use an independently authenticated application API for end users. Configuration deletion/update removes or replaces registry entries; it is not a drain or shutdown protocol for active work. Coordinate changes with your host lifecycle.

If something fails

Continue with REST operations, Socket.IO events, or storage and hydration.