|
Entropic 2.9.4
Local-first agentic inference engine
|
Mutable state carried through the agentic loop. More...
#include <entropic/core/engine_types.h>

Public Attributes | |
| std::vector< Message > | messages |
| Conversation history. | |
| std::vector< ToolCall > | pending_tool_calls |
| Pending tool calls (v1.8.5) | |
| AgentState | state = AgentState::IDLE |
| Current state. | |
| LoopMetrics | metrics |
| Timing and counts. | |
| int | consecutive_errors = 0 |
| Error streak counter. | |
| int | consecutive_duplicate_attempts = 0 |
| Stuck-model detector. | |
| int | effective_tool_calls = 0 |
| Non-blocked calls this iteration. | |
| bool | has_pending_tool_results = false |
| Tool results awaiting presentation. | |
| std::string | locked_tier |
| Tier locked for this loop ("" = none) | |
| std::string | task_id |
| External task ID (MCP integration) | |
| std::string | conversation_id |
| Conversation ID for storage (v1.8.8) | |
| std::string | source = "human" |
| Message source. | |
| std::vector< std::string > | all_tools |
| Full tool list as raw JSON strings. | |
| std::string | base_system |
| Base system prompt (pre-tier formatting) | |
| std::unordered_map< std::string, std::string > | metadata |
| Runtime metadata. | |
| int | delegation_depth = 0 |
| 0 = root, 1+ = child | |
| std::vector< std::string > | delegation_ancestor_tiers |
| Tier stack from root to this loop (P1-9, 2.0.6-rc16) | |
| std::string | parent_conversation_id |
| Parent conv ID (delegation) | |
| std::vector< std::string > | child_conversation_ids |
| Spawned child IDs. | |
| std::string | active_phase = "default" |
| Active inference phase. | |
| std::unordered_map< std::string, std::string > | recent_tool_calls |
| Duplicate detection cache (v1.8.5) | |
| std::optional< PendingDelegation > | pending_delegation |
| Stored by dir_delegate (v1.8.6) | |
| std::optional< PendingPipeline > | pending_pipeline |
| Stored by dir_pipeline (v1.8.6) | |
| int | effective_max_iterations = -1 |
| Per-identity override (-1 = LoopConfig, P3-18) | |
| int | effective_max_tool_calls_per_turn = -1 |
| Per-identity override (-1 = LoopConfig, P3-18) | |
| std::string | pending_validation_feedback |
| One-shot reminder text consumed by the next per-turn system prompt assembly. | |
| std::string | pending_anti_spiral_warning |
| One-shot anti-spiral reminder for the next per-turn system prompt. | |
| std::string | last_tool_name |
| Name of the most recently dispatched tool. | |
| int | consecutive_same_tool_calls = 0 |
| Count of CONSECUTIVE successful calls to the same tool (last_tool_name). | |
| int | budget_tokens_since_tool = 0 |
gh#80 (v2.5.0): tokens generated since the last tool call (mode tokens). | |
| double | budget_window_start_s = 0.0 |
gh#80 (v2.5.0): wall-clock epoch-seconds marking the start of the current tool-call-free window (mode wall_clock). | |
| bool | budget_completion_nudged = false |
| gh#80 (v2.5.0): true once the engine has emitted the "emit completion now" nudge for the current budget window. | |
| std::string | last_failed_delegation_target |
| gh#64: target tier of the most recent FAILED delegation (DelegationResult.success == false). | |
| int | consecutive_failed_delegations = 0 |
| gh#64: count of consecutive failed delegations against last_failed_delegation_target. | |
Mutable state carried through the agentic loop.
All mutable loop state lives here. The engine itself is stateless between run() calls (except context_anchors which persist).
Definition at line 256 of file engine_types.h.
| std::string entropic::LoopContext::active_phase = "default" |
Active inference phase.
Definition at line 276 of file engine_types.h.
| std::vector<std::string> entropic::LoopContext::all_tools |
Full tool list as raw JSON strings.
Definition at line 269 of file engine_types.h.
| std::string entropic::LoopContext::base_system |
Base system prompt (pre-tier formatting)
Definition at line 270 of file engine_types.h.
| bool entropic::LoopContext::budget_completion_nudged = false |
gh#80 (v2.5.0): true once the engine has emitted the "emit completion now" nudge for the current budget window.
The next exhaustion without a tool call escalates to a hard cut. Reset to false on any tool call.
Definition at line 327 of file engine_types.h.
| int entropic::LoopContext::budget_tokens_since_tool = 0 |
gh#80 (v2.5.0): tokens generated since the last tool call (mode tokens).
Reset to 0 whenever a tool call is dispatched.
Definition at line 313 of file engine_types.h.
| double entropic::LoopContext::budget_window_start_s = 0.0 |
gh#80 (v2.5.0): wall-clock epoch-seconds marking the start of the current tool-call-free window (mode wall_clock).
0.0 means "no open window" — set on the first tool-call-free generation, reset to 0.0 on any tool call.
Definition at line 320 of file engine_types.h.
| std::vector<std::string> entropic::LoopContext::child_conversation_ids |
Spawned child IDs.
Definition at line 275 of file engine_types.h.
| int entropic::LoopContext::consecutive_duplicate_attempts = 0 |
Stuck-model detector.
Definition at line 262 of file engine_types.h.
| int entropic::LoopContext::consecutive_errors = 0 |
Error streak counter.
Definition at line 261 of file engine_types.h.
| int entropic::LoopContext::consecutive_failed_delegations = 0 |
gh#64: count of consecutive failed delegations against last_failed_delegation_target.
Reset on success or target switch (intentionally NOT reset on a non-delegation tool call — if a lead reads files between two attempts at the same failing target, we still want to enforce the cap). Compared against LoopConfig::max_consecutive_failed_delegations.
Definition at line 340 of file engine_types.h.
| int entropic::LoopContext::consecutive_same_tool_calls = 0 |
Count of CONSECUTIVE successful calls to the same tool (last_tool_name).
Reset to 0 when a different tool runs. Compared against LoopConfig::max_consecutive_same_tool. (Demo ask #5, v2.1.0)
Definition at line 308 of file engine_types.h.
| std::string entropic::LoopContext::conversation_id |
Conversation ID for storage (v1.8.8)
Definition at line 267 of file engine_types.h.
| std::vector<std::string> entropic::LoopContext::delegation_ancestor_tiers |
Tier stack from root to this loop (P1-9, 2.0.6-rc16)
Definition at line 273 of file engine_types.h.
| int entropic::LoopContext::delegation_depth = 0 |
0 = root, 1+ = child
Definition at line 272 of file engine_types.h.
| int entropic::LoopContext::effective_max_iterations = -1 |
Per-identity override (-1 = LoopConfig, P3-18)
Definition at line 280 of file engine_types.h.
| int entropic::LoopContext::effective_max_tool_calls_per_turn = -1 |
Per-identity override (-1 = LoopConfig, P3-18)
Definition at line 281 of file engine_types.h.
| int entropic::LoopContext::effective_tool_calls = 0 |
Non-blocked calls this iteration.
Definition at line 263 of file engine_types.h.
| bool entropic::LoopContext::has_pending_tool_results = false |
Tool results awaiting presentation.
Definition at line 264 of file engine_types.h.
| std::string entropic::LoopContext::last_failed_delegation_target |
gh#64: target tier of the most recent FAILED delegation (DelegationResult.success == false).
Empty when last delegation succeeded, no delegation has run, or a non-delegation tool ran.
Definition at line 332 of file engine_types.h.
| std::string entropic::LoopContext::last_tool_name |
Name of the most recently dispatched tool.
Used to detect runs of the same tool for the anti-spiral primitive. Reset to "" when a different tool runs. (Demo ask #5, v2.1.0)
Definition at line 302 of file engine_types.h.
| std::string entropic::LoopContext::locked_tier |
Tier locked for this loop ("" = none)
Definition at line 265 of file engine_types.h.
| std::vector<Message> entropic::LoopContext::messages |
Conversation history.
Definition at line 257 of file engine_types.h.
| std::unordered_map<std::string, std::string> entropic::LoopContext::metadata |
Runtime metadata.
Definition at line 271 of file engine_types.h.
| LoopMetrics entropic::LoopContext::metrics |
Timing and counts.
Definition at line 260 of file engine_types.h.
| std::string entropic::LoopContext::parent_conversation_id |
Parent conv ID (delegation)
Definition at line 274 of file engine_types.h.
| std::string entropic::LoopContext::pending_anti_spiral_warning |
One-shot anti-spiral reminder for the next per-turn system prompt.
Populated by ToolExecutor when consecutive_same_tool_calls reaches LoopConfig .max_consecutive_same_tool; ResponseGenerator emits as a "[engine] anti-spiral: <tool> called N times consecutively; pivot or complete next turn." line; engine clears post-emit. (Demo ask #5, v2.1.0)
Definition at line 296 of file engine_types.h.
| std::optional<PendingDelegation> entropic::LoopContext::pending_delegation |
Stored by dir_delegate (v1.8.6)
Definition at line 278 of file engine_types.h.
| std::optional<PendingPipeline> entropic::LoopContext::pending_pipeline |
Stored by dir_pipeline (v1.8.6)
Definition at line 279 of file engine_types.h.
| std::vector<ToolCall> entropic::LoopContext::pending_tool_calls |
Pending tool calls (v1.8.5)
Definition at line 258 of file engine_types.h.
| std::string entropic::LoopContext::pending_validation_feedback |
One-shot reminder text consumed by the next per-turn system prompt assembly.
Engine populates after a rejected validation; ResponseGenerator emits as a "[engine] previous turn rejected: …" line and the engine clears it post-emit. (Demo ask #2, v2.1.0)
Definition at line 287 of file engine_types.h.
| std::unordered_map<std::string, std::string> entropic::LoopContext::recent_tool_calls |
Duplicate detection cache (v1.8.5)
Definition at line 277 of file engine_types.h.
| std::string entropic::LoopContext::source = "human" |
Message source.
Definition at line 268 of file engine_types.h.
| AgentState entropic::LoopContext::state = AgentState::IDLE |
Current state.
Definition at line 259 of file engine_types.h.
| std::string entropic::LoopContext::task_id |
External task ID (MCP integration)
Definition at line 266 of file engine_types.h.