Interface: TurnRunnerConfig
Configuration supplied to @nhtio/adk!TurnRunner at construction time.
Remarks
Validated against turnRunnerConfigSchema at construction — a misconfigured runner throws immediately rather than failing on the first turn.
All fetch and mutation callbacks are required: they are injected into each @nhtio/adk!TurnContext so middleware can call fetch, refresh, and persistence methods directly on the context without coupling to the runner.
tools is optional at the caller level and defaults to [] after schema resolution — a runner with no baseline tools is valid.
Properties
| Property | Type | Description |
|---|---|---|
deleteMemoryCallback | MemoryDeleteFn | Removes a memory from the persistence layer by ID. |
deleteMessageCallback | MessageDeleteFn | Removes a message from the persistence layer by ID. |
deleteRetrievableCallback | RetrievableDeleteFn | Removes a retrievable record from the persistence layer by ID. |
deleteStandingInstructionCallback | StandingInstructionDeleteFn | Removes a standing instruction from the persistence layer. |
deleteThoughtCallback | ThoughtDeleteFn | Removes a thought from the persistence layer by ID. |
deleteToolCallCallback | ToolCallDeleteFn | Removes a tool call from the persistence layer by ID. |
dispatchInputPipeline? | DispatchPipelineMiddlewareFn[] | LLM-iteration input middleware, executed in order against the @nhtio/adk!DispatchContext before the executor on each iteration. Defaults to []. |
dispatchOutputPipeline? | DispatchPipelineMiddlewareFn[] | LLM-iteration output middleware, executed in order against the @nhtio/adk!DispatchContext after the executor on each iteration. Defaults to []. |
executorCallback | DispatchExecutorFn | Performs the LLM API/SDK call for each iteration of the dispatch loop; receives the active @nhtio/adk!DispatchContext and an @nhtio/adk!DispatchExecutorHelpers object for managing per-id stream state. |
fetchMemoriesCallback | MemoryRetrievalFn | Called once per turn to supply memories; receives the active @nhtio/adk!TurnContext. |
fetchMessagesCallback | MessageRetrievalFn | Called once per turn to supply conversation history; receives the active @nhtio/adk!TurnContext. |
fetchRetrievablesCallback | RetrievableRetrievalFn | Called once per turn to supply retrievable (RAG) records; receives the active @nhtio/adk!TurnContext. |
fetchThoughtsCallback | ThoughtRetrievalFn | Called once per turn to supply thought traces; receives the active @nhtio/adk!TurnContext. |
fetchToolCallsCallback | ToolCallRetrievalFn | Called once per turn to supply tool call records; receives the active @nhtio/adk!TurnContext. |
fetchToolsCallback | ToolsRetrievalFn | Called to supply available tools; receives the active @nhtio/adk!TurnContext. |
mutateMemoryCallback | MemoryMutateFn | Updates an existing memory in the persistence layer. |
mutateMessageCallback | MessageMutateFn | Updates an existing message in the persistence layer. |
mutateRetrievableCallback | RetrievableMutateFn | Updates an existing retrievable record in the persistence layer. |
mutateStandingInstructionCallback | StandingInstructionMutateFn | Updates an existing standing instruction in the persistence layer. |
mutateThoughtCallback | ThoughtMutateFn | Updates an existing thought in the persistence layer. |
mutateToolCallCallback | ToolCallMutateFn | Updates an existing tool call in the persistence layer. |
refreshStandingInstructionsCallback | StandingInstructionsRefreshFn | Called to refresh and return standing instructions; receives the active @nhtio/adk!TurnContext. |
storeMemoryCallback | MemoryStoreFn | Persists a new memory. |
storeMessageCallback | MessageStoreFn | Persists a new message. |
storeRetrievableCallback | RetrievableStoreFn | Persists a new retrievable record. |
storeStandingInstructionCallback | StandingInstructionStoreFn | Persists a new standing instruction. |
storeThoughtCallback | ThoughtStoreFn | Persists a new thought. |
storeToolCallCallback | ToolCallStoreFn | Persists a new tool call. |
tools? | Tool<SpooledArtifact>[] | Baseline tools available on every turn. Middleware may trim or extend this per-turn via ctx.tools. Defaults to []. |
turnInputPipeline? | TurnPipelineMiddlewareFn[] | Turn-level input middleware, executed in order against the @nhtio/adk!TurnContext before the LLM dispatch. Defaults to []. |
turnOutputPipeline? | TurnPipelineMiddlewareFn[] | Turn-level output middleware, executed in order against the @nhtio/adk!TurnContext after the LLM dispatch resolves successfully. Defaults to []. |