Skip to main content
GET
/
agents
/
{agentId}
/
threads
/
{threadId}
/
activity
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

const activityDetail = await client.threads.activity('agent_abc123', 'thread_abc123');

console.log(activityDetail);
{
  "completedAt": "<string>",
  "createdAt": "<string>",
  "goal": "<string>",
  "id": "<string>",
  "latestActivity": "<string>",
  "messageCount": 123,
  "model": "<string>",
  "nextStep": "<string>",
  "parentThreadId": "<string>",
  "result": "<string>",
  "scheduleId": "<string>",
  "stepCount": 123,
  "updatedAt": "<string>",
  "error": "<string>",
  "recentTurns": [
    {
      "activity": "<string>",
      "completedAt": "<string>",
      "messageCount": 123,
      "nextStep": "<string>",
      "turnSeq": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

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"

Query Parameters

fleetId
string

Optional fleet id for index-backed authorization.

Response

Thread activity detail.

completedAt
string | null
required
createdAt
string
required
goal
string
required
id
string
required
latestActivity
string | null
required
messageCount
number
required
model
string
required
nextStep
string | null
required
parentThreadId
string | null
required
result
string | null
required
scheduleId
string | 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
stepCount
number
required
updatedAt
string
required
error
string | null
required
recentTurns
object[]
required