Create an alias
POST/v2/agent_aliases
Create a new alias. Aliases are routing primitives that map a public name to one or more underlying agents under a configurable policy. When a session is created through an alias (via POST /v2/agent_aliases/{alias_key}/sessions), the alias's policy decides which underlying agent runs that session.
Common patterns:
- Direct alias — a
routedpolicy with one rule and one target. Identical in behavior to invoking the agent directly. - Canary rollout — a
routedpolicy with one rule and multiple weighted targets (e.g. 90% v1, 10% v2). - Tenant routing — a
routedpolicy with multiple rules, each matching on session metadata (e.g.session.metadata.tenant).
Request
Responses
- 201
- 400
- 403
- 409
The newly created alias.
Request was malformed or the policy is invalid.
Permissions do not allow creating aliases.
An alias with this key already exists.