Agents
Register Agents
Add one or more built agents to a Studio runtime.
Studio runs agents that were already built with the Anvia SDK. It does not define model, tool, instruction, or output behavior by itself.
Register One Agent
import { AgentBuilder } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";
import { Studio } from "@anvia/studio";
const client = new OpenAIClient({ apiKey });
const model = client.completionModel("gpt-5.5");
const agent = new AgentBuilder("support-operations", model)
.name("Support Operations")
.description("Answers operational support questions.")
.instructions("Use tools for private order data. Keep answers concise.")
.build();
new Studio([agent]).start({ port: 4021 });Open http://localhost:4021/playground.
Agent Identity
Studio uses the built agent id as the stable runtime id.
| Field | Use it for |
|---|---|
| Agent id | Stable API path, session ownership, and quick prompt key |
| Agent name | Human-readable label in Studio |
| Agent description | Short explanation of the agent role |
| Instructions | Actual runtime behavior |
Keep ids stable. Saved sessions, trace metadata, and API calls use them.
Check Registered Agents
curl http://localhost:4021/agents{
"agents": [
{
"id": "support-operations",
"name": "Support Operations",
"description": "Answers operational support questions.",
"quickPrompts": []
}
]
}Use Multiple Agents when you want one Studio runtime for several roles.
