pan-agents
v0.1.2
Published
Claude Code-style CLI for autonomous agent workflows powered by 0G, ENS, and Gensyn AXL.
Downloads
223
Readme
Pan Agents
Claude Code-style CLI for autonomous agent workflows powered by 0G Compute, 0G Storage, ENS, and Gensyn AXL.
Quick Start
Open PowerShell in the project folder:
cd "C:\Users\Amir\Desktop\pan agents"Run the health check:
.\pan.ps1 doctorExpected result:
PASS Pan config: .pan-agents/config.json loaded
PASS Node.js runtime: v24.15.0
PASS 0G private key: configured
PASS ENS private key: configured
PASS Sepolia RPC URL: configured
PASS ENS auto-detect: amir.eth
PASS Tool sandbox: isolated-vm available
PASS Gensyn AXL: reachable on port 9002If no external AXL node is listening on port 9002, Pan auto-starts a local AXL-compatible development node.
Start the interactive shell:
.\pan.ps1Inside the shell, type:
/help
/status
/agent
/tools
/network
/share <tool-name>
/import <tool-name>
/peers
Return the number 2 as JSON
/exitYou can also press Ctrl+D on an empty prompt to close the interactive shell.
Multi-Agent Networking
Pan supports running multiple agent instances that discover each other automatically.
Terminal 1 — research agent:
.\pan.ps1Terminal 2 — execute agent:
.\pan2.ps1Agents auto-discover peers on ports 9002-9010. Once connected:
/peers— list connected agents and their tools/share <tool-name>— share a tool from your local store with all peers/import <tool-name>— search peers for a tool and import it locally/request <tool-name>— alias for/import/network status— show AXL identity and peer connections/network messages— check received messages/network send <peer-ens> <message>— send a text message to a peer
Tools are persisted to the local agent store and available immediately after import.
CLI Commands
Run a one-off task:
.\pan.ps1 ask --agent auto-agent "Return the number 2 as JSON"Agent management:
.\pan.ps1 agent list
.\pan.ps1 agent show auto-agent
.\pan.ps1 agent create research-agent --description "Research agent" --capabilities "research,summarize,compare"ENS identity:
.\pan.ps1 identity show auto-agent
.\pan.ps1 identity publish auto-agentTool management (persisted on 0G Storage):
.\pan.ps1 tools list --agent auto-agent
.\pan.ps1 tools search "number" --agent auto-agent
.\pan.ps1 network share-tool <tool-name>
.\pan.ps1 network import-tool <tool-name>Network:
.\pan.ps1 network status
.\pan.ps1 network messages
.\pan.ps1 network send <peer-ens> <message>Decision model:
.\pan.ps1 model
.\pan.ps1 model openrouter tencent/hy3-preview:free
.\pan.ps1 model zero-gOpenRouter mode requires OPENROUTER_API_KEY. 0G mode uses ZERO_G_PRIVATE_KEY.
Architecture
src/runtime/axl.ts— shared AXL client: peer discovery, tool exchange, message helperssrc/runtime/local-axl-node.ts— local HTTP AXL node (auto-scans ports 9002-9010)src/runtime/axl-autostart.ts— spawns AXL node as background process with loggingsrc/commands/network.ts— CLI network commands (status, send, share, import, messages)src/shell/commands.ts— REPL slash commands (/share, /import, /peers, /request, /network)src/runtime/patch-sandbox.ts— tool sandbox patches with HTTP error enrichment and EvolutionEngine retry
Why Use pan.ps1?
Your system Node.js is newer than isolated-vm supports. Pan Agents needs Node.js 22 or 24 so the secure sandbox can load correctly.
The pan.ps1 launcher automatically prepends this project-local Node runtime:
.local-node\node-v24.15.0-win-x64That makes commands work on this machine without changing global Node.js.
Required Local Files
These are intentionally git-ignored because they contain local config or secrets:
.env
.pan-agents/config.json
.pan-agents/agents/*.json
.local-node/Your .env must include:
ZERO_G_PRIVATE_KEY=...
ENS_PRIVATE_KEY=...
SEPOLIA_RPC_URL=...
AXL_PORT=9002Do not add ENS_NAME; Pan auto-detects it from ENS_PRIVATE_KEY.
If PowerShell Blocks The Script
If Windows says scripts are disabled, run this once in the same PowerShell window:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen retry:
.\pan.ps1 doctorTroubleshooting
Run .\pan.ps1 doctor first. Fix the first failing check before running tasks.
- Node runtime not 22 or 24: keep
.local-node\node-v24.15.0-win-x64in this project or install Node 24 globally. isolated-vmunavailable: run.\pan.ps1 doctorthrough the launcher, not plainpnpm devwith Node 25.- AXL unreachable: Pan auto-starts a local node. Check
.pan-agents/axl-{port}.logfor errors. - To disable auto-start: set
.pan-agents/config.jsonaxl.autoStarttofalse. - ENS publish fails: verify Sepolia RPC and that the ENS wallet has Sepolia ETH.
- Peers not found: make sure the other terminal (
pan2.ps1) is running and its port is in 9002-9010.
Development
corepack pnpm build
corepack pnpm typecheckIf you run pnpm directly, make sure Node 24 is first on PATH:
$nodeDir = (Resolve-Path ".local-node\node-v24.15.0-win-x64").Path
$env:PATH = "$nodeDir;$env:PATH"
corepack pnpm typecheck