Interface: Thread
Defined in: packages/kernl/src/api/models/thread.ts:27
Thread model returned by Kernl APIs.
This represents the persisted state of a thread – what you get back from
kernl.threads.get() / kernl.threads.list().
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
agentId | string | ID of the agent that owns this thread. | packages/kernl/src/api/models/thread.ts:51 |
context | Record<string, unknown> | User-defined context object that was attached to this thread. This is the raw JSON-serializable context, not a Context instance. | packages/kernl/src/api/models/thread.ts:63 |
createdAt | Date | When the thread record was first created. | packages/kernl/src/api/models/thread.ts:78 |
history? | ThreadEvent[] | Event history for this thread, when requested via options. Only present when you call APIs like kernl.threads.get(id, { history: true }) or kernl.threads.get(id, { history: { ... } }). For list endpoints, history is omitted to keep responses lightweight. | packages/kernl/src/api/models/thread.ts:92 |
model | MThreadModelInfo | Language model used for this thread. | packages/kernl/src/api/models/thread.ts:56 |
namespace | string | Logical namespace this thread belongs to, e.g. "kernl" or "org-a". Namespaces let you partition threads by tenant, environment, or product. | packages/kernl/src/api/models/thread.ts:41 |
parentTaskId | string | null | Optional parent task ID that spawned this thread, if any. | packages/kernl/src/api/models/thread.ts:68 |
state | ThreadState | Current lifecycle state of the thread (running, stopped, etc.). | packages/kernl/src/api/models/thread.ts:73 |
tid | string | Globally-unique thread identifier. You can pass this back into agents (via threadId) to resume execution or into storage APIs to fetch history. | packages/kernl/src/api/models/thread.ts:34 |
title? | string | null | Optional human-readable title for the thread. | packages/kernl/src/api/models/thread.ts:46 |
updatedAt | Date | When the thread record was last updated (state, context, etc.). | packages/kernl/src/api/models/thread.ts:83 |