Docs Guides

Add an agent

Add an agent to t10: configuration on agent-ti for an app to call, or a pool of its own for the agent picker, and what each component needs.

An agent is a configuration a harness runs: its instructions, models, skills, tools and the grants it may ask for. This guide is the order of work for adding one. The references it relies on are the agent contract, t10-agents and agent-ti's configuration.

Choose the path#

You want Path Example
An agent your app calls by path, with its own tools and grants A. A hosted agent on agent-ti. Configuration only, on the pool ti already runs A module's own assistant, which its app calls
An agent people pick in Workbench B. An agent with a pool of its own, which the router places ti
A harness written another way, in any language C. A new harness, which passes the agent contract, then B agent-pi, agent-ti

A hosted agent never shows in the picker: the router lists every agent a tenant may use, and it never places a hosted one. It's still an agent tenants may use, with its own tool list, skills, connectors and customization. See "One runtime per agent" in tenant-agents.md.

The names you need#

They have to match across repos, so choose them first. The examples are for a made-up agent, support.

Name Example Used by
Agent support agent in agent.json, the folder name, the catalog
Runtime agent-ti-support grants.clientId in agent.json, auth-server's clients.yaml and service account. Each agent has its own, so a token names exactly one agent, and the gateways apply that agent's tool list and policy
Audience agent-ti-support The runtime's own audience, in clients.yaml and the pool's hosts
Secrets SUPPORT_AUTH_CLIENT_SECRET, AGENT_TI_SUPPORT_SECRET The same value twice: in agent-ti's Secret, for the agent to mint grants, and in auth-server-setup, for the account

A. A hosted agent on agent-ti#

1. Write the agent#

In t10-agents, copy agents/ti/ to agents/support/, drop what only Ti needs (its voice profile, variables, tenantConfig), and edit:

Part of agent.json Set
agent support
instructions The files that tell it what it's for, such as base.md
models, profiles Model aliases that ai-gateway-llm serves, never a provider's own names
grants clientId: ${SUPPORT_GRANTS_CLIENT_ID:-agent-ti-support}, clientSecret: ${SUPPORT_AUTH_CLIENT_SECRET:-}, and the actions and audiences its tools need, with agent-ti-support first among the audiences
mcpServers Tools, always through ai-gateway-tools: /mcp/modules for every business module's tools, or /mcp/<server> for one

Skills go in agents/support/skills/<skill>/. Built-in skills live here, the same for every tenant; a tenant's own are tenant skills in t10-agent-control. Run scripts/check.sh in t10-agents, which loads every agent as a deployment would.

2. Give it a runtime in auth-server#

In auth-server/clients.yaml, add the runtime beside agent-ti. It caps what the agent's grants may ask for:

  - name: agent-ti-support
    optional: true
    actions: [agent:use, work:read]
    audiences: [agent-ti-support, t10-collab, ai-gateway-tools, ai-gateway-llm]
    tool_audience: ai-gateway-tools
    model_audience: ai-gateway-llm

Add service agent-ti-support "${AGENT_TI_SUPPORT_SECRET:-}" to auth-server/deploy/setup.sh, put the secret in the auth-server-setup Secret, and run the setup Job before rolling auth-server: it won't start while a runtime that isn't optional has no account. Put the same secret in agent-ti's Secret as SUPPORT_AUTH_CLIENT_SECRET.

If an app calls the agent with grants of its own, add agent-ti-support to that app's runtime's audiences too, so the agent's runtime may build on its grants.

The workspace's make check runs scripts/check-module-agents.py, which fails when a module's actions or audiences are missing from a runtime that needs them.

3. Host it on the pool#

In t10-agents/catalog/ti.json, add the agent to the pool's hosts and to hosted:

"hosts": [{"agent": "support", "audience": "agent-ti-support"}],
"hosted": [{"name": "support", "agent": {"title": "Support", "open": true, "routes": []}}]

Do the same in the workspace's deploy/k8s/overlays/local/agents.json, which seeds a new cluster. Publishing refuses an audience two agents share.

4. Ship it#

Agents load when agent-ti starts, so a change is a new t10-agents image and a restart. Build it with the commit as its tag, pin that tag under images: in the overlay, and apply; the changed pod template rolls agent-ti. Then publish the catalog change with scripts/register.py --agent ti, which sends each change as a reviewed draft with a reason (t10-agents/docs/ti.md).

5. Check it#

  1. GET /agents/support/v1/runtime on agent-ti answers its manifest, with bundle as the hash of its files.
  2. Your app calls /agents/support/agent on agent-ti with the /agent methods, sending a person's token or a grant's.
  3. Ask for something that uses a tool. A tool call that fails points at grants: the tool's audience and action must be in agent.json's grants and on the runtime in clients.yaml.

B. An agent with a pool of its own#

An agent people pick needs a pool the router can place it on, with replicas whose manifest names it as agent and pool. deploy/add-an-agent.md walks through this end to end, for an agent on agent-pi: the names, the runtime in auth-server, the StatefulSet, publishing the agent, pool and route in the console, and checking it with a test tenant first. It also shows how a request flows, and a table of what goes wrong.

The rules that matter most:

  • The pool and replica names must match the harness's. Session IDs are <pool>.<replica>.<n>. A mismatch fails right after a conversation is created, with unknown_session, while the console's Fleet still looks healthy.
  • A new agent starts closed. Open it to one test tenant, check it, then widen it.
  • A route rule alone doesn't let a tenant in. The tenant must be allowed, or the agent open to every tenant.
  • Calls need the voice runtime. A voice token carries every audience on t10-livekit-agent's runtime, so list a new agent there only if it takes calls. agent-identity.md says to narrow voice tokens first.

On agent-ti, a pool of its own is a second agent-ti StatefulSet whose DEFAULT_AGENT is the new agent, with the same agents image. No agent runs this way yet, so expect to adjust the steps.

C. A new harness#

A harness is anything that passes contracts/agent/conformance.ts, which speaks only HTTP. Add it to harnesses there and to scripts/check-contracts.sh, so make check runs it, then follow B. contracts/agent/design.md explains the contract's shape, including building a harness and retiring a pool.

What each component needs#

Component A. Hosted B. Own pool
t10-agents or the harness The agent's folder, a new image The same, plus a StatefulSet and its Secret
auth-server A runtime in clients.yaml, its account The same
t10-agent-control The pool's hosts, through the platform API The agent, pool and routes, in the console
ai-gateway-agent, ai-gateway-tools, ai-gateway-llm Nothing: they learn the agent from the token and the catalog The same
workbench Nothing Nothing: the picker comes from agents.list
Modules Only for a new tool Only for a new tool

Removing an agent#

An agent can be closed, and can't yet be removed cleanly. Close it and clear its tenants, or drain its pool. A session ID names its replica for life, so don't delete a replica or its volume while people have conversations there. See "Retiring a pool" in contracts/agent/design.md.

Generated from t10’s own docs (bbc3cde). Spotted a problem? Tell us.