DocsCommonagent-configAgentContext
Package: @hexos/common

Context available to agents during conversation execution, including conversation metadata and client-provided data.

Passed to dynamic system prompts (when systemPrompt is a function) and to RuntimeHooks lifecycle callbacks. The frontendContext field contains arbitrary data sent by the client with each request.

Related: AgentDefinition uses this for dynamic system prompts, ToolContext carries a subset of this context to tools.

interface AgentContext {
    conversationId: string;
    userId?: string;
    frontendContext: Record<string, unknown>;
}

conversationId

string

userId

string

frontendContext

Record