microfoom
API referenceInterfaces

AgentConfig

Interface: AgentConfig

Defined in: packages/microfoom-core/src/config.ts:24

Scoped agent configuration. Every field optional; absence means "inherit".

Properties

PropertyTypeDefault valueDescriptionDefined in
harness?stringundefinedWhich registered harness runs this scope's agent turns. An opaque key into the run's harness registry (resolved at session-open), so the generic core never names a concrete adapter.packages/microfoom-core/src/config.ts:36
maxBudgetUsd?numberundefinedHard ceiling on run cost in USD; exceeding it aborts with FoomtimeBudgetExceededError. Tighten-only across the cascade — a narrower scope can lower it, never raise it. Absent = uncapped.packages/microfoom-core/src/config.ts:86
maxCallDepth?numberundefinedMaximum nesting depth of foom_call re-entry; exceeding it aborts with FoomtimeCallDepthError. Tighten-only. Absent = uncapped.packages/microfoom-core/src/config.ts:92
maxOutputTokens?numberundefinedHard ceiling on output tokens; exceeding it aborts with FoomtimeTokenLimitExceededError. Tighten-only. Absent = uncapped.packages/microfoom-core/src/config.ts:89
maxTurnDuration?DurationundefinedWall-clock ceiling on a single turn (a Duration like "30s"); exceeding it aborts with FoomtimeTimeoutError. Tighten-only. Absent = uncapped.packages/microfoom-core/src/config.ts:96
model?stringundefinedModel id the agent runs on, as "provider/id" (e.g. "openrouter/deepseek/deepseek-v4-flash"). Opaque to the core — the harness resolves it. No built-in default: a turn with no model in any scope is a FoomtimeConfigError.packages/microfoom-core/src/config.ts:32
omitHarnessBasePrompt?booleanundefinedDrop the harness's OWN base system prompt for this scope's turns — send the model only microfoom's prompt (the runtime block + this config's AgentConfig.systemPrompt), not the adapter's persona/project context. Overrides the harness adapter's construction default; absent = inherit it. Session-scoped: like AgentConfig.systemPrompt, it is frozen when a stateful session opens and re-applied verbatim to every turn (a later scope can't drift it); a stateless turn opens a fresh session, so it varies per turn.packages/microfoom-core/src/config.ts:57
plugins?readonly string[]undefinedThe plugins the harness loads this scope (pi calls these "extensions"; opaque names). Same tri-state + session timing as AgentConfig.skills.packages/microfoom-core/src/config.ts:49
repairAttempts?number3Consecutive validation failures tolerated before the turn gives up with FoomtimeRepairExhaustedError. Each bad foom_call/foom_return is fed back to the model as a repair hint and counts toward this budget.packages/microfoom-core/src/config.ts:73
retries?number0 (no retry)How many times to re-run a turn that fails with a transient harness error (FoomtimeHarnessUnavailableError — provider/network failure, model overloaded, no result produced). The model's own in-turn tool repair and a deliberate FoomtimeHarnessRejectedError or foom_throw are NOT retried; schema-validation failures use AgentConfig.repairAttempts instead.packages/microfoom-core/src/config.ts:68
skills?readonly string[]undefinedThe skills the harness advertises to the model this scope (opaque names the harness resolves). undefined = all the harness discovers; [] = none; a list = only those. Session-level for a stateful session (fixed at open); per-scope for stateless turns (each opens a fresh session).packages/microfoom-core/src/config.ts:46
systemPrompt?SystemPromptundefinedThis scope's contribution to the system prompt. SystemPrompt is either { append } (accumulates onto wider scopes) or { replace } (discards them and becomes the new base). Session-scoped: the composed result is frozen when a stateful session opens and re-applied to every turn — a per-turn .with() that sets it on a session handle is a FoomtimeConfigError; vary it by opening a new session() or via a stateless turn (which opens a fresh session each).packages/microfoom-core/src/config.ts:81
thinking?ThinkingLevelundefinedReasoning effort for the turn. One of the known ThinkingLevels, or a provider-specific raw string passed through untouched. Absent = inherit (and, at the widest scope, whatever the harness/model defaults to).packages/microfoom-core/src/config.ts:61
tools?readonly string[]undefinedThe harness tools the model may use this scope (opaque names the harness resolves; core never enumerates them). undefined = all the harness offers; [] = none; a list = only those. The FOOM protocol tools are always available regardless — this gates only the harness's own tools, per turn.packages/microfoom-core/src/config.ts:41

On this page