Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

LuaN1aoAgent

> AI 编程
Open source

LuaN1aoAgent is a fully autonomous AI penetration testing agent driven by graph-based cognitive reasoning, developed by postgraduate researchers from Prof. Lu H

1.2K stars0 likes1 views
WebsiteGitHub

About

LuaN1aoAgent is a fully autonomous AI penetration testing agent driven by graph-based cognitive reasoning, developed by postgraduate researchers from Prof. Lu H

LuaN1aoAgent

Cognitive-Driven Autonomous Security Agent


Introduction

LuaN1aoAgent v2 is a complete rewrite of LuaN1aoAgent, built on TypeScript and the Pi SDK for autonomous, authorized security research.

v2 keeps the original project's cognitive-driven direction while rebuilding its runtime around explicit Agent boundaries, durable events and artifacts, evidence-backed graph memory, and observable tool actions.

LuaN1aoAgent v2 separates responsibility into three roles:

  • Planner controls goals, scope, dependencies, task budgets, and graph-level scheduling.
  • Executor autonomously decides how to complete one bounded task and performs tool loops in an isolated workspace.
  • Observer runs as two independent modes: a hot-path Supervisor for control decisions and an asynchronous Projector for durable graph updates.

The system is designed around one principle: every important conclusion must remain traceable to persisted events, artifacts, and graph evidence.

[!IMPORTANT] LuaN1aoAgent v2 is not an in-place refactor of the Python v1 runtime. It is a new implementation with different configuration, persistence, Agent lifecycle, and observability contracts.

[!NOTE] Benchmark results reported by v1 are not automatically attributed to v2. v2 benchmark results will be published only after reproducible reruns on a frozen release.


️ Showcase

https://github.com/user-attachments/assets/85febe15-0644-496a-888d-905fbf5f4d5f

Demo video

Live Trace — inspect what each Agent is reasoning about, which action it takes, the associated task, and persisted artifacts.

Causal Reasoning Graph — trace evidence into hypotheses, confirmed vulnerabilities, and successful exploits.


Core Innovations

1️⃣ Planner-Executor-Observer Collaboration ⭐⭐⭐

v2 replaces the shared-history P-E-R loop with explicit runtime boundaries.

Planner

  • Reads compact task, reasoning, and operation graph views.
  • Creates or patches goal-level tasks instead of prescribing low-level actions.
  • Controls dependencies, priority, independent-task concurrency, scope, and task budgets.
  • Reconciles ready tasks against available capacity after graph changes and task handoffs, without waiting for an entire parallel wave to finish.
  • Submits decisions through the structured planner_submit terminating tool.

Executor

  • Receives a bounded TaskEnvelope and independently chooses its tool strategy.
  • Records public intent, tool input, tool output, usage, errors, and final task results.
  • Preserves large outputs as immutable artifacts instead of inflating Agent context.
  • Reuses the same persisted Pi session lineage and workspace across epochs of one Task; different Tasks remain isolated.
  • Submits results through the structured task_result_submit terminating tool.

Observer

  • Supervisor mode inspects recent Executor actions and decides whether to continue, checkpoint, stop, or return control to Planner.
  • Projector mode asynchronously converts normalized observations into evidence-backed reasoning and operation graph deltas.
  • Each invocation uses a fresh Pi session without sharing hidden model history.
  • Supervisor and Projector submit through control_submit and graph_delta_submit.

2️⃣ Causal Graph Reasoning ⭐⭐⭐

LuaN1ao turns observations into explicit, traceable reasoning chains instead of relying on conclusions hidden in model history:

mermaid
flowchart LR
    Evidence[Evidence] -->|supports / contradicts| Hypothesis[Hypothesis]
    Hypothesis -->|confirms| Vulnerability[Vulnerability]
    Vulnerability -->|exploited by| Exploit[Exploit]
    Evidence -. observed on .-> Endpoint[WebEndpoint / Service]
  • Evidence first: reasoning nodes and edges preserve references to the events that support them.
  • Explicit uncertainty: hypotheses remain distinct from confirmed vulnerabilities and successful exploits.
  • Enforced provenance: confirmed Vulnerability nodes and successful Exploit nodes cannot be written without evidence references.
  • Asynchronous projection: Observer Projector converts normalized execution observations into graph deltas without blocking the Executor loop.
  • Cross-graph context: the Reasoning Graph links conclusions to concrete entities in the Operation Graph.

3️⃣ Plan-on-Graph Dynamic Task Planning ⭐⭐⭐

The Planner maintains an evolving Task Graph rather than regenerating a linear checklist:

mermaid
flowchart LR
    Goal --> Recon[Recon Task]
    Goal --> Auth[Auth Task]
    Recon --> Milestone[Service Profile]
    Milestone --> Validate[Validation Task]
    Auth --> Validate
    Blocker -. blocks .-> Validate
  • Structured graph operations: create_tasks, patch_task, replace_dependencies, set_task_status, and set_node_status form the planning language.
  • Local adaptation: new evidence patches the relevant tasks and dependencies instead of discarding the whole plan.
  • Dependency-aware scheduling: only ready tasks enter a deterministic admitted wave; independent tasks may run concurrently.
  • Evidence-backed decisions: every Planner command carries a reason and can cite the graph nodes or events it is based on.
  • Task/action separation: goals, tasks, milestones, blockers, and scope live in the Task Graph; low-level tool actions remain in the append-only ExecutionLog.
Capability Linear task list LuaN1ao PoG
Plan structure Ordered steps Dependency graph
Adaptation Regenerate the plan Patch affected nodes and edges
Scheduling Manual ordering Dependency-aware admitted waves
Traceability Natural-language history Structured commands and persisted events

4️⃣ Evidence and Artifact Fidelity ⭐⭐⭐

Every Pi event is normalized before it enters the runtime ledger:

  • Public Agent intent is preserved separately from tool calls.
  • Tool start and finish events retain their toolCallId correlation.
  • Small outputs stay inline for immediate inspection.
  • Large outputs spill to content-addressed artifacts with preview and provenance references.
  • Projector inputs use bounded observation batches and explicit artifact references.
  • Confirmed vulnerability and exploit nodes require evidence references.

Core Capabilities

Structured Agent Control

  • Schema-validated Planner, Executor, Supervisor, and Projector terminal submissions.
  • Deterministic task admission with dependency-aware parallel scheduling.
  • Per-task turn budgets and global run-time budgets.
  • Retryable provider failure classification and bounded fresh-session retries.
  • Explicit Planner conflict detection and atomic command batches.

Tool Runtime

Executors use Pi coding tools inside the configured sandbox boundary:

  • read, grep, find, and ls for workspace inspection.
  • bash for controlled command execution.
  • web_fetch for fetching public HTTP(S) references, advisories, and PoC writeups into bounded Markdown previews.
  • web_search for public web search through Brave Search when BRAVE_SEARCH_API_KEY or BRAVE_API_KEY is set, with HTML search fallbacks when no key is available.
  • vulnerability_search for CVE/advisory research through NVD and public web references, preserving weak negative semantics when no public hit is found.
  • browser_render for post-JavaScript DOM inspection inside the Executor network boundary; Docker mode runs Chromium through the same transparent Gateway as other target traffic.
  • artifact_read and artifact_write for durable cross-task material; complete workspace files can be imported without passing their contents through the model context.
  • route_open, route_status, route_stop, and route_reconnect for Docker-mode Runtime-managed SSH and Chisel reachability. The operator-owned process-wide SOCKS5 proxy is configured before Agent execution and is not exposed through route_open.
  • task_result_submit for structured task completion or checkpoint handoff.

Public research results are treated as hypotheses or intelligence leads until the Executor validates them against the authorized target with sandboxed tools. Optional NVD_API_KEY increases NVD rate limits but is not required.

Planner receives graph_query and graph_trace for compact task, reasoning, operation, and session views. Executor receives the graph closure and dependency outcomes selected by Runtime as explicit input rather than direct access to the control-plane graph store.

Recommended Agent Skills

LuaN1ao uses the Agent Skills convention through the Pi runtime. These optional community collections provide useful security references and task-specific workflows:

Collection Recommended for
crazyMarky/pentest-skills Natural-language pentest workflows: recon (port scan, subdomain enum, directory scan, fingerprint/WAF) and exploitation (SQLi, XSS, LFI, file download), plus reporting skills
Eyadkelleh/awesome-skills-security Curated fuzzing payloads, password and username lists, sensitive-data patterns, web-shell samples, and LLM security testing resources
ljagiello/ctf-skills CTF and lab workflows covering Web, Pwn, Crypto, Reverse Engineering, Forensics, OSINT, AI/ML, malware analysis, and writeups

One-click setup from the repository root — installs all three recommended skill collections into the project-local .agents/skills/, runs npm ci and npm run build, and builds both Docker images when a daemon is available. On first run in an interactive terminal it also offers to write a minimal .env (mode 0600); existing .env files are never touched and non-interactive installs skip the prompt:

bash
./install.sh

Or install individual collections with the skills installer:

bash
npx skills add Eyadkelleh/awesome-skills-security \
  --skill '*' --agent pi --global --yes

npx skills add ljagiello/ctf-skills \
  --skill '*' --agent pi --global --yes

Skills installed by ./install.sh live in the project-local .agents/skills/ (gitignored). The Executor session loads them through the runtime's additional skill paths, and the Executor sandbox whitelists the directory for reads. They remain separate third-party projects with their own licenses and update cycles.

Sandbox Isolation

  • auto prefers a per-Task Docker Executor on a private internal network; explicit docker fails closed when Docker or a required image is unavailable. The Executor and its Gateway use separate network namespaces, and the Gateway is the task network's only exit.
  • Docker Executors run as UID 1000 with no capabilities, a read-only root filesystem, executable size-limited /tmp, and a host-visible persistent /workspace.
  • Gateway containers add only NET_ADMIN, SETUID, and SETGID after dropping all capabilities: PID 1 configures TUN/policy routing and launches the protocol-aware Go Gateway as a dedicated UID; that process then clears its capability bounding set. HTTP/HTTPS is detected and transparently captured on any TCP port, while other TCP is relayed unchanged.
  • Without Docker, macOS Seatbelt and Linux Bubblewrap remain available; workspace is the explicit development fallback.
  • Executor workspaces and runtime roots are resolved explicitly, and one Task retains its workspace across checkpoint/resume epochs.
  • Host paths outside allowed roots fail closed under forced sandbox modes.
  • Agent runtime state is not exposed to isolated Executor sessions as implicit context.

Durable Runtime State

Each fresh CLI invocation creates an isolated session under .agent-runtime/sessions//. The TUI prints the selected session path at startup. A session contains:

Path Purpose
state.sqlite Graphs, execution events, projector watermarks, ar

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptagentsaiai-agentsai-security-tool

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.