# luchng31/autogdb-agent architecture

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

- Interactive diagram: https://gitdiagram.com/luchng31/autogdb-agent
- Repository: https://github.com/luchng31/autogdb-agent

## Overview

AutoGDB Agent is a plugin-based debugging assistant. Its primary workflow is a user starting a CLI debugging session, providing a target or command, and receiving debugging or analysis output. The README also documents protocol sending, extensible debugger and analyzer plugins, workflows, and report formats. Edges reflect the sampled CLI, session, plugin, analyzer, and protocol behavior plus explicitly documented component roles; unsampled implementations limit finer-grained wiring.

Main entry points: [`src/autogdb_agent/core/session.py`](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/session.py) (Debug Session), [`src/autogdb_agent/core/agent.py`](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/agent.py) (Agent), [`src/autogdb_agent/core/plugin_manager.py`](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/plugin_manager.py) (Plugin Manager), [`src/autogdb_agent/cli.py`](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/cli.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Entry"]
  node_cli["CLI<br/>[cli.py]"]
end

subgraph group_coordination["Agent Coordination"]
  node_agent["Agent<br/>[agent.py]"]
  node_session["Debug Session<br/>[session.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_registry["Tool Registry<br/>[tool_registry.py]"]
  node_runner["Tool Runner<br/>[tool_runner.py]"]
  node_plugin_manager["Plugin Manager<br/>[plugin_manager.py]"]
  node_workflow["Debug Workflows"]
end

subgraph group_debugging["Debugging Tools"]
  node_debugger["Debugger Tool<br/>[debugger.py]"]
  node_analyzer["Crash Analysis<br/>[analyzer.py]"]
  node_memory["Memory Inspector"]
  node_disassembler["Disassembler<br/>[disassembler.py]"]
  node_stack["Stack Trace<br/>[stack_trace.py]"]
  node_protocol_sender["Protocol Sender<br/>[protocol_sender.py]"]
  node_reports["Debug Reports"]
end

subgraph group_extensions["Plugins And Protocols"]
  node_debugger_plugin["GDB Plugin<br/>[gdb_plugin.py]"]
  node_crash_plugin["Crash Analyzer Plugin"]
  node_protocol_plugins["Protocol Plugins"]
end

node_user(("Engineer"))
node_debug_target(("Debug Target"))
node_protocol_target(("Protocol Endpoint"))
node_debugger_process["Debugger Process"]

node_user -->|"enters commands"| node_cli
node_cli -->|"starts and queries"| node_agent
node_agent -->|"loads settings"| node_config
node_agent -->|"creates sessions"| node_session
node_session -->|"gets debugger plugins"| node_plugin_manager
node_session -->|"executes commands"| node_registry
node_registry -->|"dispatches tools"| node_runner
node_plugin_manager -->|"loads plugins"| node_debugger_plugin
node_plugin_manager -->|"loads plugins"| node_crash_plugin
node_debugger_plugin -->|"executes with"| node_debugger
node_crash_plugin -->|"executes with"| node_analyzer
node_debugger -->|"controls"| node_debugger_process
node_debugger_process -->|"debugs"| node_debug_target
node_protocol_sender -.->|"sends through"| node_protocol_plugins
node_protocol_plugins -->|"exchanges data"| node_protocol_target
node_session -.->|"supports workflows"| node_workflow
node_analyzer -.->|"formats analysis"| node_reports
node_stack -->|"formats traces"| node_reports

click node_cli "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/cli.py"
click node_agent "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/agent.py"
click node_session "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/session.py"
click node_config "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/config.py"
click node_registry "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/tool_registry.py"
click node_runner "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/tool_runner.py"
click node_plugin_manager "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/plugin_manager.py"
click node_debugger_plugin "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/plugins/debuggers/gdb_plugin.py"
click node_crash_plugin "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/plugins/analyzers/crash_analyzer_plugin.py"
click node_debugger "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/debugger.py"
click node_analyzer "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/analyzer.py"
click node_memory "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/memory_inspector.py"
click node_disassembler "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/disassembler.py"
click node_stack "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/stack_trace.py"
click node_protocol_sender "https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/protocol_sender.py"
click node_protocol_plugins "https://github.com/luchng31/autogdb-agent/tree/main/plugins/protocols"
click node_workflow "https://github.com/luchng31/autogdb-agent/tree/main/src/autogdb_agent/core"
click node_reports "https://github.com/luchng31/autogdb-agent/tree/main/src/autogdb_agent/tools"

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 toneBlue
class node_agent,node_session,node_config,node_registry,node_runner,node_plugin_manager,node_workflow toneAmber
class node_debugger,node_analyzer,node_memory,node_disassembler,node_stack,node_protocol_sender,node_reports toneMint
class node_debugger_plugin,node_crash_plugin,node_protocol_plugins toneRose
class node_user,node_debug_target,node_protocol_target,node_debugger_process toneIndigo
```

## Components

### User Entry

- [CLI](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/cli.py): `src/autogdb_agent/cli.py`

### Agent Coordination

- [Agent](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/agent.py): `src/autogdb_agent/core/agent.py`
- [Debug Session](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/session.py): `src/autogdb_agent/core/session.py`
- [Configuration](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/config.py): `src/autogdb_agent/core/config.py`
- [Tool Registry](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/tool_registry.py): `src/autogdb_agent/core/tool_registry.py`
- [Tool Runner](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/tool_runner.py): `src/autogdb_agent/core/tool_runner.py`
- [Plugin Manager](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/core/plugin_manager.py): `src/autogdb_agent/core/plugin_manager.py`
- [Debug Workflows](https://github.com/luchng31/autogdb-agent/tree/main/src/autogdb_agent/core): `src/autogdb_agent/core`

### Debugging Tools

- [Debugger Tool](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/debugger.py): `src/autogdb_agent/tools/debugger.py`
- [Crash Analysis](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/analyzer.py): `src/autogdb_agent/tools/analyzer.py`
- [Memory Inspector](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/memory_inspector.py): `src/autogdb_agent/tools/memory_inspector.py`
- [Disassembler](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/disassembler.py): `src/autogdb_agent/tools/disassembler.py`
- [Stack Trace](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/stack_trace.py): `src/autogdb_agent/tools/stack_trace.py`
- [Protocol Sender](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/tools/protocol_sender.py): `src/autogdb_agent/tools/protocol_sender.py`
- [Debug Reports](https://github.com/luchng31/autogdb-agent/tree/main/src/autogdb_agent/tools): `src/autogdb_agent/tools`

### Plugins And Protocols

- [GDB Plugin](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/plugins/debuggers/gdb_plugin.py): `src/autogdb_agent/plugins/debuggers/gdb_plugin.py`
- [Crash Analyzer Plugin](https://github.com/luchng31/autogdb-agent/blob/main/src/autogdb_agent/plugins/analyzers/crash_analyzer_plugin.py): `src/autogdb_agent/plugins/analyzers/crash_analyzer_plugin.py`
- [Protocol Plugins](https://github.com/luchng31/autogdb-agent/tree/main/plugins/protocols): `plugins/protocols`

### Other components

- **Engineer**
- **Debug Target**
- **Protocol Endpoint**
- **Debugger Process**

## Connections

- Engineer → CLI: enters commands
- CLI → Agent: starts and queries
- Agent → Configuration: loads settings
- Agent → Debug Session: creates sessions
- Debug Session → Plugin Manager: gets debugger plugins
- Debug Session → Tool Registry: executes commands
- Tool Registry → Tool Runner: dispatches tools
- Plugin Manager → GDB Plugin: loads plugins
- Plugin Manager → Crash Analyzer Plugin: loads plugins
- GDB Plugin → Debugger Tool: executes with
- Crash Analyzer Plugin → Crash Analysis: executes with
- Debugger Tool → Debugger Process: controls
- Debugger Process → Debug Target: debugs
- Protocol Sender → Protocol Plugins: sends through
- Protocol Plugins → Protocol Endpoint: exchanges data
- Debug Session → Debug Workflows: supports workflows
- Crash Analysis → Debug Reports: formats analysis
- Stack Trace → Debug Reports: formats traces
