Skip to content
PentAGI
Concepts

Memory and knowledge

How PentAGI remembers commands, results and relationships across a flow.

PentAGI keeps three kinds of memory so agents can build on earlier work instead of starting from scratch.

MemoryWhere it livesWhat it holds
Long-termPostgreSQL with pgvectorEmbeddings of results, successful approaches and tool knowledge
WorkingFlow contextThe current goal, task state and available resources
EpisodicCommand historyPast actions, their outcomes and patterns that worked

Every command and its output is stored in PostgreSQL. Agents query the vector store for similar cases before acting, and write their findings back — the memorist and searcher agents do most of this lookup work.

Knowledge graph (optional)

With the knowledge graph stack enabled, PentAGI sends agent responses and tool executions to Graphiti on Neo4j. With the ingest rules of the .env template, it extracts entities and relationships — hosts, services, vulnerabilities, techniques and how they relate over time — from terminal and file operations, and keeps the other events searchable without extraction.

GRAPHITI_ENABLED=true
GRAPHITI_URL=http://graphiti:8000
GRAPHITI_CONFIG_DIR=llm_configs
GRAPHITI_LLM_CLIENT_TYPE=openai
NEO4J_URI=bolt://neo4j:7687
NEO4J_PASSWORD=replace_with_a_strong_password
git clone --depth 1 https://github.com/vxcontrol/pentagi.git pentagi-src
cp -r pentagi-src/examples/graphiti ./graphiti
cp -r pentagi-src/examples/neo4j ./neo4j
rm -rf pentagi-src
curl -O https://raw.githubusercontent.com/vxcontrol/pentagi/main/docker-compose-graphiti.yml
docker compose -f docker-compose.yml -f docker-compose-graphiti.yml up -d

Graphiti runs its own model: GRAPHITI_LLM_CLIENT_TYPE picks the preset — openai, gemini, litellm or custom — whose models are set in ./graphiti/<preset>.yaml, and the matching key comes from .env (OPEN_AI_KEY for openai). An .env from before 2.2.0 lacks these lines and the GRAPHITI_INGEST_* rules: copy them from the current .env.example.

Graphiti is a beta integration and is off by default. Recall is scoped to the active flow; the bundled Graphiti API has no authentication, so keep it and Neo4j on a private network. Extraction and embeddings are billed separately from the flow's own model.

PentAGI checks Graphiti only when it starts, for a few seconds. If Graphiti is not ready by then, PentAGI logs a warning and runs without the knowledge graph until its next restart, so once Graphiti reports healthy, run docker restart pentagi.

Last updated on