# karitselmuthu/enterprise-agent-engineering-evaluation architecture

> Architecture diagram of the GitHub repository karitselmuthu/enterprise-agent-engineering-evaluation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karitselmuthu/enterprise-agent-engineering-evaluation
- Repository: https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation

## Overview

This repository is an offline-first enterprise IT-operations agent framework, with a CLI investigation workflow: receive an incident request, plan and run permitted observation tools, assemble evidence, and return an answer. Replay and optional live simulation supply incident, metric, and log observations. Separate capabilities cover MCP tools, runbook retrieval, memory, context budgeting, coding experiments, skills, and agent evaluation. The graph follows documented capabilities and sampled calls; unsampled branches are included where the README identifies them, with uncertain wiring omitted.

Main entry points: [`src/mcp/client.py`](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/mcp/client.py) (MCP client agent), [`src/agents/investigation.py`](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/agents/investigation.py) (Investigation agent), [`simulation/state_manager.py`](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/state_manager.py) (Replay state), [`src/evaluation/runner.py`](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/runner.py) (Evaluation runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_investigation["Incident investigation"]
  node_cli["Agent CLI<br/>[run_agent.py]"]
  node_investigator["Investigation agent<br/>[investigation.py]"]
  node_agent_state["Run state<br/>[state.py]"]
  node_tool_execution["Tool execution<br/>[executor.py]"]
  node_tool_registry["Tool registry<br/>[registry.py]"]
  node_policy["Policy gate<br/>[engine.py]"]
  node_evidence[("Evidence store<br/>[store.py]")]
end

subgraph group_simulation["Simulation data"]
  node_replay_state["Replay state<br/>[state_manager.py]"]
  node_replay_engine["Replay engine<br/>[engine.py]"]
  node_scenario_loader["Scenario loader<br/>[scenario_loader.py]"]
  node_replay_adapters["Replay tool adapters<br/>[tools.py]"]
  node_event_generation["Event generation<br/>[event_generator.py]"]
  node_log_import["Public log importer<br/>[public_logs.py]"]
  node_live_demo["Live demo service<br/>[service.py]"]
end

subgraph group_agent_support["Agent support"]
  node_mcp_client["MCP client agent<br/>[client.py]"]
  node_mcp_server["MCP tool server<br/>[server.py]"]
  node_llm["LLM backends<br/>[base.py]"]
  node_memory["Investigation memory<br/>[agent.py]"]
  node_retrieval["Runbook retrieval<br/>[retriever.py]"]
  node_context["Context manager<br/>[manager.py]"]
end

subgraph group_extensions["Agent extensions"]
  node_coding_agent["Coding agent<br/>[code_agent.py]"]
  node_sandbox["Code sandbox<br/>[sandbox.py]"]
  node_skills["Skills execution<br/>[executor.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluation_runner["Evaluation runner<br/>[runner.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_judge["LLM judge<br/>[llm_judge.py]"]
  node_benchmarks["Benchmarks and probes<br/>[benchmarks.py]"]
end

node_operator(("CLI operator"))
node_ollama(("Local Ollama service"))
node_mcp_host(("MCP host"))

node_operator -->|"starts investigation"| node_cli
node_cli -.->|"runs agent"| node_investigator
node_investigator -.->|"executes tools"| node_tool_execution
node_investigator -->|"records progress"| node_agent_state
node_investigator -->|"stores evidence"| node_evidence
node_tool_execution -->|"looks up tools"| node_tool_registry
node_tool_execution -->|"authorizes calls"| node_policy
node_replay_state -->|"creates snapshot"| node_replay_engine
node_replay_state -->|"builds tools"| node_replay_adapters
node_replay_adapters -->|"registers observations"| node_replay_engine
node_replay_engine -->|"uses scenarios"| node_scenario_loader
node_cli -.->|"selects replay"| node_replay_state
node_event_generation -.->|"generates scenarios"| node_scenario_loader
node_log_import -.->|"supplies observations"| node_replay_state
node_live_demo -.->|"serves live observations"| node_mcp_client
node_mcp_host -.->|"hosts client"| node_mcp_client
node_mcp_client -->|"discovers and calls"| node_mcp_server
node_mcp_client -->|"selects and interprets"| node_llm
node_mcp_server -.->|"reads infrastructure"| node_tool_registry
node_memory -->|"uses run state"| node_agent_state
node_memory -->|"uses MCP"| node_mcp_client
node_retrieval -.->|"supplies runbooks"| node_context
node_context -->|"supports context agent"| node_retrieval
node_coding_agent -.->|"runs code"| node_sandbox
node_skills -->|"invokes tools"| node_mcp_client
node_evaluation_runner -.->|"computes metrics"| node_metrics
node_evaluation_runner -.->|"optionally assesses"| node_judge
node_evaluation_runner -.->|"evaluates benchmarks"| node_benchmarks
node_judge -->|"requests scoring"| node_ollama

click node_cli "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/scripts/run_agent.py"
click node_investigator "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/agents/investigation.py"
click node_agent_state "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/agents/state.py"
click node_tool_execution "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/tools/executor.py"
click node_tool_registry "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/tools/registry.py"
click node_policy "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/policy/engine.py"
click node_evidence "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evidence/store.py"
click node_replay_state "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/state_manager.py"
click node_replay_engine "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/engine.py"
click node_scenario_loader "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/scenario_loader.py"
click node_replay_adapters "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/adapters/tools.py"
click node_event_generation "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/event_generator.py"
click node_log_import "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/importers/public_logs.py"
click node_live_demo "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/live_stack/service.py"
click node_mcp_client "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/mcp/client.py"
click node_mcp_server "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/mcp/server.py"
click node_llm "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/llm/base.py"
click node_memory "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/memory/agent.py"
click node_retrieval "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/retrieval/retriever.py"
click node_context "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/context/manager.py"
click node_coding_agent "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/coding_agents/code_agent.py"
click node_sandbox "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/coding_agents/sandbox.py"
click node_skills "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/skills/executor.py"
click node_evaluation_runner "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/runner.py"
click node_metrics "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/metrics.py"
click node_judge "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/llm_judge.py"
click node_benchmarks "https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/benchmarks.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_investigator,node_agent_state,node_tool_execution,node_tool_registry,node_policy,node_evidence toneBlue
class node_replay_state,node_replay_engine,node_scenario_loader,node_replay_adapters,node_event_generation,node_log_import,node_live_demo toneAmber
class node_mcp_client,node_mcp_server,node_llm,node_memory,node_retrieval,node_context toneMint
class node_coding_agent,node_sandbox,node_skills toneRose
class node_evaluation_runner,node_metrics,node_judge,node_benchmarks,node_operator,node_ollama,node_mcp_host toneIndigo
```

## Components

### Incident investigation

- [Agent CLI](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/scripts/run_agent.py): `scripts/run_agent.py`
- [Investigation agent](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/agents/investigation.py): `src/agents/investigation.py`
- [Run state](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/agents/state.py): `src/agents/state.py`
- [Tool execution](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/tools/executor.py): `src/tools/executor.py`
- [Tool registry](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/tools/registry.py): `src/tools/registry.py`
- [Policy gate](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/policy/engine.py): `src/policy/engine.py`
- [Evidence store](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evidence/store.py): `src/evidence/store.py`

### Simulation data

- [Replay state](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/state_manager.py): `simulation/state_manager.py`
- [Replay engine](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/engine.py): `simulation/engine.py`
- [Scenario loader](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/scenario_loader.py): `simulation/scenario_loader.py`
- [Replay tool adapters](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/adapters/tools.py): `simulation/adapters/tools.py`
- [Event generation](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/event_generator.py): `simulation/event_generator.py`
- [Public log importer](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/importers/public_logs.py): `simulation/importers/public_logs.py`
- [Live demo service](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/simulation/live_stack/service.py): `simulation/live_stack/service.py`

### Agent support

- [MCP client agent](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/mcp/client.py): `src/mcp/client.py`
- [MCP tool server](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/mcp/server.py): `src/mcp/server.py`
- [LLM backends](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/llm/base.py): `src/llm/base.py`
- [Investigation memory](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/memory/agent.py): `src/memory/agent.py`
- [Runbook retrieval](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/retrieval/retriever.py): `src/retrieval/retriever.py`
- [Context manager](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/context/manager.py): `src/context/manager.py`

### Agent extensions

- [Coding agent](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/coding_agents/code_agent.py): `src/coding_agents/code_agent.py`
- [Code sandbox](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/coding_agents/sandbox.py): `src/coding_agents/sandbox.py`
- [Skills execution](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/skills/executor.py): `src/skills/executor.py`

### Evaluation

- [Evaluation runner](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/runner.py): `src/evaluation/runner.py`
- [Evaluation metrics](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/metrics.py): `src/evaluation/metrics.py`
- [LLM judge](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/llm_judge.py): `src/evaluation/llm_judge.py`
- [Benchmarks and probes](https://github.com/karitselmuthu/enterprise-agent-engineering-evaluation/blob/main/src/evaluation/benchmarks.py): `src/evaluation/benchmarks.py`

### Other components

- **CLI operator**
- **Local Ollama service**
- **MCP host**

## Connections

- CLI operator → Agent CLI: starts investigation (evidence: `README.md`)
- Agent CLI → Investigation agent: runs agent
- Investigation agent → Tool execution: executes tools
- Investigation agent → Run state: records progress (evidence: `src/agents/state.py`)
- Investigation agent → Evidence store: stores evidence (evidence: `src/agents/simulation_agent.py`)
- Tool execution → Tool registry: looks up tools (evidence: `src/tools/executor.py`)
- Tool execution → Policy gate: authorizes calls (evidence: `src/tools/executor.py`)
- Replay state → Replay engine: creates snapshot (evidence: `simulation/state_manager.py`)
- Replay state → Replay tool adapters: builds tools (evidence: `simulation/state_manager.py`)
- Replay tool adapters → Replay engine: registers observations (evidence: `simulation/adapters/tools.py`)
- Replay engine → Scenario loader: uses scenarios (evidence: `simulation/engine.py`)
- Agent CLI → Replay state: selects replay
- Event generation → Scenario loader: generates scenarios
- Public log importer → Replay state: supplies observations
- Live demo service → MCP client agent: serves live observations
- MCP host → MCP client agent: hosts client
- MCP client agent → MCP tool server: discovers and calls (evidence: `src/mcp/client.py`)
- MCP client agent → LLM backends: selects and interprets (evidence: `src/mcp/client.py`)
- MCP tool server → Tool registry: reads infrastructure
- Investigation memory → Run state: uses run state (evidence: `src/memory/agent.py`)
- Investigation memory → MCP client agent: uses MCP (evidence: `src/memory/agent.py`)
- Runbook retrieval → Context manager: supplies runbooks
- Context manager → Runbook retrieval: supports context agent (evidence: `src/context/agent.py`)
- Coding agent → Code sandbox: runs code
- Skills execution → MCP client agent: invokes tools (evidence: `src/skills/executor.py`)
- Evaluation runner → Evaluation metrics: computes metrics
- Evaluation runner → LLM judge: optionally assesses
- Evaluation runner → Benchmarks and probes: evaluates benchmarks
- LLM judge → Local Ollama service: requests scoring (evidence: `src/evaluation/llm_judge.py`)
