---
title: "Create Agent Session"
method: POST
path: "/ai/agent_sessions"
tags: ["AI"]
---

# Create Agent Session

`POST /ai/agent_sessions`

## Request body

- CreateAgentSessionRequestBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `attributes` CreateAgentSessionAttributes, required
    - `agentName` string, required
    - `input` string, byte, required

## Response `201`

Created

- CreateAgentSessionResponseBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `data` AgentSession, required
    - `attributes` AgentSessionAttributes, required
      - `agentName` string, required
      - `createdAt` string, date-time, required
      - `ownerUserId` string
      - `permissionScopes` string[], required
    - `id` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Unprocessable Entity
- `500` — Internal Server Error

## Changes

- **2026-08-14** (v1) `dbc273b2bbef` — 2 warning
  - removed the optional property `data/attributes/initialTurn` from the response with the `201` status
  - removed the optional property `data/attributes/latestTurn` from the response with the `201` status
- **2026-08-10** (v1) `4457b35521ad` — 2 breaking, 4 warning, 2 info
  - the `attributes/input` request property contentEncoding changed from `` to `base64`
  - the `attributes/input` request property type changed from `object` to `string`
  - removed the optional property `data/attributes/initialTurn/attributes/knowledgeCitations/items/attributes/knowledgeEntityId` from the response with the `201` status
  - removed the optional property `data/attributes/initialTurn/attributes/knowledgeCitations/items/attributes/knowledgeRelationshipId` from the response with the `201` status
  - …4 more
- **2026-07-30** (v1) `d226beeef0bf` — 1 breaking, 2 info
  - the response property `data/attributes/ownerUserId` became optional for the status `201`
  - added the optional property `data/attributes/initialTurn/attributes/knowledgeCitations` to the response with the `201` status
  - added the optional property `data/attributes/latestTurn/attributes/knowledgeCitations` to the response with the `201` status
- **2026-07-21** (v1) `ffea3af600ea` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rezible/apis/rezible-api/changes/ai/agent_sessions/post.md)

---

[API](https://skmtc.dev/rezible/apis/rezible-api.md) · [All operations](https://skmtc.dev/rezible/apis/rezible-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rezible/rezible-api/revisions/dbc273b2bbef/schema)
