Skip to content

Deploying Agents

/deploy (a TUI command) ships a saved chain to the agent hub — one lightweight local process that serves each deployed chain as an HTTP agent, mounted at /agents/<name> with its own Swagger UI at /agents/<name>/docs.

The hub ships as a separate package so the base install stays light:

Terminal window
pip install "maestro-care[deploy]"

That puts the carl-agent-hub CLI on your PATH (it’s also bundled in the [full] extra). The TUI autostarts it on the first /deploy, so you rarely run it by hand.

In the TUI, with Memory configured:

/deploy <ref> [--channel <ch>] [--name <agent>]
  • <ref> — a chain entity id or a name-search query (may contain spaces).
  • --channel — which channel to deploy. Defaults to stable — production ships the released version, not the dev tip.
  • --name — the agent’s name on the hub (defaults from the chain).

What happens:

  1. Resolve the chain on the requested channel (with a latest fallback).
  2. Deploy gate — a client-side check (the chain loads, uses only template-safe tools, and passes the MAGE lint). On failure the issues are listed and nothing is deployed.
  3. Hub up — if the hub is down and autostart is on, the TUI spawns it and waits for /healthz.
  4. Deploy — POST /deployments; the hub mounts the agent.
  5. You get the agent URL, a link to its Swagger docs, and a readiness line.

Each deployment is an HTTP agent on the hub:

  • Agent endpoint — …/agents/<name>
  • Swagger UI — …/agents/<name>/docs

One hub hosts many chains at once and persists them between restarts (its state_file), so deployed agents survive a hub restart.

The [hub] section (env prefix CARE_HUB__):

SettingDefaultPurpose
base_urlhttp://127.0.0.1:8080Hub control API the client talks to.
port8080Port autostart serves on (must agree with base_url).
autostarttrueSpawn the hub when it’s down.
state_file~/.care/agent-hub.jsonWhere the hub persists deployments.
agent_server_cmd["carl-agent-hub", "serve"]Command MAESTRO spawns to autostart (gets --port / --state-file appended).
start_timeout15Seconds to wait for /healthz after autostart.
timeout30Per-request timeout for control-API calls.

See Configuration → sections.

/deploy has headless twins: maestro deploy, maestro deployments and maestro metrics. One caveat — the CLI does not autostart the hub, so you must already have one running. See Deploy to the agent hub.

  • The desktop app has no deploy button. The chat agent can run maestro deploy through its CLI command bridge; that call asks for confirmation. The bridge is off when IdeaL is the chain memory.
  • It needs Memory (the chain registry), like the other Production commands.
  • For a fire-and-forget POST to an external service instead of the hub, see /upload.