|
Entropic 2.14.3
Local-first agentic inference engine
|
Configuration for the agentic loop. More...
#include <entropic/core/engine_types.h>
Public Attributes | |
| int | max_iterations = 15 |
| Max loop iterations before forced stop. | |
| int | max_consecutive_errors = 3 |
| Errors before ERROR state. | |
| int | max_tool_calls_per_turn = 10 |
| Tool calls per iteration (v1.8.5) | |
| int | idle_timeout_seconds = 300 |
| Idle timeout (reserved) | |
| int | context_length = 16384 |
| Context budget for compaction (v2.0.4) | |
| bool | require_plan_for_complex = true |
| Planning gate (reserved) | |
| bool | stream_output = true |
| Stream vs batch generation. | |
| bool | speculative_enabled = false |
gh#110 (v2.9.6): mirrors inference.speculative.enabled from config, plumbed through since core.so has zero dependency on config.so (design rule 2). | |
| bool | delegation_isolation = false |
gh#160 (v2.13.0): mirrors delegation.isolation == sandbox. | |
| bool | auto_approve_tools = false |
| Skip tool approval (v1.8.5) | |
| int | max_consecutive_same_tool = 5 |
| Anti-spiral SOFT threshold: after N consecutive calls of the SAME tool (regardless of arg similarity, since exact-arg duplicates are already handled by recent_tool_calls), the engine populates pending_anti_spiral_warning so the next turn's system reminder tells the model to pivot tools or complete. | |
| int | max_consecutive_same_tool_hard_block = -1 |
| Anti-spiral HARD threshold: when consecutive same-tool calls exceed this, the engine blocks the call BEFORE dispatch and returns a rejected_anti_spiral typed result. | |
| int | max_identical_failures = 3 |
| How many times one EXACT call (tool + sorted arguments) may fail before the engine refuses it pre-dispatch. | |
| int | max_consecutive_failed_delegations = 2 |
| gh#64: cap on N consecutive failed delegations targeting the same tier. | |
| int | max_tool_result_bytes = 16384 |
| Maximum byte length for a single tool's result content before the engine truncates with a "[... truncated, N more
bytes]" tail. | |
| int | message_queue_capacity = 8 |
Capacity of the mid-generation user-message queue surfaced by entropic_queue_user_message. | |
| BudgetMode | budget_mode = BudgetMode::off |
| Thinking-budget gating mode (gh#80, v2.5.0). | |
| int | budget_limit = 0 |
Budget ceiling for the active budget_mode: generated tokens (mode tokens) or wall-clock seconds (mode wall_clock) of tool-call-free generation before the engine first nudges the model to complete, then hard-cuts. | |
Skip tool approval (v1.8.5)
Definition at line 116 of file engine_types.h.
| int entropic::LoopConfig::budget_limit = 0 |
Budget ceiling for the active budget_mode: generated tokens (mode tokens) or wall-clock seconds (mode wall_clock) of tool-call-free generation before the engine first nudges the model to complete, then hard-cuts.
Ignored when budget_mode is off. Must be > 0 to engage. (gh#80, v2.5.0)
Definition at line 185 of file engine_types.h.
| BudgetMode entropic::LoopConfig::budget_mode = BudgetMode::off |
Thinking-budget gating mode (gh#80, v2.5.0).
Default off — opt-in, no behavior change for existing consumers. When tokens or wall_clock, generation that does not emit a tool call is charged against budget_limit; a tool call resets the counter. Applies to all tiers uniformly.
Definition at line 177 of file engine_types.h.
| int entropic::LoopConfig::context_length = 16384 |
Context budget for compaction (v2.0.4)
Definition at line 96 of file engine_types.h.
gh#160 (v2.13.0): mirrors delegation.isolation == sandbox.
Plumbed like speculative_enabled above — core.so has no dependency on config.so. OFF (the default and every shipped release's real behaviour) means no sandbox is created at all, so the snapshot cost gh#160 reported disappears with it.
Definition at line 115 of file engine_types.h.
| int entropic::LoopConfig::idle_timeout_seconds = 300 |
Idle timeout (reserved)
Definition at line 95 of file engine_types.h.
| int entropic::LoopConfig::max_consecutive_errors = 3 |
Errors before ERROR state.
Definition at line 93 of file engine_types.h.
| int entropic::LoopConfig::max_consecutive_failed_delegations = 2 |
gh#64: cap on N consecutive failed delegations targeting the same tier.
When the lead re-delegates to a target that has just failed max_consecutive_failed_delegations times in a row, the engine blocks the call BEFORE dispatching the child loop and pushes a [DELEGATION REJECTED] ... stop retrying message to the lead's context so it pivots or completes. Defaults to 2 — any failure deserves a retry; chronic failures don't. Reset counter on (a) successful delegation, (b) delegation to a different target, or (c) any non-delegation tool call.
Definition at line 156 of file engine_types.h.
| int entropic::LoopConfig::max_consecutive_same_tool = 5 |
Anti-spiral SOFT threshold: after N consecutive calls of the SAME tool (regardless of arg similarity, since exact-arg duplicates are already handled by recent_tool_calls), the engine populates pending_anti_spiral_warning so the next turn's system reminder tells the model to pivot tools or complete.
Advisory only — the engine does NOT block the call. (Demo ask #5, v2.1.0)
Definition at line 124 of file engine_types.h.
| int entropic::LoopConfig::max_consecutive_same_tool_hard_block = -1 |
Anti-spiral HARD threshold: when consecutive same-tool calls exceed this, the engine blocks the call BEFORE dispatch and returns a rejected_anti_spiral typed result.
Negative (default sentinel -1) means derive at config-load time as (max_consecutive_same_tool + 2). Set to a large value to effectively disable the hard block while keeping the soft advisory warning. (#14, v2.1.4)
Definition at line 132 of file engine_types.h.
| int entropic::LoopConfig::max_identical_failures = 3 |
How many times one EXACT call (tool + sorted arguments) may fail before the engine refuses it pre-dispatch.
Distinct from the two thresholds above, which count consecutive calls by tool NAME and so cannot see a single call repeating with identical arguments — and which reset per delegation, since each child gets a fresh LoopContext.
3 tolerates the retry that v1.8.5 deliberately allows (a genuinely transient failure gets a second attempt) and refuses the third. A third identical attempt against an identical error is not a retry, it is a spiral: nothing about the call or the world has changed. (v2.13.0, from the gate's test-e7-delegation timeout)
Definition at line 146 of file engine_types.h.
| int entropic::LoopConfig::max_iterations = 15 |
Max loop iterations before forced stop.
Definition at line 92 of file engine_types.h.
| int entropic::LoopConfig::max_tool_calls_per_turn = 10 |
Tool calls per iteration (v1.8.5)
Definition at line 94 of file engine_types.h.
| int entropic::LoopConfig::max_tool_result_bytes = 16384 |
Maximum byte length for a single tool's result content before the engine truncates with a "[... truncated, N more bytes]" tail.
Single global cap; per-tool overrides not yet supported. 0 disables truncation. Default 16 KB — large enough for typical filesystem.read_file / git.diff returns, small enough that runaway tool output cannot exhaust the context budget alone. (Demo ask #6, v2.1.0)
Definition at line 164 of file engine_types.h.
| int entropic::LoopConfig::message_queue_capacity = 8 |
Capacity of the mid-generation user-message queue surfaced by entropic_queue_user_message.
When the queue is at this depth, additional enqueues return ENTROPIC_ERROR_QUEUE_FULL. (gh#40, v2.1.10)
Definition at line 169 of file engine_types.h.
Planning gate (reserved)
Definition at line 97 of file engine_types.h.
gh#110 (v2.9.6): mirrors inference.speculative.enabled from config, plumbed through since core.so has zero dependency on config.so (design rule 2).
Used only by ResponseGenerator::dispatch_batch_generate to pick the dispatching (speculative-capable) batch entry point over the cancel-aware one when stream_output is false — the cancel-aware generate_cancellable bypasses speculative/MTP routing entirely (see orchestrator.cpp generate(...cancel...) doc comment).
Definition at line 108 of file engine_types.h.
Stream vs batch generation.
Definition at line 98 of file engine_types.h.