How vxcontrol/pentagi works
PentAGI is a self-hosted autonomous penetration-testing platform with a web console and interactive installer. Its principal workflow starts with a user-defined target and goal, coordinates specialist AI agents, gathers intelligence and executes security tools in an isolated Docker sandbox, retains findings for later flows, and produces reports. The graph also preserves documented API, provider, knowledge-graph, observability, and file-manager capabilities. Backend implementation excerpts were not supplied, so backend relationships below rely on README statements; UI file-manager relationships use the indexed source references and excerpts.
Main entry points: agent_for_chain.go Specialist agents · flow_manager.go Flow orchestration · app.tsx Web console · file-manager.tsx File manager
Components 23
Web interface
- Web console
frontend/src/app.tsx - File manager
frontend/src/components/shared/file-manager/file-manager.tsx - File manager helpers
frontend/src/components/shared/file-manager/file-manager-row.tsx - View preferences
frontend/src/lib/view-options-storage.ts
API and persistence
- REST and GraphQL API
backend/pkg/server/router.go - Authentication
backend/pkg/server/auth/auth_middleware.go - Domain services
backend/pkg/server/services - PostgreSQL memory
backend/pkg/database/database.go
Agent execution
- Flow orchestration
backend/pkg/tools/flow_manager.go - Specialist agents
backend/pkg/providers/agent_for_chain.go - LLM providers
backend/pkg/providers/providers.go - Docker sandbox
backend/pkg/docker/sandbox.go - Pentest tools
backend/pkg/tools/registry.go
Research and memory
- Web intelligence
backend/pkg/tools/web_search.go - Search integrations
backend/pkg/tools/searchers/searchers.go - Long-term memory
backend/pkg/tools/memory.go - Knowledge graph
backend/pkg/graphiti/client.go - Findings and reports
backend/pkg/controller/flow_finish.go
Deployment and monitoring
- Interactive installer
backend/cmd/installer/main.go - Monitoring and tracing
backend/pkg/observability/obs.go
Other components
- Security engineer
- External LLM and search services
- Docker runtime
Connections 24
- Security engineer → Web console: sets target
- Web console → REST and GraphQL API: uses APIs
- REST and GraphQL API → Authentication: authenticates
- REST and GraphQL API → Domain services: routes requests
- Domain services → PostgreSQL memory: persists results
- Domain services → Flow orchestration: starts flows
- Flow orchestration → Specialist agents: coordinates
- Specialist agents → LLM providers: requests completions
- Specialist agents → Pentest tools: executes tools
- Pentest tools → Docker sandbox: runs isolated
- Docker sandbox → Docker runtime: uses runtime
- Specialist agents → Web intelligence: gathers intelligence
- Web intelligence → Search integrations: queries providers
- Specialist agents → Long-term memory: retains findings
- Long-term memory → PostgreSQL memory: stores vectors
- Specialist agents → Knowledge graph: tracks relationships
- Flow orchestration → Findings and reports: produces findings
- Security engineer → Interactive installer: configures deployment
- Flow orchestration → Monitoring and tracing: emits telemetry
- External LLM and search services → LLM providers: provides models
- External LLM and search services → Search integrations: provides search
- Web console → File manager: renders routes
- File manager → File manager helpers: renders rows
frontend/src/components/shared/file-manager/file-manager.tsx - File manager → View preferences: stores preferences