# Todo 21 EventAgent Context Summary Plan **Status:** done ## Goal Make EventAgent configuration part of tool-parameter generation and send a combined EventAgent result summary into the ChatAgent input queue. ## Why The UI and contracts already expose EventAgent `system_prompt` and `extra_body`, but parameter generation currently only receives event/history. Also, individual tool replies are provider-compatible, but ChatAgent should get a concise aggregate result from EventAgent after all tools in the current event round finish. ## Scope - Add an EventAgent execution context containing history, system prompt, and extra body. - Pass EventAgent config from `DebugRuntime` into `EventAgentRequest`. - Keep individual `tool` replies for Chat Completions compatibility. - Add one aggregate `user` message after tool replies so the next ChatAgent round sees the combined EventAgent result. ## Verification - EventAgent tests prove custom resolvers receive `system_prompt` and `extra_body`. - Runtime tests prove the second ChatAgent round contains tool replies followed by the aggregate summary. - `uv run pytest` passed: 50 tests, 1 existing Starlette deprecation warning. ## Result - Added `ToolExecutionContext` for EventAgent parameter generation. - Passed EventAgent `system_prompt` and `extra_body` from `DebugRuntime` into EventAgent requests. - Kept individual provider-compatible `tool` replies and added one aggregate `EventAgent results` user message for the next ChatAgent round.