pentagi

vxcontrolMIT活跃维护

一套完全自主的 AI Agent 系统,能自动完成复杂的渗透测试任务,用多智能体编排把攻击性安全测试流程跑通。

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

v2.2.0发布于 2026-10-05 06:59 UTC33,820star +185 / 7 天5,309fork同步于 2026-11-10 05:20 UTC

怎么上手

由 README 提炼,执行前请确认
mkdir -p pentagi && cd pentagi
wget -O installer.zip https://pentagi.com/downloads/linux/amd64/installer-latest.zip
unzip installer.zip
./installer
硬件要求按 README 说明

README 要求 Docker 与 Docker Compose(或 Podman)、至少 2 vCPU、4GB 内存、20GB 空闲磁盘;未提及 GPU 或显存要求,模型可走云端 API 或 Ollama/vLLM 本地部署。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

自托管多智能体渗透测试系统,用自然语言描述目标即可自动规划并执行测试

一套完全自主的 AI Agent 系统,能自动完成复杂的渗透测试任务,用多智能体编排把攻击性安全测试流程跑通。

核心能力

  • 多智能体分工规划并执行渗透测试任务
  • 在隔离 Docker 沙箱内调用 nmap、Metasploit、sqlmap 等 20+ 工具
  • 用 PostgreSQL+pgvector 长期存储研究结果与成功打法
  • 可选 Neo4j 知识图谱追踪主机、服务与发现
  • 提供 REST 与 GraphQL API 便于自动化集成

容易踩的坑

安装器需访问 Docker socket,普通用户要加入 docker 组或用 sudo 运行;LLM 的 API Key、端点等凭据仍需在服务端通过环境变量或配置文件设置,Web 界面管不了;macOS 可能把下载的安装器误报为恶意软件,需按官方排障文档处理。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.2.0
  1. v2.2.02.2.0最新正式版2026-10-05 · 2026-10-05 06:59 UTC

    PentAGI 2.2 — Any Modern LLM, a Contained Sandbox, Unified Web Search, and Multi-Instance Deployment

    This release supports the current generation of LLMs with a tested configuration for every provider, closes CVE-2026-14784 with rebuilt sandbox isolation, replaces seven search tools with one intent-driven web_search, and lets several installations share one set of backing services.

    Discord⠀Telegram

    To get an Enterprise Edition license, sign up at console.pentagi.com — new users get one free license there.


    Major Features

    Any Modern LLM, With a Tested Configuration

    LangChainGo moves from v0.1.14-update.5 to update.8, and PentAGI supports the current model generations without workarounds.

    • Reasoning the way each vendor expects it — adaptive thinking, effort levels, thinking budgets, and a real "off" are sent in each model family's native form. Combinations a vendor would reject are caught or redirected before the request instead of coming back as a 400, signed reasoning replays intact across agent turns, and Settings offers only the controls the selected model honors.
    • Three new providers — MiniMax, Mistral, and xAI, for 13 provider types in total. Any other OpenAI-compatible endpoint works through the custom provider, which now also calls Azure OpenAI deployments (LLM_SERVER_API_TYPE=azure).
    • Tested, not just listed — every built-in provider, plus example configurations for OpenRouter, DeepInfra, Ollama Cloud, self-hosted vLLM, and others, ships with a ctester report in examples/tests/ giving the success rate per agent role.
    • Current catalogues — GPT-6, Claude Opus 5.x and Fable 5.x, Gemini 3.x, Qwen 3.8, GLM 5.3, DeepSeek V4, and Grok 4.7, with prices checked against vendor pages. Agent chains are compacted to the model's known context window before each call.
    • Provider failover — LLM_FALLBACK_PROVIDER repeats a failed model call on a second configured provider and records the switch in the trace.
    • Anthropic without a long-lived key — Workload Identity Federation exchanges a Kubernetes, GitHub Actions, or other OIDC token for a short-lived Claude token.
    Sandbox Security and CVE-2026-14784

    CVE-2026-14784 affects PentAGI up to 2.1.0: with DOCKER_INSIDE=true, as the shipped .env.example set it, the host Docker socket was mounted into every sandbox, so an agent steered by prompt injection could take over the host. Prompt injection cannot be closed completely — resistance depends largely on the model's instruction following and generalization — so this release concentrates on containing whatever runs in the sandbox.

    • Least privilege — worker containers drop every capability and add back an explicit allow-list: MKNOD is withheld (the main known escape path), SYS_PTRACE is added for debuggers, and a process limit guards against fork bombs.
    • No host socket — DOCKER_INSIDE defaults to false, and nested Docker now requires DOCKER_INSIDE_HOST, a daemon separate from the one running PentAGI. The host socket is no longer mounted automatically.
    • Startup attestation — with DOCKER_INSIDE_POLICY_TESTS=true, PentAGI launches a worker exactly as a flow would and verifies from inside it that the daemon is not its own, 27 host-escape requests are refused, and 7 legitimate operations work. If a check fails, agents get no Docker access and PentAGI keeps running.
    • Hardened worker node — the worker node guide ships a Docker-in-Docker kit: a fail-closed OPA policy, a sec
  2. v2.1.02.1.02026-05-29 · 2026-05-29 18:25 UTC
    查看更新说明

    PentAGI 2.1 — File Management, Knowledge Base, ToolCall Observability, and Assistant Flow Control

    This release adds a complete file management layer (user resource libraries and flow workspace files with container sync), a first-class Knowledge Base with semantic search and anonymization, real-time ToolCall logging, and assistant tools to monitor and steer running flows. It also refreshes model configurations across OpenAI, Anthropic, Gemini, DeepSeek, Qwen, Kimi, and GLM, a broad frontend modernization pass (React 19, Apollo Client v4, Vite 8), and a wide range of stability and security fixes.

    Discord⠀Telegram


    Major Features

    User Resources & Flow Files

    A new file management layer lets users bring their own files into PentAGI and share them with agents.

    • User Resources — a persistent, per-user file library with MD5-deduplicated storage and a virtual path filesystem. Full REST and GraphQL CRUD (upload, mkdir, move, copy, delete, download), real-time subscriptions, and atomic multi-source / multi-path batch operations.
    • Flow files — per-flow workspace files that sync into worker containers at /work/uploads and /work/resources. Files can be pulled back out of a running container and promoted into the user library. Attached files are injected into agent system prompts as a structured <task_files> block, so the assistant is aware of what the user provided.
    • File Manager UI — a reusable tree component with multi-select, keyboard navigation, drag-and-drop, sortable columns, bulk actions, and an overwrite workflow. Used by both the new /resources page and the flow Files tab.
    • Limits and hardening — enforced on both ends: 300 MB per file, 1000 files per request, 2 GB total, 255-byte names. Upload paths are protected against directory traversal and symlink escapes.
    Knowledge Base Management

    The pgvector memory store is now a first-class, user-manageable resource rather than agent-only auto-storage.

    • GraphQL/REST CRUD plus semantic search over the knowledge store, with admin/user scoping, per-user document ownership, re-embedding on update, and real-time subscriptions.
    • A new /knowledges interface with list and detail pages, a TipTap markdown editor, partial updates, inline rename/delete, and a collapsible semantic-search input (hotkey-accessible).
    • Text anonymization — a new anonymizeText service (GraphQL/REST) to scrub sensitive data, surfaced directly in the knowledge editor.
    • The vector search engine was rewritten onto direct, parameterized SQL queries — fixing a bug where document IDs were dropped and removing unsafe SQL string interpolation.
    ToolCall Observability

    Individual agent tool calls are now logged through a dedicated provider and exposed via GraphQL queries and subscriptions plus a REST API, giving real-time, inspectable visibility into every command, search, and action an agent performs during a flow.

    Assistant Flow Management

    The interactive assistant can now observe and steer active flows without leaving the chat. New tools let the assistant read flow status (with multiple detail levels), stop a flow, submit input to a waiting flow, patch subtasks, and block until a task completes. A summarizer cache avoids redundant LLM calls when reporting flow state.

    Unified Agent Language Policy

    A single, consistent language policy now spans all agent prompts: vector-store and search-engine queries are forced to English for retrieval consistency, while user-facing messages follow the engagement language. Template variables and tool access were aligned with each agent's actual runtime tool set.


    New Capabiliti

  3. v2.0.02.0.02026-04-11 · 2026-04-11 22:10 UTC
    查看更新说明

    PentAGI 2.0 — Broader Model Support, Analytics, Runtime Flexibility, and Agent Guardrails

    This release expands the LLM provider ecosystem with four new providers, introduces a full analytics dashboard, enables runtime provider switching mid-flow, adds Docker host network mode for OOB attack scenarios, and ships a comprehensive set of stability and reliability improvements. It also includes significant test coverage expansion across the backend codebase.

    Discord⠀Telegram


    Major Features

    Four New LLM Providers: DeepSeek, GLM, Kimi, Qwen

    Native support for four providers from the Chinese LLM ecosystem — DeepSeek, GLM (Zhipu AI), Kimi (Moonshot AI), and Qwen (Alibaba Cloud). Each is available through the standard provider configuration interface with API key and server URL environment variables (DEEPSEEK_API_KEY, GLM_API_KEY, KIMI_API_KEY, QWEN_API_KEY). All four providers are registered in the GraphQL schema and settings UI, and come with pre-configured model lists and pricing information. Unit test coverage for all four providers is included (~71% coverage per provider).

    Ollama Cloud Support

    In addition to local Ollama deployments, PentAGI now ships a pre-built ollama-cloud.provider.yml configuration with 7 cloud-hosted models assigned per agent type: nemotron-3-super, qwen3-coder-next, glm-5, minimax-m2.7, qwen3.5:397b, and devstral-2:123b. Both Free Tier and Paid Tier setup options are documented. The configuration is bundled in the Docker image at /opt/pentagi/conf/ollama-cloud.provider.yml.

    Analytics Dashboards

    A new analytics dashboard surfaces usage statistics and cost data collected from the REST API analytics endpoints introduced in v1.2.0. The dashboard shows:

    • Token usage and cost breakdown per flow and per agent type (primary, pentester, coder, installer, searcher, adviser, etc.)
    • Cache hit rates and cache read/write cost separation for Anthropic and Gemini providers
    • Tool call frequency and execution time metrics per flow and subtask
    • Per-model cost detail, useful when running multiple provider configurations simultaneously
    Runtime Provider Switching

    It is now possible to switch the active LLM provider for a running flow without restarting the application. To switch providers: pause the flow using the stop button, navigate to provider settings to change the active provider or update configuration, then resume the flow with a message directing the agent. The backend applies conditional chain normalization to preserve the reasoning cache when the provider is unchanged, and converts tool call IDs when switching providers. The modelProvider parameter has been added to the relevant GraphQL mutations to support this workflow.

    Agent Supervision System (Beta)

    Two optional supervision mechanisms are now available and disabled by default:

    • AGENT_PLANNING_STEP_ENABLED=true — enables a planning step before each specialist agent starts work, where a planner generates a 3–7 step execution plan to scope the subtask and prevent drift.
    • EXECUTION_MONITOR_ENABLED=true — enables automatic detection of unproductive agent behavior: consecutive identical tool calls (EXECUTION_MONITOR_SAME_TOOL_LIMIT, default 5) and excessive exploration (EXECUTION_MONITOR_TOTAL_TOOL_LIMIT, default 10) trigger automatic mentor intervention to redirect the agent.
    Reworked Langfuse Observability

    The Langfuse integration has been significantly overhauled for clearer visualization of agent activity. Observation types are now separated into Spans, Generations, Agents, Tools, Chains, Retrievers, Evaluators, Embeddings, and Guardrails. Each agent's tool call

  4. v1.2.01.2.02026-02-25 · 2026-02-25 16:26 UTC
    查看更新说明

    🚀 PentAGI 1.2 - Enhanced AI Capabilities! Major upgrade bringing latest reasoning models, token caching, comprehensive analytics, and REST API access for seamless integration with automation platforms.

    Discord⠀Telegram


    🎯 Major Features

    🧠 Latest Reasoning Models Support - Complete integration of cutting-edge AI models with native reasoning capabilities:

    • Gemini 2.5/3.0 family with thinking tokens support
    • Anthropic Claude Sonnet 4+ with extended reasoning
    • DeepSeek R1 and Kimi K2.5 in reasoning mode
    • OpenAI o-series models with signature thoughts
    • OpenRouter and OpenAI-compatible endpoints with reasoning content preservation

    💰 Token Caching & Cost Optimization - Intelligent prompt caching reduces input token costs by 40-70% in multi-turn agent conversations:

    • Native caching support for Anthropic (ephemeral cache controls) and Gemini (pre-created content caching)
    • Automatic cache hit tracking with detailed analytics
    • Particularly effective for long-context penetration testing sessions
    • Standardized cache token reporting across all providers

    📊 Usage Analytics & Monitoring - Comprehensive REST API endpoints for detailed resource utilization tracking:

    • Token usage breakdown by agent type (researcher/developer/executor)
    • Cost analysis with cache read/write separation
    • Execution time metrics per flow and subtask
    • Tool call frequency statistics
    • Foundation for visual analytics dashboard (coming in v1.3)

    🔑 API Token Management - JWT-based API authentication enables programmatic access to PentAGI:

    • Generate and manage API tokens through web interface
    • Full REST and GraphQL API access for automation
    • OpenAPI specifications for client code generation in any language
    • Integration-ready for n8n, OpenClaw, Claude Desktop, and custom solutions
    • Foundation for official MCP server (planned for future releases)

    🔍 Sploitus Integration - Experimental support for vulnerability search engine:

    • Cloudflare-protected service requires IP reputation verification
    • Use built-in ftester utility to check your IP reputation before enabling
    • Configure via SPLOITUS_ENABLED environment variable

    📡 Langfuse v3 Observability - Complete migration to Langfuse v3 standard with enhanced LLM operations tracking:

    • Observation type separation: Spans, Generations, Agents, Tools, Chains, Retrievers, Evaluators, Embeddings, Guardrails
    • Enhanced message chain visualization with Playground mode navigation
    • Detailed Score metrics and execution time logging
    • Improved variable and metadata tracking across all observation types

    🚀 New Features

    • Reasoning Content Preservation: Smart message chain summarization that maintains reasoning signatures for models requiring strict conversation structure
    • Tool Call ID Templates: Configurable tool call ID format enforcement for LLM backends with strict validation requirements
    • User Preferences System: Favorite flows management with persistent preferences storage
    • GraphQL Subscriptions: Real-time flow updates with user-specific event publishing
    • Docker Build Versioning: Embedded version and revision information in container images with dedicated build scripts for Linux/macOS/Windows
    • Enhanced Error Diagnostics: Stop reason included in error messages (e.g., length indicates need to increase max_tokens)
    • PDF Report Generation: Export flow results to PDF using @react-pdf/renderer library
    • User Favorites: Add and manage favorite flows with dedicated GraphQL mutations
    • Podman Support: Official documentation for running PentAGI with Podman in rootless mode

    🎨 UI/UX Improvements

    • **Enh
  5. v1.1.01.1.02026-01-17 · 2026-01-17 23:30 UTC
    查看更新说明

    🔧 Bug Fixes & Improvements

    LiteLLM Passthrough Support

    • Fixed Gemini provider compatibility issues preventing proper LiteLLM integration
    • All providers now support LiteLLM passthrough mode with standardized endpoints:
      • OpenAI: http://litellm:4000/openai/v1
      • Anthropic: http://litellm:4000/anthropic/v1
      • Gemini: http://litellm:4000/gemini
    • Tested and verified with LiteLLM v1.80.11-stable.1
    • Enhanced Gemini provider with custom HTTP transport for API key injection and URL rewriting

    Windows File Path Compatibility

    • Changed file mounting scheme in PentAGI container to resolve Windows path format issues
    • Migrated from host path mapping to fixed container paths for better cross-platform compatibility
    • Updated volume mounts:
      • PENTAGI_LLM_SERVER_CONFIG_PATH → /opt/pentagi/conf/custom.provider.yml
      • PENTAGI_OLLAMA_SERVER_CONFIG_PATH → /opt/pentagi/conf/ollama.provider.yml
      • PENTAGI_DOCKER_CERT_PATH → /opt/pentagi/docker/ssl
    • Migration: Installer v1.0.0 automatically migrates old settings to new schema
    • Users can now specify absolute paths in their host filesystem through installer forms

    Ollama Single Model Configuration

    • Added OLLAMA_SERVER_MODEL environment variable to select a single model for all agents
    • Eliminates need to create custom provider configuration files for simple setups
    • Additional fine-tuning options:
      • OLLAMA_SERVER_PULL_MODELS_ENABLED - Control automatic model downloads (default: false)
      • OLLAMA_SERVER_LOAD_MODELS_ENABLED - Query available models on startup (default: false)
      • OLLAMA_SERVER_PULL_MODELS_TIMEOUT - Timeout for model pulls in seconds (default: 600)
    • Default model: llama3.1:8b-instruct-q8_0

    Installer v1.0.0

    • Bumped installer version to 1.0.0 with comprehensive stability improvements
    • Full Windows support with all configuration scenarios matching Linux and macOS
    • Disabled ANSI formatting in Docker Compose commands on Windows for cleaner console output
    • Automatic settings migration from old path variables to new schema:
      • DOCKER_CERT_PATH → PENTAGI_DOCKER_CERT_PATH
      • LLM_SERVER_CONFIG_PATH → PENTAGI_LLM_SERVER_CONFIG_PATH
      • OLLAMA_SERVER_CONFIG_PATH → PENTAGI_OLLAMA_SERVER_CONFIG_PATH
    • Enhanced error handling and validation throughout installation process
    • Recommended: Download latest installer, run "Apply changes" to migrate to new file mounting scheme, then navigate to Maintenance tab and execute "Update PentAGI" to download the new version that supports these options

    Enhanced Terminal Command Handling

    • Improved agents' understanding of empty results from synchronous terminal commands
    • Enhanced background command processing with asynchronous result capture
    • Introduced quick check timeout for background command execution
    • Clearer feedback on command failures and silent successes
    • More accurate success messages reflecting actual command execution outcomes

    Additional Improvements

    • Fixed nil pointer dereference in Graphiti client methods
    • Enhanced error handling for invalid server and proxy URLs during provider initialization
    • Improved Docker Compose command handling on Windows systems
    • Added comprehensive tests for Gemini API key injection and URL rewriting

    Full Changelog: https://github.com/vxcontrol/pentagi/compare/v1.0.1...v1.1.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    PentAGI

    Join the Community! Connect with security researchers, AI enthusiasts, and fellow ethical hackers. Get support, share insights, and stay updated with the latest PentAGI developments.

    Discord⠀Telegram

    Table of Contents

    Overview

    PentAGI is an open-source, self-hosted multi-agent system for autonomous penetration testing. You describe a target and a goal in plain language; a team of specialized AI agents plans the work, runs 20+ professional tools such as nmap, Metasploit and sqlmap inside an isolated Docker sandbox, remembers what it learned and hands you a report.

    • Who it is for. Security engineers, penetration testers, researchers and red teams who want an autonomous assistant on their own infrastructure, for authorized testing only.
    • What sets it apart. It runs on your own servers with the model of your choice: 10+ cloud LLM providers, your own OpenAI-compatible gateway, or local models through Ollama or vLLM. Results and successful approaches are kept in PostgreSQL with pgvector for later flows, an optional Neo4j knowledge graph tracks hosts, services and findings, execution monitoring and task planning help smaller open models, and REST and GraphQL APIs automate it. PentAGI Enterprise adds agent profiles, plugins and MCP servers, customer-ready reports and a real-time attack-chain view.
    • How to install. An interactive installer for Linux, macOS and Windows sets PentAGI up with Docker Compose — see Quick Start.

    PentAGI is developed by VXControl, a security engineering company based in Dubai.

    You can watch the video PentAGI overview: PentAGI Overview Video

    Features

    • Secure & Isolated. All operations are performed in a sandboxed Docker environment with complete isolation.
    • Fully Autonomous. AI-powered agent that automatically determines and executes penetration testing steps with optional execution monitoring and intelligent task planning for enhanced reliability.
    • Professional Pentesting Tools. Built-in suite of 20+ professional security tools including nmap, metasploit, sqlmap, and more.
    • Smart Memory System. Long-term storage of research results and successful approaches for future use.
    • Optional Knowledge Graph Integration. Graphiti-powered knowledge graph using Neo4j for semantic relationship tracking and advanced context understanding.
    • Web Intelligence. Built-in browser via scraper for gathering latest information from web sources.
    • External Search Systems. Integration with advanced search APIs including Tavily, Firecrawl, Traversaal, Perplexity, DuckDuckGo, Google Custom Search, Sploitus Search and SearXNG for comprehensive information gathering.
    • Team of Specialists. Delegation system with specialized AI agents for research, development, and infrastructure tasks, enhanced with optional execution monitoring and intelligent task planning for optimal performance with smaller models.
    • Comprehensive Monitoring. Detailed logging and integration with Grafana/Prometheus for real-time system observation.
    • Detailed Reporting. Generation of thorough vulnerability reports with exploitation guides.
    • Smart Container Management. Automatic Docker image selection based on specific task requirements.
    • Modern Interface. Clean and intuitive web UI for system management and monitoring.
    • Comprehensive APIs. Full-featured REST and GraphQL APIs with Bearer token authentication for automation and integration.
    • Persistent Storage. All commands and outputs are stored in PostgreSQL with pgvector extension.
    • Scalable Architecture. Microservices-based design supporting horizontal scaling.
    • Self-Hosted Solution. Complete control over your deployment and data.
    • Flexible Authentication. Support for 10+ LLM providers (OpenAI, Anthropic, Google AI/Gemini, AWS Bedrock, Ollama, DeepSeek, GLM, Kimi, Qwen, MiniMax, Mistral, xAI, Custom for any OpenAI-compatible endpoint including Azure OpenAI) plus aggregators (OpenRouter, DeepInfra, Atlas Cloud, OpenCode Go plan). For production local deployments, see our vLLM + Qwen3.5-27B-FP8 guide.
    • API Token Authentication. Secure Bearer token system for programmatic access to REST and GraphQL APIs.
    • Quick Deployment. Easy setup through Docker Compose with comprehensive environment configuration.

    Current Capability Boundaries

    • PentAGI today is an autonomous and assistant-guided penetration testing platform, not a CALDERA-style Breach and Attack Simulation (BAS) or adversary emulation product with predefined campaigns or attack plans.
    • BAS-like agent-authored attack scripts should be treated as conceptual or future work, not as a feature that is implemented today.
    • The current flow report UI supports web view, copy to clipboard, Markdown download, and PDF download. JSON flow-report export is not documented as a supported output format today.
    • Provider flexibility is available today through built-in providers and custom/OpenAI-compatible endpoints. See Custom LLM Provider Configuration and the vLLM + Qwen3.5-27B-FP8 guide.

    Architecture

    System Context

    flowchart TB
        classDef person fill:#08427B,stroke:#073B6F,color:#fff
        classDef system fill:#1168BD,stroke:#0B4884,color:#fff
        classDef external fill:#666666,stroke:#0B4884,color:#fff
    
        pentester["👤 Security Engineer
        (User of the system)"]
    
        pentagi["✨ PentAGI
        (Autonomous penetration testing system)"]
    
        target["🎯 target-system
        (System under test)"]
        llm["🧠 llm-provider
        (OpenAI/Anthropic/Ollama/Bedrock/Gemini/Custom)"]
        search["🔍 search-systems
        (Google/DuckDuckGo/Tavily/Firecrawl/Traversaal/Perplexity/Sploitus/SearXNG)"]
        langfuse["📊 langfuse-ui
        (LLM Observability Dashboard)"]
        grafana["📈 grafana
        (System Monitoring Dashboard)"]
    
        pentester --> |Uses HTTPS| pentagi
        pentester --> |Monitors AI HTTPS| langfuse
        pentester --> |Monitors System HTTPS| grafana
        pentagi --> |Tests Various protocols| target
        pentagi --> |Queries HTTPS| llm
        pentagi --> |Searches HTTPS| search
        pentagi --> |Reports HTTPS| langfuse
        pentagi --> |Reports HTTPS| grafana
    
        class pentester person
        class pentagi system
        class target,llm,search,langfuse,grafana external
    
        linkStyle default stroke:#ffffff,color:#ffffff
    
    graph TB
        subgraph Core Services
            UI[Frontend UI<br/>React + TypeScript]
            API[Backend API<br/>Go + GraphQL]
            DB[(Vector Store<br/>PostgreSQL + pgvector)]
            MQ[Task Queue<br/>Async Processing]
            Agent[AI Agents<br/>Multi-Agent System]
        end
    
        subgraph Knowledge Graph
            Graphiti[Graphiti<br/>Knowledge Graph API]
            Neo4j[(Neo4j<br/>Graph Database)]
        end
    
        subgraph Monitoring
            Grafana[Grafana<br/>Dashboards]
            VictoriaMetrics[VictoriaMetrics<br/>Time-series DB]
            Jaeger[Jaeger<br/>Distributed Tracing]
            Loki[Loki<br/>Log Aggregation]
            OTEL[OpenTelemetry<br/>Data Collection]
        end
    
        subgraph Analytics
            Langfuse[Langfuse<br/>LLM Analytics]
            ClickHouse[ClickHouse<br/>Analytics DB]
            Redis[Redis<br/>Cache + Rate Limiter]
            MinIO[MinIO<br/>S3 Storage]
        end
    
        subgraph Security Tools
            Scraper[Web Scraper<br/>Isolated Browser]
            PenTest[Security Tools<br/>20+ Pro Tools<br/>Sandboxed Execution]
        end
    
        UI --> |HTTP/WS| API
        API --> |SQL| DB
        API --> |Events| MQ
        MQ --> |Tasks| Agent
        Agent --> |Commands| PenTest
        Agent --> |Queries| DB
        Agent --> |Knowledge| Graphiti
        Graphiti --> |Graph| Neo4j
    
        API --> |Telemetry| OTEL
        OTEL --> |Metrics| VictoriaMetrics
        OTEL --> |Traces| Jaeger
        OTEL --> |Logs| Loki
    
        Grafana --> |Query| VictoriaMetrics
        Grafana --> |Query| Jaeger
        Grafana --> |Query| Loki
    
        API --> |Analytics| Langfuse
        Langfuse --> |Store| ClickHouse
        Langfuse --> |Cache| Redis
        Langfuse --> |Files| MinIO
    
        classDef core fill:#f9f,stroke:#333,stroke-width:2px,color:#000
        classDef knowledge fill:#ffa,stroke:#333,stroke-width:2px,color:#000
        classDef monitoring fill:#bbf,stroke:#333,stroke-width:2px,color:#000
        classDef analytics fill:#bfb,stroke:#333,stroke-width:2px,color:#000
        classDef tools fill:#fbb,stroke:#333,stroke-width:2px,color:#000
    
        class UI,API,DB,MQ,Agent core
        class Graphiti,Neo4j knowledge
        class Grafana,VictoriaMetrics,Jaeger,Loki,OTEL monitoring
        class Langfuse,ClickHouse,Redis,MinIO analytics
        class Scraper,PenTest tools
    
    erDiagram
        Flow ||--o{ Task : contains
        Task ||--o{ SubTask : contains
        SubTask ||--o{ Action : contains
        Action ||--o{ Artifact : produces
        Action ||--o{ Memory : stores
    
        Flow {
            string id PK
            string name "Flow name"
            string description "Flow description"
            string status "active/completed/failed"
            json parameters "Flow parameters"
            timestamp created_at
            timestamp updated_at
        }
    
        Task {
            string id PK
            string flow_id FK
            string name "Task name"
            string description "Task description"
            string status "pending/running/done/failed"
            json result "Task results"
            timestamp created_at
            timestamp updated_at
        }
    
        SubTask {
            string id PK
            string task_id FK
            string name "Subtask name"
            string description "Subtask description"
            string status "queued/running/completed/failed"
            string agent_type "researcher/developer/executor"
            json context "Agent context"
            timestamp created_at
            timestamp updated_at
        }
    
        Action {
            string id PK
            string subtask_id FK
            string type "command/search/analyze/etc"
            string status "success/failure"
            json parameters "Action parameters"
            json result "Action results"
            timestamp created_at
        }
    
        Artifact {
            string id PK
            string action_id FK
            string type "file/report/log"
            string path "Storage path"
            json metadata "Additional info"
            timestamp created_at
        }
    
        Memory {
            string id PK
            string action_id FK
            string type "observation/conclusion"
            vector embedding "Vector representation"
            text content "Memory content"
            timestamp created_at
        }
    
    sequenceDiagram
        participant O as Orchestrator
        participant R as Researcher
        participant D as Developer
        participant E as Executor
        participant VS as Vector Store
        participant KB as Knowledge Base
    
        Note over O,KB: Flow Initialization
        O->>VS: Query similar tasks
        VS-->>O: Return experiences
        O->>KB: Load relevant knowledge
        KB-->>O: Return context
    
        Note over O,R: Research Phase
        O->>R: Analyze target
        R->>VS: Search similar cases
        VS-->>R: Return patterns
        R->>KB: Query vulnerabilities
        KB-->>R: Return known issues
        R->>VS: Store findings
        R-->>O: Research results
    
        Note over O,D: Planning Phase
        O->>D: Plan attack
        D->>VS: Query exploits
        VS-->>D: Return techniques
        D->>KB: Load tools info
        KB-->>D: Return capabilities
        D-->>O: Attack plan
    
        Note over O,E: Execution Phase
        O->>E: Execute plan
        E->>KB: Load tool guides
        KB-->>E: Return procedures
        E->>VS: Store results
        E-->>O: Execution status
    
    graph TB
        subgraph "Long-term Memory"
            VS[(Vector Store<br/>Embeddings DB)]
            KB[Knowledge Base<br/>Domain Expertise]
            Tools[Tools Knowledge<br/>Usage Patterns]
        end
    
        subgraph "Working Memory"
            Context[Current Context<br/>Task State]
            Goals[Active Goals<br/>Objectives]
            State[System State<br/>Resources]
        end
    
        subgraph "Episodic Memory"
            Actions[Past Actions<br/>Commands History]
            Results[Action Results<br/>Outcomes]
            Patterns[Success Patterns<br/>Best Practices]
        end
    
        Context --> |Query| VS
        VS --> |Retrieve| Context
    
        Goals --> |Consult| KB
        KB --> |Guide| Goals
    
        State --> |Record| Actions
        Actions --> |Learn| Patterns
        Patterns --> |Store| VS
    
        Tools --> |Inform| State
        Results --> |Update| Tools
    
        VS --> |Enhance| KB
        KB --> |Index| VS
    
        classDef ltm fill:#f9f,stroke:#333,stroke-width:2px,color:#000
        classDef wm fill:#bbf,stroke:#333,stroke-width:2px,color:#000
        classDef em fill:#bfb,stroke:#333,stroke-width:2px,color:#000
    
        class VS,KB,Tools ltm
        class Context,Goals,State wm
        class Actions,Results,Patterns em
    

    The chain summarization system manages conversation context growth by selectively summarizing older messages. This is critical for preventing token limits from being exceeded while maintaining conversation coherence.

    flowchart TD
        A[Input Chain] --> B{Needs Summarization?}
        B -->|No| C[Return Original Chain]
        B -->|Yes| D[Convert to ChainAST]
        D --> E[Apply Section Summarization]
        E --> F[Process Oversized Pairs]
        F --> G[Manage Last Section Size]
        G --> H[Apply QA Summarization]
        H --> I[Rebuild Chain with Summaries]
        I --> J{Is New Chain Smaller?}
        J -->|Yes| K[Return Optimized Chain]
        J -->|No| C
    
        classDef process fill:#bbf,stroke:#333,stroke-width:2px,color:#000
        classDef decision fill:#bfb,stroke:#333,stroke-width:2px,color:#000
        classDef output fill:#fbb,stroke:#333,stroke-width:2px,color:#000
    
        class A,D,E,F,G,H,I process
        class B,J decision
        class C,K output
    

    The algorithm operates on a structured representation of conversation chains (ChainAST) that preserves message types including tool calls and their responses. All summarization operations maintain critical conversation flow while reducing context size.

    Global Summarizer Configuration Options

    ParameterEnvironment VariableDefaultDescription
    Preserve LastSUMMARIZER_PRESERVE_LASTtrueWhether to keep all messages in the last section intact
    Use QA PairsSUMMARIZER_USE_QAtrueWhether to use QA pair summarization strategy
    Summarize Human in QASUMMARIZER_SUM_MSG_HUMAN_IN_QAfalseWhether to summarize human messages in QA pairs
    Last Section SizeSUMMARIZER_LAST_SEC_BYTES51200Maximum byte size for last section (50KB)
    Max Body Pair SizeSUMMARIZER_MAX_BP_BYTES16384Maximum byte size for a single body pair (16KB)
    Max QA SectionsSUMMARIZER_MAX_QA_SECTIONS10Maximum QA pair sections to preserve
    Max QA SizeSUMMARIZER_MAX_QA_BYTES65536Maximum byte size for QA pair sections (64KB)
    Keep QA SectionsSUMMARIZER_KEEP_QA_SECTIONS1Number of recent QA sections to keep without summarization

    Assistant Summarizer Configuration Options

    Assistant instances can use customized summarization settings to fine-tune context management behavior:

    ParameterEnvironment VariableDefaultDescription
    Preserve LastASSISTANT_SUMMARIZER_PRESERVE_LASTtrueWhether to preserve all messages in the assistant's last section
    Last Section SizeASSISTANT_SUMMARIZER_LAST_SEC_BYTES76800Maximum byte size for assistant's last section (75KB)
    Max Body Pair SizeASSISTANT_SUMMARIZER_MAX_BP_BYTES16384Maximum byte size for a single body pair in assistant context (16KB)
    Max QA SectionsASSISTANT_SUMMARIZER_MAX_QA_SECTIONS7Maximum QA sections to preserve in assistant context
    Max QA SizeASSISTANT_SUMMARIZER_MAX_QA_BYTES76800Maximum byte size for assistant's QA sections (75KB)
    Keep QA SectionsASSISTANT_SUMMARIZER_KEEP_QA_SECTIONS3Number of recent QA sections to preserve without summarization

    The assistant summarizer configuration provides more memory for context retention compared to the global settings, preserving more recent conversation history while still ensuring efficient token usage.

    Summarizer Environment Configuration

    # Default values for global summarizer logic
    SUMMARIZER_PRESERVE_LAST=true
    SUMMARIZER_USE_QA=true
    SUMMARIZER_SUM_MSG_HUMAN_IN_QA=false
    SUMMARIZER_LAST_SEC_BYTES=51200
    SUMMARIZER_MAX_BP_BYTES=16384
    SUMMARIZER_MAX_QA_SECTIONS=10
    SUMMARIZER_MAX_QA_BYTES=65536
    SUMMARIZER_KEEP_QA_SECTIONS=1
    
    # Default values for assistant summarizer logic
    ASSISTANT_SUMMARIZER_PRESERVE_LAST=true
    ASSISTANT_SUMMARIZER_LAST_SEC_BYTES=76800
    ASSISTANT_SUMMARIZER_MAX_BP_BYTES=16384
    ASSISTANT_SUMMARIZER_MAX_QA_SECTIONS=7
    ASSISTANT_SUMMARIZER_MAX_QA_BYTES=76800
    ASSISTANT_SUMMARIZER_KEEP_QA_SECTIONS=3
    

    PentAGI includes sophisticated multi-layered agent supervision mechanisms to ensure efficient task execution, prevent infinite loops, and provide intelligent recovery from stuck states:

    Execution Monitoring (Beta)

    • Automatic Mentor Intervention: Adviser agent (mentor) is automatically invoked when execution patterns indicate potential issues
    • Pattern Detection: Monitors identical tool calls (threshold: 5, configurable) and total tool calls (threshold: 10, configurable)
    • Progress Analysis: Evaluates whether agent advances toward subtask objective, detects loops and inefficiencies
    • Alternative Strategies: Recommends different approaches when current strategy fails
    • Information Retrieval Guidance: Suggests searching for established solutions instead of reinventing
    • Enhanced Response Format: Tool responses include both <original_result> and <mentor_analysis> sections
    • Configurable: Enable via EXECUTION_MONITOR_ENABLED (default: false), customize thresholds with EXECUTION_MONITOR_SAME_TOOL_LIMIT and EXECUTION_MONITOR_TOTAL_TOOL_LIMIT

    Best for: Smaller models (< 32B parameters), complex attack scenarios requiring continuous guidance, preventing agents from getting stuck on single approach

    Performance Impact: 2-3x increase in execution time and token usage, but delivers 2x improvement in result quality based on testing with Qwen3.5-27B-FP8

    Intelligent Task Planning (Beta)

    • Automated Decomposition: Planner (adviser in planning mode) generates 3-7 specific, actionable steps before specialist agents begin work
    • Context-Aware Plans: Analyzes full execution context via enricher agent to create informed plans
    • Structured Assignment: Original request wrapped in <task_assignment> structure with execution plan and instructions
    • Scope Management: Prevents scope creep by keeping agents focused on current subtask only
    • Enriched Instructions: Plans highlight critical actions, potential pitfalls, and verification points
    • Configurable: Enable via AGENT_PLANNING_STEP_ENABLED (default: false)

    Best for: Models < 32B parameters, complex penetration testing workflows, improving success rates on sophisticated tasks

    Enhanced Adviser Configuration: Works exceptionally well when adviser agent uses stronger model or enhanced settings. Example: using same base model with maximum reasoning mode for adviser (see vllm-qwen3.5-27b-fp8.provider.yml) enables comprehensive task analysis and strategic planning from identical model architecture.

    Performance Impact: Adds planning overhead but significantly improves completion rates and reduces redundant work

    Tool Call Limits (Always Active)

    • Hard Limits: Prevent runaway executions regardless of supervision mode status
    • Differentiated by Agent Type:
      • General agents (Assistant, Primary Agent, Pentester, Coder, Installer): MAX_GENERAL_AGENT_TOOL_CALLS (default: 100)
      • Limited agents (Searcher, Enricher, Memorist, Generator, Reporter, Adviser, Reflector, Planner): MAX_LIMITED_AGENT_TOOL_CALLS (default: 20)
    • Graceful Termination: Reflector guides agents to proper completion when approaching limits
    • Resource Protection: Ensures system stability and prevents resource exhaustion

    Reflector Integration (Always Active)

    • Automatic Correction: Invoked when LLM fails to generate tool calls after 3 attempts
    • Strategic Guidance: Analyzes failures and guides agents toward proper tool usage or barrier tools (done, ask)
    • Recovery Mechanism: Provides contextual guidance based on specific failure patterns
    • Limit Enforcement: Coordinates graceful termination when tool call limits are reached

    Recommendations for Open Source Models

    Must-Have for Models < 32B Parameters: Testing with Qwen3.5-27B-FP8 demonstrates that enabling both Execution Monitoring and Task Planning is essential for smaller open source models:

    • Quality Improvement: 2x better results compared to baseline execution without supervision
    • Loop Prevention: Significantly reduces infinite loops and redundant work
    • Attack Diversity: Encourages exploration of multiple attack vectors instead of fixating on single approach
    • Air-Gapped Deployments: Enables production-grade autonomous pentesting in closed network environments with local LLM inference

    Trade-offs:

    • Token consumption: 2-3x increase due to mentor/planner invocations
    • Execution time: 2-3x longer due to analysis and planning steps
    • Result quality: 2x improvement in completeness, accuracy, and attack coverage
    • Model requirements: Works best when adviser uses enhanced configuration (higher reasoning parameters, stronger model variant, or different model)

    Configuration Strategy: For optimal performance with smaller models, configure adviser agent with enhanced settings:

    • Use same model with maximum reasoning mode (example: vllm-qwen3.5-27b-fp8.provider.yml)
    • Or use stronger model for adviser while keeping base model for other agents
    • Adjust monitoring thresholds based on task complexity and model capabilities

    The architecture of PentAGI is designed to be modular, scalable, and secure. Here are the key components:

    1. Core Services

      • Frontend UI: React-based web interface with TypeScript for type safety
      • Backend API: Go-based REST and GraphQL APIs with Bearer token authentication for programmatic access
      • Vector Store: PostgreSQL with pgvector for semantic search and memory storage
      • Task Queue: Async task processing system for reliable operation
      • AI Agent: Multi-agent system with specialized roles for efficient testing
    2. Optional Knowledge Graph

      • Graphiti: Knowledge graph API for semantic relationship tracking and contextual understanding
      • Neo4j: Graph database for storing and querying relationships between entities, actions, and outcomes
      • When enabled, automatically captures agent responses and tool executions for a flow-scoped knowledge base
    3. Monitoring Stack

      • OpenTelemetry: Unified observability data collection and correlation
      • Grafana: Real-time visualization and alerting dashboards
      • VictoriaMetrics: High-performance time-series metrics storage
      • Jaeger: End-to-end distributed tracing for debugging
      • Loki: Scalable log aggregation and analysis
    4. Analytics Platform

      • Langfuse: Advanced LLM observability and performance analytics
      • ClickHouse: Column-oriented analytics data warehouse
      • Redis: High-speed caching and rate limiting
      • MinIO: S3-compatible object storage for artifacts
    5. Security Tools

      • Web Scraper: Isolated browser environment for safe web interaction
      • Pentesting Tools: Comprehensive suite of 20+ professional security tools
      • Sandboxed Execution: All operations run in isolated containers
    6. Memory Systems

      • Long-term Memory: Persistent storage of knowledge and experiences
      • Working Memory: Active context and goals for current operations
      • Episodic Memory: Historical actions and success patterns
      • Knowledge Base: Structured domain expertise and tool capabilities
      • Context Management: Intelligently manages growing LLM context windows using chain summarization

    The system uses Docker containers for isolation and easy deployment, with separate networks for core services, monitoring, and analytics to ensure proper security boundaries. Each component is designed to scale horizontally and can be configured for high availability in production environments.

    Quick Start

    For a step-by-step walkthrough that connects installation, configuration, LLM and embedding provider testing, and your first login, see the Installing and Configuring PentAGI guide. The sections below remain the detailed reference for each step.

    System Requirements

    • Docker and Docker Compose (or Podman - see Podman configuration)
    • Minimum 2 vCPU
    • Minimum 4GB RAM
    • 20GB free disk space
    • Internet access for downloading images and updates

    Using Installer (Recommended)

    PentAGI provides an interactive installer with a terminal-based UI for streamlined configuration and deployment. The installer guides you through system checks, LLM provider setup, search engine configuration, and security hardening.

    Supported Platforms:

    macOS security warning: If macOS flags a downloaded installer, use only the official PentAGI links above, choose the archive that matches your CPU architecture, verify the source before continuing, and follow the installer troubleshooting guide before allowing the app to run.

    Quick Installation (Linux amd64):

    # Create installation directory
    mkdir -p pentagi && cd pentagi
    
    # Download installer
    wget -O installer.zip https://pentagi.com/downloads/linux/amd64/installer-latest.zip
    
    # Extract
    unzip installer.zip
    
    # Run interactive installer
    ./installer
    

    Prerequisites & Permissions:

    The installer requires appropriate privileges to interact with the Docker API for proper operation. By default, it uses the Docker socket (/var/run/docker.sock) which requires either:

    • Option 1 (Recommended for production): Run the installer as root:

      sudo ./installer
      
    • Option 2 (Development environments): Grant your user access to the Docker socket by adding them to the docker group:

      # Add your user to the docker group
      sudo usermod -aG docker $USER
      
      # Log out and log back in, or activate the group immediately
      newgrp docker
      
      # Verify Docker access (should run without sudo)
      docker ps
      

      ⚠️ Security Note: Adding a user to the docker group grants root-equivalent privileges. Only do this for trusted users in controlled environments. For production deployments, consider using rootless Docker mode or running the installer with sudo.

    The installer will:

    1. System Checks: Verify Docker, network connectivity, and system requirements
    2. Environment Setup: Create and configure .env file with optimal defaults
    3. Provider Configuration: Set up LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Ollama, DeepSeek, GLM, Kimi, Qwen, MiniMax, Mistral, xAI, Custom)
    4. Search Engines: Configure DuckDuckGo, Google, Tavily, Firecrawl, Traversaal, Perplexity, Sploitus, SearXNG, and the optional internal browser-analytics fallback engine
    5. Security Hardening: Generate secure credentials and configure SSL certificates
    6. Deployment: Start PentAGI with docker-compose

    Current Web Settings Coverage

    The PentAGI web console already manages several settings areas after the server is up and running:

    • Settings -> Providers: Create, edit, delete, and test user-defined provider profiles for supported provider types. These profiles control per-agent model selection, runtime parameters, reasoning options, and pricing metadata.
    • Settings -> Prompts: Manage system, human, and tool prompt templates.
    • Settings -> PentAGI API: Create and manage PentAGI Bearer tokens for REST and GraphQL access.
    • Other UI-managed preferences: Favorite flows are stored as user preferences, and theme selection is handled from the main sidebar/profile controls rather than the Settings pages.

    Still Server-Managed

    The following configuration areas still need to be set on the server through environment variables, compose files, or mounted config files:

    • LLM credentials and connection details: API keys, endpoints, auth modes, and provider-specific connection settings for OpenAI, Anthropic, Bedrock, Ollama, custom providers, and similar backends; config-path settings apply only where supported, such as OLLAMA_SERVER_CONFIG_PATH, LLM_SERVER_CONFIG_PATH, and BEDROCK_CONFIG_PATH.
    • Search provider credentials and options: Settings such as DUCKDUCKGO_*, GOOGLE_*, TAVILY_API_KEY, FIRECRAWL_API_*, TRAVERSAAL_API_KEY, PERPLEXITY_*, SEARXNG_*, SPLOITUS_ENABLED, and the optional WEB_SEARCH_INTERNAL_* browser-analytics fallback settings.
    • Third-party integrations: Langfuse, Graphiti, and similar external services remain server-side configuration.

    For Production & Enhanced Security:

    For production deployments or security-sensitive environments, we strongly recommend using a distributed two-node architecture where worker operations are isolated on a separate server. This prevents untrusted code execution and network access issues on your main system.

    See detailed guide: Worker Node Setup

    The two-node setup provides:

    • Isolated Execution: Worker containers run on dedicated hardware
    • Network Isolation: Separate network boundaries for penetration testing
    • Security Boundaries: Docker-in-Docker with TLS authentication
    • OOB Attack Support: Dedicated port ranges for out-of-band techniques
    Giving Agents Docker Without Giving Away the Host

    Many pentest workflows need docker inside the agent's sandbox. There are two ways to provide it, and they differ sharply in risk.

    Recommended — point sandboxes at a hardened dind daemon over TLS. Set DOCKER_INSIDE=true, leave DOCKER_SOCKET empty, and configure the daemon the sandbox may talk to:

    DOCKER_INSIDE=true
    DOCKER_SOCKET=                                          # mount no socket
    DOCKER_INSIDE_HOST=tcp://10.0.0.5:3376                  # hardened dind endpoint
    DOCKER_INSIDE_TLS_VERIFY=1
    DOCKER_INSIDE_CERT_PATH=/etc/docker/dind/certs/client   # path on the worker node
    DOCKER_INSIDE_POLICY_TESTS=true                         # prove it on every worker; off by default
    

    PentAGI injects these into every worker container as DOCKER_HOST, DOCKER_TLS_VERIFY and DOCKER_CERT_PATH (the _INSIDE_ segment is dropped) and bind-mounts the certificate directory read-only at the same path, so docker works inside the sandbox with no further setup.

    Not recommended — bind-mounting a Docker socket (DOCKER_SOCKET). This has two failure modes:

    • Boot-order race: a bind-mount source that does not exist yet is created by Docker as a directory. After a worker-node reboot, a worker container can start before dind has recreated its socket — Docker then puts a directory where the socket belongs, and dind cannot start until it is removed by hand.
    • Blast radius: the race is only reliably avoided when the mounted socket is the host daemon's, since that one always exists first. But that grants an autonomous agent the host Docker API: it can start a privileged container, mount /, and compromise the entire node — PentAGI included.

    Use DOCKER_SOCKET only on single-node development setups where the host daemon is already trusted.

    See: Worker Node Setup for the full dind hardening and TLS configuration, and Worker Docker Access for the exact resolution algorithm.

    Running Several Instances (TENANT_ID)

    A single PentAGI installation needs none of this — leave TENANT_ID empty (the default) and nothing changes.

    Set it when several PentAGI installations share external resources: one PostgreSQL server, one worker node, one Neo4j/Graphiti, one Langfuse. The typical case is a management backend per server with a common worker node and database. Because every instance numbers its flows from 1, they would otherwise collide on container names, database rows, knowledge-graph namespaces and session cookies. TENANT_ID namespaces all of it:

    AreaEffect when TENANT_ID=acme
    PostgreSQLThe instance creates and works inside schema acme instead of public; extensions stay shared in DATABASE_EXTENSIONS_SCHEMA (default public, extensions on Supabase)
    Worker containersacme-pentagi-terminal-<flow> instead of pentagi-terminal-<flow>; volumes and hostnames follow, and both carry a pentagi.tenant label
    Knowledge graphGraphiti/Neo4j group ids become acme-flow-<id>
    AuthCookie and API token keys are derived from COOKIE_SIGNING_SALT plus the tenant, and the session cookie is renamed
    TelemetryLangfuse traces carry the tenant as their environment and a tenant:acme tag; OTel resources gain tenant_id

    The value must match ^[a-z][a-z0-9_]{0,31}$ — an invalid one aborts startup rather than being silently normalised.

    Some things stay yours to set per instance, because they are host resources rather than names: DATA_DIR (two instances sharing it will overwrite each other's flow data), DOCKER_PORTS_BASE, the published ports, and INSTALLATION_ID. The effective values are printed at startup under Instance identity.

    The installer provisions one instance per server. Running several on one server is possible — for example behind a shared nginx — but the stock docker-compose.yml uses fixed container and network names, so it has to be adapted to your own network layout first.

    See: Multi-Instance Deployment for validation rules, upgrade notes and the full list of operator responsibilities.

    Manual Installation

    1. Create a working directory or clone the repository:
    mkdir pentagi && cd pentagi
    
    1. Copy .env.example to .env or download it:
    curl -o .env https://raw.githubusercontent.com/vxcontrol/pentagi/master/.env.example
    
    1. Touch examples files (example.custom.provider.yml, example.ollama.provider.yml, example.bedrock.provider.yml) or download it. docker-compose.yml mounts each of them into the container, and Docker creates a directory in place of a mount source that does not exist:
    curl -o example.custom.provider.yml https://raw.githubusercontent.com/vxcontrol/pentagi/master/examples/configs/custom-openai.provider.yml
    curl -o example.ollama.provider.yml https://raw.githubusercontent.com/vxcontrol/pentagi/master/examples/configs/ollama-llama318b.provider.yml
    curl -o example.bedrock.provider.yml https://raw.githubusercontent.com/vxcontrol/pentagi/master/examples/configs/bedrock.provider.yml
    
    1. Fill in the required API keys in .env file.
    # Required: At least one of these LLM providers
    OPEN_AI_KEY=your_openai_key
    ANTHROPIC_API_KEY=your_anthropic_key
    GEMINI_API_KEY=your_gemini_key
    
    # Optional: AWS Bedrock provider (enterprise-grade models)
    BEDROCK_REGION=us-east-1
    # Choose one authentication method:
    BEDROCK_DEFAULT_AUTH=true                        # Option 1: Use AWS SDK default credential chain (recommended for EC2/ECS)
    # BEDROCK_BEARER_TOKEN=your_bearer_token         # Option 2: Bearer token authentication
    # BEDROCK_ACCESS_KEY_ID=your_aws_access_key      # Option 3: Static credentials
    # BEDROCK_SECRET_ACCESS_KEY=your_aws_secret_key
    
    # Optional: Ollama provider (local or cloud)
    # OLLAMA_SERVER_URL=http://ollama-server:11434   # Local server
    # OLLAMA_SERVER_URL=https://ollama.com           # Cloud service
    # OLLAMA_SERVER_API_KEY=your_ollama_cloud_key    # Required for cloud, empty for local
    
    # Optional: Chinese AI providers
    # DEEPSEEK_API_KEY=your_deepseek_key             # DeepSeek (strong reasoning)
    # GLM_API_KEY=your_glm_key                       # GLM (Zhipu AI)
    # KIMI_API_KEY=your_kimi_key                     # Kimi (Moonshot AI, ultra-long context)
    # QWEN_API_KEY=your_qwen_key                     # Qwen (Alibaba Cloud, multimodal)
    # MINIMAX_API_KEY=your_minimax_key               # MiniMax
    
    # Optional: European and US providers
    # MISTRAL_API_KEY=your_mistral_key               # Mistral
    # XAI_API_KEY=your_xai_key                       # xAI (Grok)
    
    # Optional: Local LLM provider (zero-cost inference)
    OLLAMA_SERVER_URL=http://localhost:11434
    OLLAMA_SERVER_MODEL=your_model_name
    
    # Optional: Additional search capabilities
    DUCKDUCKGO_ENABLED=true
    DUCKDUCKGO_REGION=us-en
    DUCKDUCKGO_SAFESEARCH=
    DUCKDUCKGO_TIME_RANGE=
    SPLOITUS_ENABLED=true
    GOOGLE_API_KEY=your_google_key
    GOOGLE_CX_KEY=your_google_cx
    TAVILY_API_KEY=your_tavily_key
    FIRECRAWL_API_KEY=your_firecrawl_key
    FIRECRAWL_API_URL=
    TRAVERSAAL_API_KEY=your_traversaal_key
    PERPLEXITY_API_KEY=your_perplexity_key
    PERPLEXITY_MODEL=
    PERPLEXITY_CONTEXT_SIZE=medium
    
    # SearXNG meta search engine (aggregates results from multiple sources)
    SEARXNG_URL=http://your-searxng-instance:8080
    SEARXNG_CATEGORIES=general
    SEARXNG_LANGUAGE=
    SEARXNG_SAFESEARCH=0
    SEARXNG_TIME_RANGE=
    SEARXNG_TIMEOUT=
    
    # Optional: internal browser-analytics fallback engine for web_search (off by default;
    # scrapes and summarizes pages instead of calling a paid analytic API)
    WEB_SEARCH_INTERNAL_ENABLED=false
    WEB_SEARCH_INTERNAL_MAX_SITES=5
    WEB_SEARCH_INTERNAL_MAX_SITE_BYTES=10240
    
    ## Graphiti knowledge graph settings
    GRAPHITI_ENABLED=false
    GRAPHITI_TIMEOUT=30
    GRAPHITI_URL=
    
    # Neo4j settings (used by Graphiti stack)
    NEO4J_USER=neo4j
    NEO4J_DATABASE=neo4j
    NEO4J_PASSWORD=devpassword
    NEO4J_URI=bolt://neo4j:7687
    
    # Assistant configuration
    ASSISTANT_USE_AGENTS=false         # Default value for agent usage when creating new assistants
    
    1. Change all security related environment variables in .env file to improve security.

    Main Security Settings

    • COOKIE_SIGNING_SALT - Salt for cookie signing, change to random value
    • PUBLIC_URL - Public URL of your server (eg. https://pentagi.example.com)
    • SERVER_SSL_CRT and SERVER_SSL_KEY - Custom paths to your existing SSL certificate and key for HTTPS (these paths should be used in the docker-compose.yml file to mount as volumes)
    • TENANT_ID - Leave empty unless this instance shares external resources with another PentAGI installation. When set, it is mixed into the cookie and API token signing keys and renames the session cookie, so a session minted by one instance is rejected by the others even though they share the same COOKIE_SIGNING_SALT. See Running Several Instances

    Scraper Access

    • SCRAPER_PUBLIC_URL - Public URL for scraper if you want to use different scraper server for public URLs
    • SCRAPER_PRIVATE_URL - Private URL for scraper (local scraper server in docker-compose.yml file to access it to local URLs)

    Access Credentials

    • PENTAGI_POSTGRES_USER and PENTAGI_POSTGRES_PASSWORD - PostgreSQL credentials
    • NEO4J_USER and NEO4J_PASSWORD - Neo4j credentials (for Graphiti knowledge graph)
    1. Remove all inline comments from .env file if you want to use it in VSCode or other IDEs as a envFile option:
    perl -i -pe 's/\s+#.*$//' .env
    
    1. Run the PentAGI stack:
    curl -O https://raw.githubusercontent.com/vxcontrol/pentagi/master/docker-compose.yml
    docker compose up -d
    

    Visit localhost:8443 to access PentAGI Web UI (default is [email protected] / admin)

    Web UI Accounts

    PentAGI does not expose public self-service sign-up from the login page. A fresh installation creates the default local administrator account:

    On first login, change the default password before using the instance for real work. If the administrator password is lost later, use the installer maintenance menu to reset the default [email protected] account password.

    For multi-user setups, an authenticated administrator can manage local users through the Users REST API (/api/v1/users/). The OpenAPI UI is available at https://localhost:8443/api/v1/swagger/index.html after the instance is running.

    [!NOTE] If you caught an error about pentagi-network or observability-network or langfuse-network you need to run docker-compose.yml firstly to create these networks and after that run docker-compose-langfuse.yml, docker-compose-graphiti.yml, and docker-compose-observability.yml to use Langfuse, Graphiti, and Observability services.

    You have to set at least one Language Model provider (OpenAI, Anthropic, Gemini, AWS Bedrock, or Ollama) to use PentAGI. AWS Bedrock provides enterprise-grade access to multiple foundation models from leading AI companies, while Ollama provides zero-cost local inference if you have sufficient computational resources. Additional API keys for search engines are optional but recommended for better results.

    For fully local deployment with advanced models: See our comprehensive guide on Running PentAGI with vLLM and Qwen3.5-27B-FP8 for a production-grade local LLM setup. This configuration achieves ~13,000 TPS for prompt processing and ~650 TPS for completion on 4× RTX 5090 GPUs, supporting 12+ concurrent flows with complete independence from cloud providers.

    LLM_SERVER_* environment variables are experimental feature and will be changed in the future. Right now you can use them to specify custom LLM server URL and one model for all agent types.

    PROXY_URL routes the backend's own HTTP calls through a proxy: every request to LLM and embedding providers and to search engines — self-hosted ones such as Ollama or SearXNG included, as there is no NO_PROXY exemption — and the update check. Sandbox containers (where agents run their commands), the scraper, the Graphiti service, OAuth sign-in, and Langfuse/OpenTelemetry export do not use it, so if you need isolation from external networks, restrict their outbound traffic at the network level.

    The docker-compose.yml file runs the PentAGI service as root user because it needs access to docker.sock for container management. If you're using TCP/IP network connection to Docker instead of socket file, you can remove root privileges and use the default pentagi user for better security.

    Accessing PentAGI from External Networks

    By default, the PentAGI web interface and the other compose services bind to 127.0.0.1 (localhost only) for security. To access PentAGI from other machines on your network, you need to configure external access.

    [!IMPORTANT] Flow sandboxes are not bound to localhost. Each flow publishes two TCP ports for out-of-band callbacks such as reverse shells, taken from the 2000-port window that starts at DOCKER_PORTS_BASE (28000–29999 by default), on DOCKER_PUBLIC_IP — 0.0.0.0 by default, that is every interface of the Docker host. Docker routes published ports around ufw rules and lets them through firewalld with its own docker zone, so restrict this range with a firewall in front of the host or, with Docker's default iptables backend, with rules in the DOCKER-USER chain. With DOCKER_NETWORK=host, sandboxes share the host's network stack, so their listeners are exposed without any port mapping.

    Configuration Steps
    1. Update .env file with your server's IP address:
    # Network binding - allow external connections
    PENTAGI_LISTEN_IP=0.0.0.0
    PENTAGI_LISTEN_PORT=8443
    
    # Public URL - use your actual server IP or hostname
    # Replace 192.168.1.100 with your server's IP address
    PUBLIC_URL=https://192.168.1.100:8443
    
    # CORS origins - list all URLs that will access PentAGI
    # Include localhost for local access AND your server IP for external access
    CORS_ORIGINS=https://localhost:8443,https://192.168.1.100:8443
    

    [!IMPORTANT]

    • Replace 192.168.1.100 with your actual server's IP address
    • Do NOT use 0.0.0.0 in PUBLIC_URL or CORS_ORIGINS - use the actual IP address
    • Include both localhost and your server IP in CORS_ORIGINS for flexibility
    1. Recreate containers to apply the changes:
    docker compose down
    docker compose up -d --force-recreate
    
    1. Verify port binding:
    docker ps | grep pentagi
    

    You should see 0.0.0.0:8443->8443/tcp or :::8443->8443/tcp.

    If you see 127.0.0.1:8443->8443/tcp, the environment variable wasn't picked up. In this case, directly edit docker-compose.yml line 31:

    ports:
      - "0.0.0.0:8443:8443"
    

    Then recreate containers again.

    1. Configure firewall to allow incoming connections on port 8443:
    # Ubuntu/Debian with UFW
    sudo ufw allow 8443/tcp
    sudo ufw reload
    
    # CentOS/RHEL with firewalld
    sudo firewall-cmd --permanent --add-port=8443/tcp
    sudo firewall-cmd --reload
    
    1. Access PentAGI:
    • Local access: https://localhost:8443
    • Network access: https://your-server-ip:8443

    [!NOTE] You'll need to accept the self-signed SSL certificate warning in your browser when accessing via IP address.


    Running PentAGI with Podman

    PentAGI fully supports Podman as a Docker alternative. However, when using Podman in rootless mode, the scraper service requires special configuration because rootless containers cannot bind privileged ports (ports below 1024).

    Podman Rootless Configuration

    The default scraper configuration uses port 443 (HTTPS), which is a privileged port. For Podman rootless, reconfigure the scraper to use a non-privileged port:

    1. Edit docker-compose.yml - modify the scraper service (around line 199):

    scraper:
      image: vxcontrol/scraper:latest
      restart: unless-stopped
      container_name: scraper
      hostname: scraper
      expose:
        - 3000/tcp  # Changed from 443 to 3000
      ports:
        - "${SCRAPER_LISTEN_IP:-127.0.0.1}:${SCRAPER_LISTEN_PORT:-9443}:3000"  # Map to port 3000
      environment:
        - MAX_CONCURRENT_SESSIONS=${LOCAL_SCRAPER_MAX_CONCURRENT_SESSIONS:-10}
        - USERNAME=${LOCAL_SCRAPER_USERNAME:-someuser}
        - PASSWORD=${LOCAL_SCRAPER_PASSWORD:-somepass}
      logging:
        options:
          max-size: 50m
          max-file: "7"
      volumes:
        - scraper-ssl:/usr/src/app/ssl
      networks:
        - pentagi-network
      shm_size: 2g
    

    2. Update .env file - change the scraper URL to use HTTP and port 3000:

    # Scraper configuration for Podman rootless
    SCRAPER_PRIVATE_URL=http://someuser:somepass@scraper:3000/
    LOCAL_SCRAPER_USERNAME=someuser
    LOCAL_SCRAPER_PASSWORD=somepass
    

    [!IMPORTANT] Key changes for Podman:

    • Use HTTP instead of HTTPS for SCRAPER_PRIVATE_URL
    • Use port 3000 instead of 443
    • Change internal expose to 3000/tcp
    • Update port mapping to target 3000 instead of 443

    3. Recreate containers:

    podman-compose down
    podman-compose up -d --force-recreate
    

    4. Test scraper connectivity:

    # Test from within the pentagi container
    podman exec -it pentagi wget -O- "http://someuser:somepass@scraper:3000/html?url=http://example.com"
    

    If you see HTML output, the scraper is working correctly.

    Podman Rootful Mode

    If you're running Podman in rootful mode (with sudo), you can use the default configuration without modifications. The scraper will work on port 443 as intended.

    Docker Compatibility

    All Podman configurations remain fully compatible with Docker. The non-privileged port approach works identically on both container runtimes.

    Assistant Configuration

    PentAGI allows you to configure default behavior for assistants:

    VariableDefaultDescription
    ASSISTANT_USE_AGENTSfalseControls the default value for agent usage when creating new assistants

    The ASSISTANT_USE_AGENTS setting affects the initial state of the "Use Agents" toggle when creating a new assistant in the UI:

    • false (default): New assistants are created with agent delegation disabled by default
    • true: New assistants are created with agent delegation enabled by default

    Note that users can always override this setting by toggling the "Use Agents" button in the UI when creating or editing an assistant. This environment variable only controls the initial default state.

    How to Use PentAGI After Login

    Once the stack is running and you can sign in to the web UI, the fastest way to start is through the Flows workflow.

    1. Create your first flow

    1. Open Flows in the sidebar.
    2. Click New Flow.
    3. Choose the mode that fits your goal:
      • Automation: fully autonomous execution for a testing goal you want PentAGI to carry out end-to-end
      • Assistant: interactive back-and-forth help when you want to steer the investigation step by step. In this mode you can also enable the Use Agents toggle to let PentAGI delegate subtasks to specialized sub-agents for more complex investigations.
    4. Select the LLM provider you want to use for this flow.
    5. Describe the target and the objective in natural language in the message box.

    Good first prompts usually include:

    • the target system or URL
    • the type of assessment you want
    • any scope limitations or rules of engagement
    • the result you expect, such as a vulnerability report or validation of a hypothesis

    Example:

    Assess https://target.example for common web application vulnerabilities. Focus on authentication, file handling, and injection issues. Stay within the provided target only and summarize confirmed findings with reproduction steps.
    

    Only test systems you own or are explicitly authorized to assess. See EULA.md for the acceptable use requirements.

    2. Use templates for repeatable workflows

    The new flow form includes a template picker, which can prefill the message box with a saved flow template. This is useful when you run similar assessments repeatedly.

    • Use an existing template if you already have one saved in Templates
    • Start from the example prompt in examples/prompts/base_web_pentest.md if you need a practical baseline for web testing
    • Adjust the target, scope, and constraints before starting the flow

    Templates are starting points. You do not need special syntax to use PentAGI: plain natural-language instructions work well as long as the target and goal are clear.

    3. Monitor execution and review output

    After submitting the flow, PentAGI opens the flow page automatically.

    • Use the main flow view to follow messages, agent activity, and task progress
    • Inspect tool activity and terminal output as the flow runs
    • Review generated tasks and subtasks to understand what PentAGI is doing

    Once the flow has enough results, use the Report menu on the flow page to:

    • open the report in a web view
    • copy the generated report to the clipboard
    • download the report as Markdown
    • download the report as PDF

    4. Use the Assistant view to steer an active flow

    Each flow also includes an Assistant view for interactive guidance. This is useful when the autonomous run uncovers something that needs human direction instead of a hard restart.

    • Open the Assistant view for the same flow when you want to inspect the current state before changing anything.
    • Use the assistant to check flow status, stop the current task, submit follow-up instructions, or patch the remaining planned subtasks before the next step runs.
    • Treat this as an explicit control path for the current flow, not as an invisible background queue. If you want to change direction, say so clearly and keep the new instruction tied to the current engagement scope.
    • This works best for clarifying scope, redirecting priorities after intermediate findings, or answering an automation checkpoint without losing the rest of the flow context.

    5. Manage flow-scoped files

    Each flow has its own Files tab in the flow page. Files are scoped to the parent flow: they live in {dataDir}/flow-{id}-data/ on the host and never leak into other flows.

    The tab exposes three sources of files:

    • Uploads (uploads/): files you provide from the web UI. Use the Upload files action, or drag and drop directly onto the Files tab. While the agent container is running, uploaded files are also pushed into it at /work/uploads/ so the agent can read them with normal shell tools.
    • Resources (resources/): files attached from your saved user resources library via Attach resources from library. Attached resources are copied into the flow and pushed into the running container at /work/resources/.
    • Container (container/): snapshots pulled from the running agent container via Pull file or directory from container. These are read-only on the flow side and are never sent back to the container.

    Per-file actions in the Files tab include Download, Copy path, Save as resource (promote a flow file into your reusable resources library), and Delete. The Pull action is disabl