Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required
Minimum string length: 1
Example:

"agent_abc123"

threadId
string
required
Minimum string length: 1
Example:

"thread_abc123"

Response

Compacted thread detail.

agentId
string
required
completedAt
string | null
required
createdAt
string
required
depth
number
required
error
string | null
required
id
string
required
instructions
string | null
required
model
string
required
parentThreadId
string | null
required
result
string | null
required
scheduleId
string | null
required
scheduleSeq
number | null
required
status
enum<string>
required

idle threads can accept a new turn or be closed. running threads have an active turn. awaiting threads are paused on external input such as approvals. closed threads are terminal.

Available options:
idle,
running,
awaiting,
closed
updatedAt
string
required
message
string
required
compiledContext
object | null
required
compactionSummary
string | null
required
compactionThroughSeq
number | null
required
composedSystemPrompt
string | null
required
contextWindow
object | null
required
hasMoreMessages
boolean
required
lastTurnStatus
enum<string> | null
required
Available options:
completed,
failed,
null
messageCursor
number | null
required
messages
object[]
required
subThreads
object[]
required
tools
enum<string>[]
required
Available options:
get_time,
sub_thread,
wait,
tool.call,
tool.discover,
artifact.read,
agent.threads.list,
agent.threads.get,
agent.approvals.cancel,
agent.approvals.grant_thread,
agent.approvals.grant_agent,
agent.create,
agent.approvals.update,
tool.connect,
sandbox.exec,
sandbox.read,
sandbox.write_file,
sandbox.read_file,
sandbox.spawn,
sandbox.stdin,
sandbox.session_read,
sandbox.kill,
sandbox.list_sessions,
sandbox.sync_artifact,
memory.read,
memory.list,
memory.search,
memory.write,
memory.delete,
db.query,
web.search,
web.fetch,
agent.schedule.list,
agent.schedule.create,
agent.schedule.update,
agent.schedule.delete,
agent.schedule.trigger
turns
object[]
required
externalToolNamespaces
Available options:
all
activeTurnModel
string | null