|
Entropic 2.3.8
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). | |
| 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 223 of file engine_types.h.
| std::string entropic::LoopContext::active_phase = "default" |
Active inference phase.
Definition at line 243 of file engine_types.h.
| std::vector<std::string> entropic::LoopContext::all_tools |
Full tool list as raw JSON strings.
Definition at line 236 of file engine_types.h.
| std::string entropic::LoopContext::base_system |
Base system prompt (pre-tier formatting)
Definition at line 237 of file engine_types.h.
| std::vector<std::string> entropic::LoopContext::child_conversation_ids |
Spawned child IDs.
Definition at line 242 of file engine_types.h.
| int entropic::LoopContext::consecutive_duplicate_attempts = 0 |
Stuck-model detector.
Definition at line 229 of file engine_types.h.
| int entropic::LoopContext::consecutive_errors = 0 |
Error streak counter.
Definition at line 228 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 288 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 275 of file engine_types.h.
| std::string entropic::LoopContext::conversation_id |
Conversation ID for storage (v1.8.8)
Definition at line 234 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 240 of file engine_types.h.
| int entropic::LoopContext::delegation_depth = 0 |
0 = root, 1+ = child
Definition at line 239 of file engine_types.h.
| int entropic::LoopContext::effective_max_iterations = -1 |
Per-identity override (-1 = LoopConfig, P3-18)
Definition at line 247 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 248 of file engine_types.h.
| int entropic::LoopContext::effective_tool_calls = 0 |
Non-blocked calls this iteration.
Definition at line 230 of file engine_types.h.
| bool entropic::LoopContext::has_pending_tool_results = false |
Tool results awaiting presentation.
Definition at line 231 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 280 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 269 of file engine_types.h.
| std::string entropic::LoopContext::locked_tier |
Tier locked for this loop ("" = none)
Definition at line 232 of file engine_types.h.
| std::vector<Message> entropic::LoopContext::messages |
Conversation history.
Definition at line 224 of file engine_types.h.
| std::unordered_map<std::string, std::string> entropic::LoopContext::metadata |
Runtime metadata.
Definition at line 238 of file engine_types.h.
| LoopMetrics entropic::LoopContext::metrics |
Timing and counts.
Definition at line 227 of file engine_types.h.
| std::string entropic::LoopContext::parent_conversation_id |
Parent conv ID (delegation)
Definition at line 241 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 263 of file engine_types.h.
| std::optional<PendingDelegation> entropic::LoopContext::pending_delegation |
Stored by dir_delegate (v1.8.6)
Definition at line 245 of file engine_types.h.
| std::optional<PendingPipeline> entropic::LoopContext::pending_pipeline |
Stored by dir_pipeline (v1.8.6)
Definition at line 246 of file engine_types.h.
| std::vector<ToolCall> entropic::LoopContext::pending_tool_calls |
Pending tool calls (v1.8.5)
Definition at line 225 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 254 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 244 of file engine_types.h.
| std::string entropic::LoopContext::source = "human" |
Message source.
Definition at line 235 of file engine_types.h.
| AgentState entropic::LoopContext::state = AgentState::IDLE |
Current state.
Definition at line 226 of file engine_types.h.
| std::string entropic::LoopContext::task_id |
External task ID (MCP integration)
Definition at line 233 of file engine_types.h.