Create session via alias
POST/v2/agent_aliases/:alias_key/sessions
Creates a session by routing through an alias. The alias's policy selects the underlying agent that owns the session. Subsequent operations on the session can use this alias or the direct path /v2/agents/{resolved_agent_key}/sessions/{session_key}.
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 422
- 502
- 504
The newly created session, owned by the agent the alias's policy resolved to.
The request is malformed, or the alias's policy cannot resolve against the session context.
Permissions do not allow creating sessions via this alias.
Alias not found or not currently active.
No session was created. Either the requested session key or name is already taken, or the resolved agent's run_condition evaluated to false. messages names which. A collision needs a different key or name, while the same request succeeds after a run_condition refusal once the expression, or the metadata it reads, changes.
No session was created. A session_enrichment tool call on the resolved agent has an invalid configuration or its transform raised an error, or the resolved agent's run_condition returned a non-boolean. messages names the cause. For an enrichment failure it names the failing tool call and the reason, such as a $ref to a secret that is not on the resolved agent or in the request, or a jq error raised by the called tool configuration's input_transform or output_transform.
A session_enrichment tool call on the resolved agent failed upstream, so no session was created. The failure may be transient; retrying the request may succeed.
A session_enrichment tool call on the resolved agent did not complete within its timeout_seconds, so no session was created.