Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Version `0.1.x` contains the converged foundation layer:
- streamed tool-call recovery checks for missing required arguments.
- LLM binding, response normalization, streaming assembly/watchdogs, retry
classification, runaway recovery, and physical-call orchestration.
- model profiles, thinking/history normalization, and multi-format tool-call
parsing;
- parallel tool execution and the complete agent-loop orchestration engine,
with product behavior isolated behind typed hooks.

The initial extraction is based on the already-merged integration branches:

Expand All @@ -32,10 +36,10 @@ The initial extraction is based on the already-merged integration branches:
Those revisions are provenance, not runtime dependencies. AgentCore tests and
builds without either product checkout.

The agent loop remains in the products until tool execution, model profiles,
tool-call parsing, and execution-context storage have converged boundaries.
The LLM runtime accepts the three remaining product decisions through explicit
hooks: wall-deadline lookup, provider-chain state, and sticky-session policy.
The shared loop accepts product decisions through explicit hooks. Products own
execution-context storage, endpoint registries, metering, deadline policy,
result spilling and aggregate budgets; they no longer need private copies of
the orchestration or parsing engines.

## Repository boundary

Expand Down Expand Up @@ -115,7 +119,8 @@ edit both products' core copies, that is evidence it belongs here.
classification, and explicit product hooks are shared.
3. **LLM runtime** (complete): binding, calls, streaming, response
normalization, runaway recovery, and the public `llm_client` facade.
4. **Agent loop:** model/tool parsing, tool execution, and `agent_loop`.
4. **Agent loop** (complete in AgentCore): model/tool parsing, hook-driven tool
execution, and `agent_loop` orchestration.
5. Remove product compatibility facades after downstream imports have moved to
`agent_core`.

Expand Down
29 changes: 29 additions & 0 deletions agent_core/runtime/loop/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Shared loop foundation primitives."""

from agent_core.runtime.loop.agent_loop import AgentLoopHooks, run_agent_loop
from agent_core.runtime.loop.compact import (
DefaultCompactionPolicy,
DefaultMessageCompactor,
Expand Down Expand Up @@ -28,28 +29,56 @@
NullTrimmer,
TaskBoundaryTrimmer,
)
from agent_core.runtime.loop.model_profile import (
DefaultThinkingParser,
HistoryPolicy,
ModelProfile,
NativeMessageNormalizer,
configure_model_registry,
)
from agent_core.runtime.loop.tool_call_parser import (
DefaultToolCallParser,
MultiFormatToolCallParser,
)
from agent_core.runtime.loop.tool_exec import (
DefaultToolResultPostProcessor,
ToolExecutionHooks,
execute_tools,
)

__all__ = [
"RUNAWAY_STATE_KEY",
"TRUNCATION_CONTINUATION_GUIDANCE",
"AgentLoopHooks",
"DefaultCompactionPolicy",
"DefaultMessageCompactor",
"DefaultThinkingParser",
"DefaultToolCallParser",
"DefaultToolResultPostProcessor",
"HistoryPolicy",
"LLMCallExhausted",
"LLMDeadlineExceeded",
"LLMReasoningRunaway",
"LLMStreamStalled",
"MessageTrimmer",
"ModelProfile",
"MultiFormatToolCallParser",
"NativeMessageNormalizer",
"NullTrimmer",
"TaskBoundaryTrimmer",
"ThinkTagSplitter",
"ToolExecutionHooks",
"bind_max_tokens",
"bind_session_id",
"bind_temperature",
"bind_tools",
"call_llm",
"configure_model_registry",
"execute_tools",
"extract_final_content",
"extract_leaked_reasoning",
"extract_model_name",
"extract_usage",
"is_truncated_with_text",
"run_agent_loop",
]
Loading