Skip to content

AgentRunInput

AgentRunInput<ToolProviderContext> = object

Defined in: packages/core/src/agent/types.ts:128

ToolProviderContext = unknown

optional memoryScope?: string

Defined in: packages/core/src/agent/types.ts:134

Conversation key in MessageStore. Omit to allocate a random scope for this call — later episodes will not share history unless the caller reuses the resolved scope from the handle / result.


optional messages?: ModelMessage[]

Defined in: packages/core/src/agent/types.ts:142

Turn messages appended after user (if set) and any transcript already stored on AgentRunInput.memoryScope. Combine with a scope to inject extra turns into an existing conversation; omit the scope for a one-shot list on a generated id.


optional outputSchema?: z.ZodType<unknown>

Defined in: packages/core/src/agent/types.ts:144

Per-episode override of the agent’s outputSchema.


optional stopWhen?: AgentStopWhen

Defined in: packages/core/src/agent/types.ts:146

Per-call override of the agent’s stopWhen.


optional suppressSystemPromptConflictWarning?: boolean

Defined in: packages/core/src/agent/types.ts:156

Do not console.warn when a different agent’s system prompt conflicts with the pin on this scope.


optional systemPromptConflict?: SystemPromptConflictStrategy

Defined in: packages/core/src/agent/types.ts:151

When a different agent hits this scope with a different system prompt. Defaults to "keep-pinned". Ignored for same-agent follow-ups.


optional toolProviderContext?: ToolProviderContext

Defined in: packages/core/src/agent/types.ts:179

Stays a plain, always-optional field rather than conditionally required (optional key when ToolProviderContext allows undefined, required key otherwise) — verified via a minimal repro: that presence-toggle pattern breaks the bivariant run/stream parameter check Agent<Context, ...> needs to widen into a heterogeneous registry, once the target is a concrete type like the old Agent<unknown, ToolSet, unknown>[] (TypeScript falls back to strict contravariant checking as soon as a key’s presence — not just its value type — depends on the type parameter, and that direction always fails for undefined vs unknown). Registries now widen to AnyAgent instead, whose any params sidestep this class of bug entirely — confirmed by re-running the same repro against AnyAgent, no break — but the field stays plain regardless, since there’s no upside to the conditional form once nothing requires it. The framework never validates this value — a ToolProvider that wants Zod validation/defaults parses it itself inside getTools. See notes/tool-sandboxing.md.


optional tools?: ToolSet | ToolProvider<ToolSet>

Defined in: packages/core/src/agent/types.ts:158

Per-call override of the agent’s tools. Wins over AgentDefinition.tools.


optional user?: string

Defined in: packages/core/src/agent/types.ts:135


optional workflow?: AgentWorkflowScope

Defined in: packages/core/src/agent/types.ts:163

When running inside a workflow, pass the current WorkflowContext ids so agent events attach to the correct step. Omit for standalone episodes.