# Architecture

> Les services exécutés par PentAGI, leur mode de communication et les composants optionnels.

PentAGI est un ensemble de services Docker. La pile principale suffit pour exécuter des [flows](https://pentagi.com/fr/docs/glossary/#flow) ; le [knowledge graph](https://pentagi.com/fr/docs/glossary/#knowledge-graph) et les piles d'observabilité sont des extensions optionnelles.

## [Contexte système](https://pentagi.com/fr/docs/concepts/architecture/#system-context)

```mermaid
flowchart LR
  accTitle: System context of PentAGI with its users, targets, LLM providers, search engines, monitoring and the update server
  user["Security engineer"] -->|HTTPS| pentagi["PentAGI"]
  user -->|monitors| langfuse["Langfuse"]
  user -->|monitors| grafana["Grafana"]
  pentagi -->|tests| target["Target systems"]
  pentagi -->|queries| llm["LLM providers"]
  pentagi -->|searches| search["Search engines"]
  pentagi -->|reports| langfuse
  pentagi -->|reports| grafana
  pentagi -->|checks for updates| update["update.pentagi.com"]
```

Dans les deux minutes suivant le démarrage, puis toutes les trois heures, PentAGI vérifie également `update.pentagi.com` pour une version plus récente et envoie un résumé de l’installation avec la requête ; [Vérification des mises à jour](https://pentagi.com/fr/docs/configuration/security/#update-check) indique ce qu’elle contient et comment la désactiver.

## [Services](https://pentagi.com/fr/docs/concepts/architecture/#services)

| Groupe                | Services                                                                                                                                                               | Fichier Compose                    |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| Principal             | `pentagi` (backend Go avec REST et GraphQL, interface React), `pgvector` (PostgreSQL avec pgvector), `pgexporter` (métriques PostgreSQL), `scraper` (navigateur isolé) | `docker-compose.yml`               |
| Knowledge graph       | `graphiti`, `neo4j`                                                                                                                                                    | `docker-compose-graphiti.yml`      |
| Observabilité LLM     | `langfuse-web`, `langfuse-worker`, `clickhouse`, `redis`, `minio`, `postgres`                                                                                          | `docker-compose-langfuse.yml`      |
| Observabilité système | `grafana`, `otel`, `victoriametrics`, `jaeger`, `clickstore`, `loki`, `node-exporter`, `cadvisor`                                                                      | `docker-compose-observability.yml` |

Les [tools](https://pentagi.com/fr/docs/glossary/#tool) ne s'exécutent jamais dans le conteneur `pentagi` lui-même : chaque flow dispose de son propre conteneur en [sandbox](https://pentagi.com/fr/docs/glossary/#sandbox), construit à partir d'une image choisie pour l'objectif du flow, telle que Kali Linux.

## [Conteneurs](https://pentagi.com/fr/docs/concepts/architecture/#containers)

```mermaid
graph TB
  accTitle: Containers of the core stack and the optional knowledge graph
  subgraph Core
    UI[Web UI] -->|HTTP/WS| API[Backend API]
    API --> DB[(PostgreSQL + pgvector)]
    API --> Agents[Agents]
    Agents --> Sandbox[Sandboxed tools]
    Agents --> Scraper[Isolated browser]
  end
  subgraph Knowledge graph
    Graphiti --> Neo4j[(Neo4j)]
  end
  Agents --> Graphiti
  API -->|telemetry| OTEL[OpenTelemetry]
  API -->|LLM traces| Langfuse
```

* **Backend API** — Go, avec REST, GraphQL et accès par jeton Bearer pour l’automatisation.
* **Vector Store** — PostgreSQL avec pgvector conserve chaque commande, sortie et embedding.
* **Agents** — le système multi-agents qui planifie et exécute le travail ; voir [Agents](https://pentagi.com/fr/docs/concepts/agents/).
* **Sandbox** — conteneurs de tool isolés de l'hôte ; en production, ils peuvent résider sur un [worker node](https://pentagi.com/fr/docs/deployment/worker-node/) séparé.