kernl
ReferencekernlInterfaces

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

PropertyTypeDescriptionDefined in
agentIdstringID of the agent that owns this thread.packages/kernl/src/api/models/thread.ts:51
contextRecord<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
createdAtDateWhen 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
modelMThreadModelInfoLanguage model used for this thread.packages/kernl/src/api/models/thread.ts:56
namespacestringLogical 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
parentTaskIdstring | nullOptional parent task ID that spawned this thread, if any.packages/kernl/src/api/models/thread.ts:68
stateThreadStateCurrent lifecycle state of the thread (running, stopped, etc.).packages/kernl/src/api/models/thread.ts:73
tidstringGlobally-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 | nullOptional human-readable title for the thread.packages/kernl/src/api/models/thread.ts:46
updatedAtDateWhen the thread record was last updated (state, context, etc.).packages/kernl/src/api/models/thread.ts:83

On this page