Docs Deploy
Add an agent to a deployment
Wire a new agent harness into a running deployment: image, manifests, catalog entry and routing.
This guide adds a new agent to the local cluster, then follows it through every running component. It uses a made-up agent, support, on agent-pi's runtime.
The order matters. auth-server has to know the agent before the agent starts, and the agent has to be running before the console points anyone at it.
The names you need#
Choose these first, because they have to match across several files.
| Name | Example | Used by |
|---|---|---|
| Agent | support |
Clients and the console. It's what people pick |
| Pool | support |
Session IDs and the console. It must equal agent in the harness's config |
| Runtime and audience | agent-support |
auth-server, grants and tokens |
| Replica | agent-support-0 |
Session IDs and the console. It's the pod's name, through AGENT_INSTANCE_ID |
| Port | 18120 |
The manifest and the pool's replica URL. 18100 and 18110 are taken |
Session IDs join these: support.agent-support-0.1.
Step 1: Write the agent#
An agent with no code of its own is a folder in agent-pi, and it shares that image. Copy agent-pi/apps/assistant to agent-pi/apps/support, then edit:
| File | Change |
|---|---|
config/agent.json |
Set agent to support, the port default to 9820, and the grants defaults to agent-support |
prompts/ |
What the agent is told |
skills/ |
What it can look up, as <name>/SKILL.md |
Model names in the config have to be aliases that ai-gateway-llm serves. Add a voice profile with "speech": true if the agent takes calls.
An agent with plugins of its own needs its own entry point. In that case, also add it to harnesses in contracts/agent/conformance.ts and to the harness loop in scripts/check-contracts.sh, so make check covers it.
Step 2: Tell auth-server about it#
Add the runtime to auth-server/clients.yaml. It says what this agent may ask for on a user's behalf:
- name: agent-support
actions: [agent:use, work:read, work:write]
audiences: [agent-support, t10-collab]List its audience on the voice runtime too, or calls can't reach it:
- name: t10-livekit-agent
audiences: [agent-pi, agent-support, t10-collab][!WARNING] A voice token carries every audience on this list, so a compromised agent could replay a caller's token at another agent.
auth-server/docs/agent-identity.mdsays to narrow voice tokens before adding a third agent audience, andsupportwould be that third one. That work isn't done. If this agent doesn't take calls, leave it off this list. Add it only if you accept the wider token.
Add its service account to auth-server/deploy/setup.sh:
if [ -n "${AGENT_SUPPORT_SECRET:-}" ]; then
AUTHCTL_SERVICE_SECRET="$AGENT_SUPPORT_SECRET" authctl service-add --if-missing --name=agent-support
fiThen create the account before restarting auth-server, because it won't start while a runtime in clients.yaml has no service account:
AGENT_SUPPORT_SECRET="dev-only-agent-support-service-secret-change-me"
docker build -t auth-server:latest ./auth-server
kubectl -n t10 patch secret auth-server-setup --type merge \
-p "{\"stringData\":{\"AGENT_SUPPORT_SECRET\":\"$AGENT_SUPPORT_SECRET\"}}"
kubectl apply -k auth-server/deploy/k8s/setup
kubectl -n t10 wait --for=condition=complete job/auth-server-setup --timeout=2m
kubectl -n t10 rollout restart deploy/auth-server
kubectl -n t10 rollout status deploy/auth-serverA finished setup Job removes itself after an hour. If an old one is still there, delete it first with kubectl -n t10 delete job auth-server-setup.
Step 3: Deploy the pool#
Copy agent-pi/deploy/k8s/agent-pi.yaml to agent-pi/deploy/k8s/agent-support.yaml, and add it to that folder's kustomization.yaml. Rename everything to agent-support and change the port to 9820. Point AGENT_CONFIG at this agent's config:
- name: AGENT_CONFIG
value: /app/apps/support/config/agent.jsonThese lines connect it to the platform, so check each one:
| Setting | Why |
|---|---|
Label t10.dev/auth-client |
Lets the pod through auth-server's network policy |
Label t10.dev/llm-client |
Lets the pod reach ai-gateway-llm |
AGENT_INSTANCE_ID from metadata.name |
Gives the replica its name |
JWT_AUDIENCE: t10,agent-support |
Accepts people's tokens, and voice tokens for this agent |
GRANT_AUDIENCES: agent-support,t10-collab |
What its grants ask for. clients.yaml has to allow all of it |
GRANT_ACTIONS |
The same, for actions |
COLLAB_MCP_URL |
Tools. Each tool's audience has to be in GRANT_AUDIENCES |
Add the issuer patch to deploy/k8s/overlays/local/kustomization.yaml, as agent-pi has:
- patch: |-
apiVersion: apps/v1
kind: StatefulSet
metadata: {name: agent-support, namespace: t10}
spec:
template:
spec:
containers:
- name: agent-support
env:
- {name: JWT_ISSUER, value: "http://localhost:18000"}Create its secret, build and apply:
kubectl -n t10 create secret generic agent-support \
--from-literal=AUTH_CLIENT_SECRET="$AGENT_SUPPORT_SECRET" \
--from-literal=LLM_API_KEY="$GATEWAY_LLM_KEY" \
--from-literal=FAST_MODEL_ID='qwen3.5-flash' \
--from-literal=SMART_MODEL_ID='qwen3.5-flash'
docker build -t agent-pi:latest ./agent-pi
kubectl diff -k deploy/k8s/overlays/local
kubectl apply -k deploy/k8s/overlays/local
kubectl -n t10 rollout status statefulset/agent-supportThe agent is now running, and nobody can reach it, because no router knows it exists.
Step 4: Publish it in the console#
Open the console as in t10-console/docs/console.md.
Add the agent. On Agents, add
support, press Review, give a reason and publish. It starts closed, and a new agent is closed until someone decides otherwise.Add the pool. On Fleet, press Add a pool. Set the name to
support, the agent tosupport, and add the replica:agent-support-0=http://agent-support-0.agent-support.t10.svc.cluster.local:9820Copy the capabilities from what the harness reports at
GET /v1/runtime. Review and publish.Add a route. Open the agent, and add a rule with no tenant that goes to pool
support. Add one test tenant under Allowed tenants. On the draft, preview that tenant, then publish.Check Fleet. The pool should show
1 / 1 readywith no warnings, and Routers on this revision should reach every router.
Step 5: Check it end to end#
- Sign in to
workbenchas someone in the test tenant.supportshould be in the agent picker, with noworkbenchchange or restart. - Sign in as someone in another tenant. It shouldn't be there.
- Start a conversation and send a message. This is the check that matters. If the pool or replica name doesn't match the harness, the conversation fails right after it's created with
unknown_session, and Fleet still looks healthy. - Ask for something that uses a tool, and check it works.
- If the agent takes calls, press Call.
- When you're happy, allow more tenants, or turn on Open to every tenant.
How it flows through the system#
From the console to the routers#
sequenceDiagram
participant A as Platform admin
participant C as t10-agent-control
participant Auth as auth-server
participant DB as Postgres
participant R as ai-gateway-agent, t10-livekit-agent
A->>C: Publish the draft
C->>Auth: GET /v1/me/access
Auth->>C: platform_verified
C->>DB: Check it, add the revision and history
loop Every 10 seconds
R->>C: GET /v1/routes, If-None-Match
C->>R: The new snapshot
end
Note over R: Now in memory. Nothing here touches the harness
A person starts a conversation#
sequenceDiagram participant B as Browser participant W as workbench participant G as ai-gateway-agent participant H as agent-support-0 participant Auth as auth-server B->>W: agents.list W->>G: agents.list, with the user's token G->>B: Agents this tenant may use, from the snapshot B->>W: session.create for support W->>G: session.create, Agent-Name: support Note over G: Is the tenant allowed? Pick a pool, then a ready replica G->>H: session.create H->>H: Verify the token offline, using auth-server's keys H->>B: sessionId support.agent-support-0.1 B->>W: session.prompt with that ID W->>G: session.prompt Note over G: Route from the ID alone G->>H: session.prompt
workbench holds the user's token, so the browser never sees it. ai-gateway-agent drops Agent-Name before forwarding, and it asks nothing of the control service on the way through.
The agent answers#
sequenceDiagram participant G as ai-gateway-agent participant H as agent-support-0 participant Auth as auth-server participant L as ai-gateway-llm participant M as t10-collab MCP G->>H: session.prompt H->>Auth: POST /v1/grants, with the user's token Auth->>H: A grant, limited by clients.yaml H->>L: Model call, tagged with tenant, user and turn L->>H: Reply, or a tool call H->>Auth: Exchange the grant for a short token H->>M: Tool call, with that token M->>H: Result H->>L: Next model call H->>G: Events over the stream, to the browser
The harness keeps the conversation on its own volume. Nothing else stores it.
A person makes a call#
The conversation exists before the call, so a call places nothing. A voice worker takes support.agent-support-0 from the session ID, finds that replica's address in its snapshot, and connects directly, with no ai-gateway-agent in between. This is why t10-livekit-agent needs the agent's audience in clients.yaml, but no change of its own.
What each component needs#
| Component | Needs a change? | What it learns, and how |
|---|---|---|
| Harness | Yes: config, manifest, secret | Its own name, from config and AGENT_INSTANCE_ID |
auth-server |
Yes: clients.yaml, setup.sh, deploy |
The runtime, what it may ask for, and its service account |
t10-agent-control |
Data only, in the console | The agent, pool, routes and tenants |
ai-gateway-agent |
No | Everything it needs, from the snapshot |
t10-livekit-agent |
No | The replica's address, from the snapshot. Its audience is in clients.yaml |
workbench |
No | The agent and its title, from agents.list |
| Mobile app | No | It follows the default agent, and has no picker |
ai-gateway-llm |
Only if the model alias is new | Nothing about agents. It sees tenant, user and turn on each call |
| MCP tools | Only if the agent needs a new tool | The token's audience and actions, on each call |
If it doesn't work#
| What you see | Likely cause |
|---|---|
auth-server won't start |
A runtime in clients.yaml has no service account. Run the setup Job |
| The harness won't start, or logs grant errors | AUTH_CLIENT_SECRET differs from the account's, or GRANT_AUDIENCES asks for more than clients.yaml allows |
| The agent isn't in the picker | The tenant isn't allowed, or a router is behind. Check the tenant's Routing tab in the console, and Fleet. Its admin may also have turned the agent off in workbench |
403 agent_not_available |
The tenant isn't on Allowed tenants. A route rule alone doesn't grant access |
503 replica_unavailable |
No usable pool. The pool may be draining, not ready, or missing something in requires |
404 unknown_session right after creating a conversation |
The pool name or replica name doesn't match the harness |
| Tools are missing | The tool's audience isn't in GRANT_AUDIENCES or in clients.yaml |
| Tools work in text, and are missing on calls | The tool's audience isn't on t10-livekit-agent in clients.yaml |
| Call button is missing | The harness doesn't report voice for this session. Console capabilities don't control it |
| Model calls fail | The model alias isn't in ai-gateway-llm, the LLM_API_KEY is wrong, or the pod lacks t10.dev/llm-client |
Removing an agent#
An agent can be turned off, and it can't yet be removed cleanly. Take it away from people by closing it and clearing Allowed tenants, or by draining its pool. Existing conversations stay on its volume. Don't scale its replicas down or delete the volume, because a session ID names its replica for life, and moving conversations off a pool isn't built yet. See step 5a and "Retiring a pool" in contracts/agent/design.md.
Generated from t10’s own docs (bbc3cde). Spotted a problem? Tell us.