todo-17-agent-config-audit-tools.md 1.8 KB

Todo 17 Agent Config, Audit, and Mock Tools Plan

Status: done

Goal

Align ChatAgent/EventAgent config, add extra provider body defaults, default EventAgent to one round, add mock tools, audit events, and backend logger calls.

Design

  • AgentParams becomes the shared model for model, temperature, max tokens, system prompt, and extra_body.
  • EventAgentParams extends shared agent params with enabled tools and max_event_loops, defaulting to one round.
  • OpenAICompatibleChatClient merges extra_body into the request payload.
  • ToolRegistry exposes several mock tools for the UI while still giving ChatAgent name/description-only event tools.
  • DebugRuntime emits audit output events for key pipeline transitions and logs them through logging.

Files

  • Modify: src/agent_lab/application/contracts.py
  • Modify: src/agent_lab/application/runtime.py
  • Modify: src/agent_lab/application/tools.py
  • Modify: src/agent_lab/infrastructure/chat_client.py
  • Modify tests in tests/test_debug_runtime.py, tests/test_websocket_api.py, and tests/test_ws_smoke.py.

Verification

  • Focused backend tests prove:
    • ChatAgent and EventAgent share agent config fields.
    • extra_body is merged into provider payloads.
    • EventAgent defaults to one round.
    • /api/tools exposes multiple mock tools.
    • Runtime emits audit events and logger records key events.
  • Full suite passes.

Result

  • Added shared ChatAgent/EventAgent config fields: system_prompt and default extra_body.
  • Set EventAgent to one event round by default.
  • Added mock_search and mock_ticket to the default tool registry.
  • Added runtime audit output events and logger entries for session, round, event, and EventAgent transitions.
  • Verified with uv run pytest (42 passed, one existing Starlette deprecation warning).