Skip to content
brain.GitHub
Developer docs OPEN SOURCE
HTTP APIEndpoints

Create a session

POST
/sessions

Creates a session for the caller's tenant with the given harness, model, instructions, reasoning effort, and tools. Requires a management token. Creating a session records its metadata locally; the harness process starts when the first message is sent.

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
config*
credentials?array<>
harness*string

Response Body

Create a session

application/json
  1. response
checkpoint?
config*
created_at*string
Formatdate-time
credential_bindings?array<string>
descriptors*array<>
harness*string
id*string
status*string
updated_at*string
Formatdate-time
curl -X POST 'http://127.0.0.1:8080/sessions' \  -H 'Authorization: Bearer <BRAIN_TOKEN>' \  -H 'Content-Type: application/json' \  -d '{  "config": {    "model": "string",    "tools": [      "string"    ]  },  "harness": "string"}'
{  "checkpoint": {    "id": "string",    "offset": 0,    "time": "2019-08-24T14:15:22Z"  },  "config": {    "bindings": [      {        "alias": "string",        "executor": "string",        "operations": [          "string"        ],        "parameters": null,        "provider": "string",        "runtime": [          {            "description": "string",            "input_schema": null,            "name": "string",            "output_schema": null          }        ]      }    ],    "instructions": "string",    "model": "string",    "reasoning_effort": "string",    "tools": [      "string"    ]  },  "created_at": "2019-08-24T14:15:22Z",  "credential_bindings": [    "string"  ],  "descriptors": [    {      "description": "string",      "input_schema": null,      "name": "string",      "output_schema": null    }  ],  "harness": "string",  "id": "string",  "status": "string",  "updated_at": "2019-08-24T14:15:22Z"}