feat(agent): implement tool-use orchestration loop
Description
Implement the orchestration loop that detects tool calls in the LLM response, executes them via the MCP Connector, and feeds the results back into the inference engine for the final response. This is the core "reason → act → observe" cycle that enables agentic tool use.
Why
Without this loop, the LLM can receive tool definitions but the harness cannot act on the tool call requests the LLM generates. This is the missing piece that wires inference → MCP execution → final synthesis together.
Scope
Depends on: #8, #15
feat(agent): implement tool-use orchestration loop
Description
Implement the orchestration loop that detects tool calls in the LLM response, executes them via the MCP Connector, and feeds the results back into the inference engine for the final response. This is the core "reason → act → observe" cycle that enables agentic tool use.
Why
Without this loop, the LLM can receive tool definitions but the harness cannot act on the tool call requests the LLM generates. This is the missing piece that wires inference → MCP execution → final synthesis together.
Scope
tool_callsfield toCompletionResulttype to capture structured tool invocation requests from the LLMfinish_reason == "tool_calls"and route to MCP Connector for executiontools/callrequestDepends on: #8, #15