# chelmooz/projet-jarvis architecture

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

- Interactive diagram: https://gitdiagram.com/chelmooz/projet-jarvis
- Repository: https://github.com/chelmooz/projet-jarvis

## Overview

JARVIS is an offline, portable, multi-agent assistant exposed through a local web/API interface. The documented request path is web client → FastAPI → agent graph/orchestration → model selection and inference → local Ollama, with conversation persistence. Separate branches cover configurable pipelines and their adaptive RAG feedback loop, document/wiki ingestion and vector knowledge, specialized agents, and system diagnostics. The graph combines README statements with indexed references and shown excerpts; unsampled subsystems are represented only where the README documents their role, so some internal links are omitted.

Main entry points: [`controllers/router.py`](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/router.py) (FastAPI API), [`services/pipeline.py`](https://github.com/chelmooz/projet-jarvis/blob/main/services/pipeline.py) (Pipeline engine), [`services/orchestrator.py`](https://github.com/chelmooz/projet-jarvis/blob/main/services/orchestrator.py) (Request orchestrator), [`graph/agent_graph.py`](https://github.com/chelmooz/projet-jarvis/blob/main/graph/agent_graph.py) (Agent graph)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web and API"]
  node_web["Web UI"]
  node_api["FastAPI API<br/>[router.py]"]
  node_jarvis_route["Chat endpoint<br/>[jarvis.py]"]
  node_pipeline_route["Pipeline endpoint<br/>[pipelines.py]"]
  node_documents_route["Document upload<br/>[documents.py]"]
  node_conversations_route["Conversation API<br/>[conversations.py]"]
  node_app_context["Dependency assembly<br/>[di.py]"]
end

subgraph group_agents["Agent Runtime"]
  node_agent_graph["Agent graph<br/>[agent_graph.py]"]
  node_pipeline_steps["Agent steps<br/>[pipeline_steps.py]"]
  node_supervisor["Agent supervisor<br/>[supervisor.py]"]
  node_agent_factory["Specialized agents<br/>[factory.py]"]
  node_orchestrator["Request orchestrator<br/>[orchestrator.py]"]
end

subgraph group_knowledge["Knowledge and RAG"]
  node_pipeline_engine["Pipeline engine<br/>[pipeline.py]"]
  node_rag_judge["RAG judge<br/>[rag_judge.py]"]
  node_trace_store[("Execution traces<br/>[trace_sidecar.py]")]
  node_vector_service[("Vector memory<br/>[vector.py]")]
  node_wiki_ingest["Wiki ingestion"]
  node_chunker["Text chunker<br/>[chunker.py]"]
  node_conversation_store[("Conversation history<br/>[conversation.py]")]
end

subgraph group_operations["Operations"]
  node_diagnostics["System diagnostics<br/>[service.py]"]
  node_extended_diagnostics["External tool checks<br/>[service.py]"]
end

subgraph group_integration["Local Model Integration"]
  node_selector["Model selector<br/>[selector.py]"]
  node_inference["Inference service<br/>[inference.py]"]
  node_ollama_adapter["Ollama adapter<br/>[ollama_adapter.py]"]
  node_ollama["Local Ollama"]
end

node_user(("User"))

node_user -->|"uses"| node_web
node_web -->|"calls"| node_api
node_api -->|"routes to"| node_jarvis_route
node_api -->|"routes to"| node_pipeline_route
node_api -->|"routes to"| node_documents_route
node_api -->|"routes to"| node_conversations_route
node_jarvis_route -->|"invokes"| node_orchestrator
node_pipeline_route -->|"runs"| node_pipeline_engine
node_api -->|"assembles"| node_app_context
node_app_context -->|"wires"| node_agent_graph
node_orchestrator -.->|"dispatches"| node_agent_graph
node_agent_graph -->|"uses"| node_supervisor
node_agent_graph -->|"executes"| node_pipeline_steps
node_pipeline_steps -.->|"selects agent"| node_agent_factory
node_orchestrator -->|"resolves model"| node_selector
node_selector -->|"selects for"| node_inference
node_inference -.->|"delegates to"| node_ollama_adapter
node_ollama_adapter -->|"generates with"| node_ollama
node_orchestrator -->|"persists conversation"| node_conversation_store
node_pipeline_engine -->|"runs steps"| node_pipeline_steps
node_pipeline_engine -->|"evaluates response"| node_rag_judge
node_pipeline_engine -->|"capitalizes trace"| node_trace_store
node_pipeline_engine -->|"searches and updates"| node_vector_service
node_documents_route -.->|"ingests documents"| node_wiki_ingest
node_wiki_ingest -->|"chunks text"| node_chunker
node_wiki_ingest -->|"indexes documents"| node_vector_service
node_api -.->|"exposes diagnostics"| node_diagnostics
node_api -.->|"exposes tools"| node_extended_diagnostics

click node_web "https://github.com/chelmooz/projet-jarvis/tree/main/static"
click node_api "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/router.py"
click node_jarvis_route "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/jarvis.py"
click node_pipeline_route "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/pipelines.py"
click node_documents_route "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/documents.py"
click node_conversations_route "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/conversations.py"
click node_app_context "https://github.com/chelmooz/projet-jarvis/blob/main/controllers/di.py"
click node_agent_graph "https://github.com/chelmooz/projet-jarvis/blob/main/graph/agent_graph.py"
click node_pipeline_steps "https://github.com/chelmooz/projet-jarvis/blob/main/services/pipeline_steps.py"
click node_supervisor "https://github.com/chelmooz/projet-jarvis/blob/main/agents/supervisor.py"
click node_agent_factory "https://github.com/chelmooz/projet-jarvis/blob/main/agents/factory.py"
click node_orchestrator "https://github.com/chelmooz/projet-jarvis/blob/main/services/orchestrator.py"
click node_pipeline_engine "https://github.com/chelmooz/projet-jarvis/blob/main/services/pipeline.py"
click node_rag_judge "https://github.com/chelmooz/projet-jarvis/blob/main/services/rag_judge.py"
click node_trace_store "https://github.com/chelmooz/projet-jarvis/blob/main/services/trace_sidecar.py"
click node_vector_service "https://github.com/chelmooz/projet-jarvis/blob/main/services/vector.py"
click node_wiki_ingest "https://github.com/chelmooz/projet-jarvis/blob/main/services/wiki_ingest_service.py"
click node_chunker "https://github.com/chelmooz/projet-jarvis/blob/main/services/chunker.py"
click node_conversation_store "https://github.com/chelmooz/projet-jarvis/blob/main/services/conversation.py"
click node_diagnostics "https://github.com/chelmooz/projet-jarvis/blob/main/services/diagnostics/service.py"
click node_extended_diagnostics "https://github.com/chelmooz/projet-jarvis/blob/main/services/diagnostic_ext/service.py"
click node_selector "https://github.com/chelmooz/projet-jarvis/blob/main/services/selector.py"
click node_inference "https://github.com/chelmooz/projet-jarvis/blob/main/services/inference.py"
click node_ollama_adapter "https://github.com/chelmooz/projet-jarvis/blob/main/services/adapters/ollama_adapter.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_web,node_api,node_jarvis_route,node_pipeline_route,node_documents_route,node_conversations_route,node_app_context,node_user toneBlue
class node_agent_graph,node_pipeline_steps,node_supervisor,node_agent_factory,node_orchestrator toneAmber
class node_pipeline_engine,node_rag_judge,node_trace_store,node_vector_service,node_wiki_ingest,node_chunker,node_conversation_store toneMint
class node_diagnostics,node_extended_diagnostics toneRose
class node_selector,node_inference,node_ollama_adapter,node_ollama toneIndigo
```

## Components

### Web and API

- [Web UI](https://github.com/chelmooz/projet-jarvis/tree/main/static): `static`
- [FastAPI API](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/router.py): `controllers/router.py`
- [Chat endpoint](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/jarvis.py): `controllers/routes/jarvis.py`
- [Pipeline endpoint](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/pipelines.py): `controllers/routes/pipelines.py`
- [Document upload](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/documents.py): `controllers/routes/documents.py`
- [Conversation API](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/routes/conversations.py): `controllers/routes/conversations.py`
- [Dependency assembly](https://github.com/chelmooz/projet-jarvis/blob/main/controllers/di.py): `controllers/di.py`

### Agent Runtime

- [Agent graph](https://github.com/chelmooz/projet-jarvis/blob/main/graph/agent_graph.py): `graph/agent_graph.py`
- [Agent steps](https://github.com/chelmooz/projet-jarvis/blob/main/services/pipeline_steps.py): `services/pipeline_steps.py`
- [Agent supervisor](https://github.com/chelmooz/projet-jarvis/blob/main/agents/supervisor.py): `agents/supervisor.py`
- [Specialized agents](https://github.com/chelmooz/projet-jarvis/blob/main/agents/factory.py): `agents/factory.py`
- [Request orchestrator](https://github.com/chelmooz/projet-jarvis/blob/main/services/orchestrator.py): `services/orchestrator.py`

### Knowledge and RAG

- [Pipeline engine](https://github.com/chelmooz/projet-jarvis/blob/main/services/pipeline.py): `services/pipeline.py`
- [RAG judge](https://github.com/chelmooz/projet-jarvis/blob/main/services/rag_judge.py): `services/rag_judge.py`
- [Execution traces](https://github.com/chelmooz/projet-jarvis/blob/main/services/trace_sidecar.py): `services/trace_sidecar.py`
- [Vector memory](https://github.com/chelmooz/projet-jarvis/blob/main/services/vector.py): `services/vector.py`
- [Wiki ingestion](https://github.com/chelmooz/projet-jarvis/blob/main/services/wiki_ingest_service.py): `services/wiki_ingest_service.py`
- [Text chunker](https://github.com/chelmooz/projet-jarvis/blob/main/services/chunker.py): `services/chunker.py`
- [Conversation history](https://github.com/chelmooz/projet-jarvis/blob/main/services/conversation.py): `services/conversation.py`

### Operations

- [System diagnostics](https://github.com/chelmooz/projet-jarvis/blob/main/services/diagnostics/service.py): `services/diagnostics/service.py`
- [External tool checks](https://github.com/chelmooz/projet-jarvis/blob/main/services/diagnostic_ext/service.py): `services/diagnostic_ext/service.py`

### Local Model Integration

- [Model selector](https://github.com/chelmooz/projet-jarvis/blob/main/services/selector.py): `services/selector.py`
- [Inference service](https://github.com/chelmooz/projet-jarvis/blob/main/services/inference.py): `services/inference.py`
- [Ollama adapter](https://github.com/chelmooz/projet-jarvis/blob/main/services/adapters/ollama_adapter.py): `services/adapters/ollama_adapter.py`
- **Local Ollama**

### Other components

- **User**

## Connections

- User → Web UI: uses (evidence: `README.md`)
- Web UI → FastAPI API: calls (evidence: `README.md`)
- FastAPI API → Chat endpoint: routes to (evidence: `controllers/router.py`)
- FastAPI API → Pipeline endpoint: routes to (evidence: `controllers/router.py`)
- FastAPI API → Document upload: routes to (evidence: `controllers/router.py`)
- FastAPI API → Conversation API: routes to (evidence: `controllers/router.py`)
- Chat endpoint → Request orchestrator: invokes (evidence: `controllers/routes/jarvis.py`)
- Pipeline endpoint → Pipeline engine: runs (evidence: `controllers/routes/pipelines.py`)
- FastAPI API → Dependency assembly: assembles (evidence: `controllers/router.py`)
- Dependency assembly → Agent graph: wires (evidence: `controllers/di.py`)
- Request orchestrator → Agent graph: dispatches
- Agent graph → Agent supervisor: uses (evidence: `graph/agent_graph.py`)
- Agent graph → Agent steps: executes (evidence: `graph/agent_graph.py`)
- Agent steps → Specialized agents: selects agent
- Request orchestrator → Model selector: resolves model (evidence: `README.md`)
- Model selector → Inference service: selects for (evidence: `README.md`)
- Inference service → Ollama adapter: delegates to
- Ollama adapter → Local Ollama: generates with (evidence: `README.md`)
- Request orchestrator → Conversation history: persists conversation (evidence: `README.md`)
- Pipeline engine → Agent steps: runs steps (evidence: `services/pipeline.py`)
- Pipeline engine → RAG judge: evaluates response (evidence: `services/pipeline.py`)
- Pipeline engine → Execution traces: capitalizes trace (evidence: `README.md`)
- Pipeline engine → Vector memory: searches and updates (evidence: `README.md`)
- Document upload → Wiki ingestion: ingests documents
- Wiki ingestion → Text chunker: chunks text (evidence: `services/wiki_ingest_service.py`)
- Wiki ingestion → Vector memory: indexes documents (evidence: `services/wiki_ingest_service.py`)
- FastAPI API → System diagnostics: exposes diagnostics
- FastAPI API → External tool checks: exposes tools
