Threads
Create Thread
Create Thread
POST
/v2/threadsRequest Body
agentobjectoptionalAgent spec passed inline on the run call. Mirrors AgentCreate's functional fields; ``harness`` is the public name for ``runtime_kind``.
agent.harnessstring · claude_code | codex | cursor | factory | kafka_cloud | opencode | qoder | qwenoptionalHarness that executes the agent's turns (the public name for runtime_kind).
agent.instructionsstringoptionalagent.modelstringoptionalagent.machine_kindstring · daytona | e2boptionalSandbox provider the agent's machines run on. Omit to use the deployment default.
agent.mcp_serversarray<object>optionalagent.skillsarray<object>optionalagent.secretsobjectoptionalagent.entrypointstringoptionalagent.titlestringoptionalagent_idstring · uuidoptionalgroup_idstring · uuidoptionalinputstringoptionalmessagesarray<object>optionaltitlestringoptionalmetadataobjectoptionalcurl --request POST \
--url https://api.brainbaselabs.com/v2/threads \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"agent": {
"harness": "claude_code",
"instructions": "",
"model": "string",
"machine_kind": "daytona",
"mcp_servers": [
{
"name": "string",
"url": "string",
"command": "string",
"args": [
"string"
],
"env": {
"property1": "string",
"property2": "string"
},
"headers": {
"property1": "string",
"property2": "string"
},
"is_enabled": true
}
],
"skills": [
{
"source": "string"
}
],
"secrets": {
"property1": "string",
"property2": "string"
},
"entrypoint": "string",
"title": "string"
},
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
"group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",
"input": "string",
"messages": [
{
"role": "user",
"content": null,
"name": "string",
"tool_calls": {},
"tool_call_id": "string",
"metadata": {}
}
],
"title": "",
"metadata": {
"property1": "string",
"property2": "string"
}
}'{
"thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
"agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
"status": "string"
}