EngineConfig
Defined in: packages/engine/src/lib/config.ts:16
Dependencies and optional policies used to construct an Engine.
Properties
Section titled “Properties”agent?
Section titled “agent?”
readonlyoptionalagent?:AgentConfig
Defined in: packages/engine/src/lib/config.ts:70
Optional Agent Run configuration: the model or a per-run model factory,
instructions, Server Tools, budgets and model-call retry. When omitted,
connections keep the ui_only route. A static model, static budgets and
tools are validated when the Engine is created, and invalid values throw.
See AgentConfig.
The agent loop is experimental in 0.3 and may change in any minor release.
history?
Section titled “history?”
readonlyoptionalhistory?:HistoryConfig<unknown>
Defined in: packages/engine/src/lib/config.ts:43
Optional history configuration. When omitted, chart_request turns still process normally but nothing is recorded, and assistant_message messages produce a validationError (‘history not configured’) since they have nowhere to be injected.
instrument?
Section titled “instrument?”
readonlyoptionalinstrument?:Instrument
Defined in: packages/engine/src/lib/config.ts:50
Optional telemetry seam (defaults to noopInstrument). Stages receive it
as StageContext.instrument; pipeline wraps every stage with
instrument.stage per request, and stages report model calls and other
events through instrument.event.
logger?
Section titled “logger?”
readonlyoptionallogger?:Logger
Defined in: packages/engine/src/lib/config.ts:36
Optional logger (defaults to consoleLogger). Stages receive it as StageContext.logger.
planner
Section titled “planner”
readonlyplanner:ClarifyingPlanner
Defined in: packages/engine/src/lib/config.ts:27
Produces the candidate response for every chart_request. Use a
planner implementation as is, or compose stages with pipeline and
withFallback. The Engine heals and
validates whatever the planner returns against the request the client
sent. Validation accepts a needs-clarification result only for a request
that set skipReply: true. Engine.handle then ships a replyless
response with userMessage absent. It still refuses a needs-clarification
result with Err(ValidationError) on field skipReply.
retry?
Section titled “retry?”
readonlyoptionalretry?:false|WithRetryOptions
Defined in: packages/engine/src/lib/config.ts:60
Retry policy the Engine wraps around EngineConfig.planner with
withRetry. { max } re-runs the planner up to max times while
validation recommends a retry (max is a non-negative integer). false
(or { max: 0 }) runs the planner once; the Engine still heals and
validates the candidate. Use false for planners that retry their own
steps. Default { max: 1 }. See the README’s Retry section for the full
policy.
validatePlan?
Section titled “validatePlan?”
readonlyoptionalvalidatePlan?:PlanValidator
Defined in: packages/engine/src/lib/config.ts:34
Optional synchronous check of application requirements on the healed response.
Issues use the configured retry budget. Unresolved issues return a
ValidationError on validatePlan, including when retries are disabled.
Without this hook, the existing healing and retry policy is unchanged.