# abdelatifaitouche/accounting_agentic_assistant architecture

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

- Interactive diagram: https://gitdiagram.com/abdelatifaitouche/accounting_agentic_assistant
- Repository: https://github.com/abdelatifaitouche/accounting_agentic_assistant

## Overview

This is a financial/accounting assistant presented as an interactive CLI. The main workflow starts with the user entering a request; the CLI passes it to a coordinator, which runs an Agent that calls Claude and returns a response for display. The Agent also supports tool dispatch, but the configured tool registry is empty. The tree includes an HTTP router and a database package, but the router is empty and no database behavior is shown. Source evidence does not establish a working HTTP workflow or storage subsystem.

Main entry points: [`src/features/engine/presentation/cli/cli.py`](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/presentation/cli/cli.py) (Interactive CLI), [`src/features/engine/application/outsourcing_agent.py`](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/application/outsourcing_agent.py) (Assistant coordinator), [`main.py`](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/main.py) (Mode selector), [`src/ai/agent.py`](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/ai/agent.py) (Agent loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_main["Mode selector<br/>[main.py]"]
  node_cli["Interactive CLI<br/>[cli.py]"]
end

subgraph group_application["Application"]
  node_coordinator["Assistant coordinator"]
end

subgraph group_ai_integration["AI integration"]
  node_agent["Agent loop<br/>[agent.py]"]
  node_claude_client["Claude client factory<br/>[claude_client.py]"]
end

node_user(("User"))
node_claude_api{{"Anthropic Claude API"}}

node_user -->|"selects mode"| node_main
node_main -->|"starts CLI"| node_cli
node_user -->|"enters request"| node_cli
node_cli -->|"submits request"| node_coordinator
node_coordinator -->|"runs agent"| node_agent
node_coordinator -->|"gets client"| node_claude_client
node_agent -->|"requests completion"| node_claude_api
node_claude_client -->|"creates API client"| node_claude_api
node_cli -->|"prints response"| node_user

click node_main "https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/main.py"
click node_cli "https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/presentation/cli/cli.py"
click node_coordinator "https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/application/outsourcing_agent.py"
click node_agent "https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/ai/agent.py"
click node_claude_client "https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/infra/llm/claude_client.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_main,node_cli,node_user toneBlue
class node_coordinator toneAmber
class node_agent,node_claude_client,node_claude_api toneMint
```

## Components

### Presentation

- [Mode selector](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/main.py): `main.py`
- [Interactive CLI](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/presentation/cli/cli.py): `src/features/engine/presentation/cli/cli.py`

### Application

- [Assistant coordinator](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/features/engine/application/outsourcing_agent.py): `src/features/engine/application/outsourcing_agent.py`

### AI integration

- [Agent loop](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/ai/agent.py): `src/ai/agent.py`
- [Claude client factory](https://github.com/abdelatifaitouche/accounting_agentic_assistant/blob/main/src/infra/llm/claude_client.py): `src/infra/llm/claude_client.py`

### Other components

- **User**
- **Anthropic Claude API**

## Connections

- User → Mode selector: selects mode (evidence: `main.py`)
- Mode selector → Interactive CLI: starts CLI (evidence: `main.py`)
- User → Interactive CLI: enters request (evidence: `src/features/engine/presentation/cli/cli.py`)
- Interactive CLI → Assistant coordinator: submits request (evidence: `src/features/engine/presentation/cli/cli.py`)
- Assistant coordinator → Agent loop: runs agent (evidence: `src/features/engine/application/outsourcing_agent.py`)
- Assistant coordinator → Claude client factory: gets client (evidence: `src/features/engine/application/outsourcing_agent.py`)
- Agent loop → Anthropic Claude API: requests completion (evidence: `src/ai/agent.py`)
- Claude client factory → Anthropic Claude API: creates API client (evidence: `src/infra/llm/claude_client.py`)
- Interactive CLI → User: prints response (evidence: `src/features/engine/presentation/cli/cli.py`)
