1"use strict";(self.webpackChunkinnovation_labs=self.webpackChunkinnovation_labs||[]).push([[1203],{15630:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"examples/openclaw/openclaw-fetchai-orchestrator","title":"OpenClaw \xd7 Fetch.ai \u2014 Secure local execution (orchestrator)","description":"Source (example repo): openclaw/fetchai-openclaw-orchestrator/ \u2014 clone it and run commands from the fetchai-openclaw-orchestrator directory.","source":"@site/docs/examples/openclaw/openclaw-fetchai-orchestrator.md","sourceDirName":"examples/openclaw","slug":"/examples/openclaw/openclaw-fetchai-orchestrator","permalink":"/resources/docs/next/examples/openclaw/openclaw-fetchai-orchestrator","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"openclaw-fetchai-orchestrator","title":"OpenClaw \xd7 Fetch.ai \u2014 Secure local execution (orchestrator)","sidebar_label":"OpenClaw \u2014 Fetch.ai orchestrator"},"sidebar":"tutorialSidebar","previous":{"title":"OpenClaw \u2014 ASI1 default model","permalink":"/resources/docs/next/examples/openclaw/openclaw-asi1-provider"},"next":{"title":"OpenClaw \u2014 Orchestrator (technical)","permalink":"/resources/docs/next/examples/openclaw/openclaw-fetchai-orchestrator-tech-walkthrough"}}');var r=t(74848),i=t(28453);const c={id:"openclaw-fetchai-orchestrator",title:"OpenClaw \xd7 Fetch.ai \u2014 Secure local execution (orchestrator)",sidebar_label:"OpenClaw \u2014 Fetch.ai orchestrator"},l="OpenClaw x Fetch.ai - Secure Local Execution via Autonomous Agents",o={},a=[{value:"Featured Use Case: GitHub Repo Health Analyzer",id:"featured-use-case-github-repo-health-analyzer",level:2},{value:"Quick Start",id:"quick-start",level:2},{value:"1. Prerequisites",id:"1-prerequisites",level:3},{value:"2. Install",id:"2-install",level:3},{value:"3. Configure",id:"3-configure",level:3},{value:"4. Set Up Demo Data",id:"4-set-up-demo-data",level:3},{value:"5. Run",id:"5-run",level:3},{value:"6. Register Mailbox (for ASI access)",id:"6-register-mailbox-for-asi-access",level:3},{value:"Testing from ASI",id:"testing-from-asi",level:2},{value:"Repo Health Analyzer Prompts",id:"repo-health-analyzer-prompts",level:3},{value:"Weekly Dev Report Prompts",id:"weekly-dev-report-prompts",level:3},{value:"Sample Chat",id:"sample-chat",level:3},{value:"What You'll See (Repo Analyzer)",id:"what-youll-see-repo-analyzer",level:3},{value:"Running Tests",id:"running-tests",level:2},{value:"End-to-End Local Test",id:"end-to-end-local-test",level:3},{value:"Project Structure",id:"project-structure",level:2},{value:"Architecture Deep Dive",id:"architecture-deep-dive",level:2},{value:"How It Works",id:"how-it-works",level:3},{value:"End-to-End Data Flow (Repo Analyzer)",id:"end-to-end-data-flow-repo-analyzer",level:3},{value:"Key Technologies",id:"key-technologies",level:2},{value:"Environment Variables",id:"environment-variables",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"openclaw-x-fetchai---secure-local-execution-via-autonomous-agents",children:"OpenClaw x Fetch.ai - Secure Local Execution via Autonomous Agents"})}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Source (example repo):"})," ",(0,r.jsx)(n.a,{href:"https://github.com/fetchai/innovation-lab-examples/tree/main/openclaw/fetchai-openclaw-orchestrator",children:(0,r.jsx)(n.code,{children:"openclaw/fetchai-openclaw-orchestrator/"})})," \u2014 clone it and run commands from the ",(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"fetchai-openclaw-orchestrator"})})," directory."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["A reference architecture for ",(0,r.jsx)(n.strong,{children:"safe remote-to-local AI orchestration"}),".\nA public Fetch agent on ",(0,r.jsx)(n.a,{href:"https://agentverse.ai",children:"Agentverse"})," plans work; a local\nconnector on your machine executes it - without granting remote shell access or\nleaking sensitive data."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"User --\x3e ASI:One --\x3e Orchestrator Agent --\x3e [signed task plan] --\x3e OpenClaw Connector --\x3e Execution --\x3e Results\n"})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Component"}),(0,r.jsx)(n.th,{children:"Where it runs"}),(0,r.jsx)(n.th,{children:"What it does"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsxs)(n.strong,{children:["ASI",":One"]})}),(0,r.jsxs)(n.td,{children:["Cloud (",(0,r.jsx)(n.a,{href:"https://asi1.ai",children:"asi1.ai"}),")"]}),(0,r.jsx)(n.td,{children:"Natural-language objective input"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Orchestrator Agent"})}),(0,r.jsx)(n.td,{children:"Agentverse / local"}),(0,r.jsx)(n.td,{children:"Plans tasks, enforces policy, dispatches work"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"OpenClaw Connector"})}),(0,r.jsx)(n.td,{children:"Your machine"}),(0,r.jsx)(n.td,{children:"Verifies, policy-checks, executes, returns results"})]})]})]}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"New to the project?"})," Read the ",(0,r.jsx)(n.a,{href:"./openclaw-fetchai-orchestrator-tech-walkthrough",children:"Technical Blog Post"})," for\na step-by-step walkthrough of how each piece was built, from agent creation through\nmailbox configuration to ASI",":One"," integration."]}),"\n"]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"featured-use-case-github-repo-health-analyzer",children:"Featured Use Case: GitHub Repo Health Analyzer"}),"\n",(0,r.jsxs)(n.p,{children:["Anyone on ASI",":One"," can type a message like ",(0,r.jsxs)(n.strong,{children:['"Analyze ',(0,r.jsx)(n.a,{href:"https://github.com/fastapi/fastapi",children:"https://github.com/fastapi/fastapi"}),'"']}),"\nand get back a real health report with:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Lines of code by language"}),"\n",(0,r.jsx)(n.li,{children:"Git activity (commits, contributors, recent activity)"}),"\n",(0,r.jsx)(n.li,{children:"Test detection (frameworks, file count)"}),"\n",(0,r.jsx)(n.li,{children:"Dependency audit (requirements.txt, package.json, etc.)"}),"\n",(0,r.jsx)(n.li,{children:"Best practices check (README, L
1ICENSE, CI/CD, SECURITY.md)"}),"\n",(0,r.jsx)(n.li,{children:"Health score with letter grade (A/B/C/D)"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"How it works:"})," The Fetch agent plans the analysis, OpenClaw clones the repo into a\ntemporary sandbox and runs static analysis tools (no code from the repo is ever\nexecuted), then returns the results through ASI",":One","."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Why all three technologies:"})," An LLM alone cannot clone repos or run ",(0,r.jsx)(n.code,{children:"cloc"}),". OpenClaw alone\nis invisible to other users. A Fetch agent alone has no execution engine. Together, they\nprovide real tool execution (OpenClaw) accessible to anyone (Fetch/Agentverse) through\nnatural language (ASI",":One",")."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"See it in action:"})," ",(0,r.jsxs)(n.a,{href:"https://asi1.ai/chat/f7ccb160-88bc-46a0-bd44-041483eca338",children:["View a Sample Chat on ASI",":One"]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"quick-start",children:"Quick Start"}),"\n",(0,r.jsx)(n.h3,{id:"1-prerequisites",children:"1. Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Python 3.10+"}),"\n",(0,r.jsxs)(n.li,{children:["A ",(0,r.jsx)(n.a,{href:"https://agentverse.ai",children:"Fetch Agentverse"})," account & API key"]}),"\n",(0,r.jsxs)(n.li,{children:["An ",(0,r.jsxs)(n.a,{href:"https://asi1.ai",children:["ASI",":One"]})," API key (for LLM-powered planning)"]}),"\n",(0,r.jsx)(n.li,{children:"Git (for the repo analyzer workflow)"}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"2-install",children:"2. Install"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'cd path/to/innovation-lab-examples/openclaw/fetchai-openclaw-orchestrator\n\npython3 -m venv .venv && source .venv/bin/activate # Windows: .venv\\Scripts\\activate\npip install -e ".[dev]"\n'})}),"\n",(0,r.jsx)(n.h3,{id:"3-configure",children:"3. Configure"}),"\n",(0,r.jsx)(n.p,{children:"Copy the example and fill in your keys:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n# Then edit .env and add your real API keys\n"})}),"\n",(0,r.jsxs)(n.p,{children:["See ",(0,r.jsx)(n.a,{href:"#environment-variables",children:"Environment Variables"})," below for the full list.\nYou will need at minimum:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"AGENTVERSE_API_KEY"})," from ",(0,r.jsx)(n.a,{href:"https://agentverse.ai/profile/api-keys",children:"agentverse.ai/profile/api-keys"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ASI_ONE_API_KEY"})," from ",(0,r.jsx)(n.a,{href:"https://asi1.ai",children:"asi1.ai"})," (for LLM-powered planning)"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"4-set-up-demo-data",children:"4. Set Up Demo Data"}),"\n",(0,r.jsx)(n.p,{children:"Create safe sample repositories (fake git history) for the weekly report workflow:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"python scripts/setup_demo.py\n"})}),"\n",(0,r.jsxs)(n.p,{children:["This generates a ",(0,r.jsx)(n.code,{children:"demo_projects/"})," directory with 3 sample repos and ~12 fake\ncommits - ",(0,r.jsx)(n.strong,{children:"no real system data is ever touched during testing"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"5-run",children:"5. Run"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"# Terminal 1 - Orchestrator Agent\npython -m orchestrator.agent\n\n# Terminal 2 - OpenClaw Connector (auto-pairs with orchestrator)\nORCHESTRATOR_AGENT_ADDRESS=<address-from-terminal-1> python -m connector.server\n"})}),"\n",(0,r.jsxs)(n.p,{children:["On startup the connector sends a pairing request to the orchestrator.\nYou should see ",(0,r.jsx)(n.code,{children:"Paired successfully"})," in the connector logs."]}),"\n",(0,r.jsxs)(n.h3,{id:"6-register-mailbox-for-asi-access",children:["6. Register Mailbox (for ASI",":One"," access)"]}),"\n",(0,r.jsxs)(n.p,{children:["With the orchestrator running, register its mailbox on Agentverse so ASI",":One","\ncan deliver messages to it:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"python -c \"\nimport requests, os\nfrom dotenv import load_dotenv\nload_dotenv()\nresp = requests.post('http://127.0.0.1:8200/connect', json={\n 'user_token': os.getenv('AGENTVERSE_API_KEY'),\n 'agent_type': 'mailbox',\n}, timeout=30)\nprint(resp.json())\n\"\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You should see ",(0,r.jsx)(n.code,{children:"{'success': True, 'detail': None}"})," and the orchestrator logs\nwill show ",(0,r.jsx)(n.code,{children:"Successfully registered as mailbox agent in Agentverse"}),"."]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsxs)(n.h2,{id:"testing-from-asi",children:["Testing from ASI",":One"]}),"\n",(0,r.jsxs)(n.p,{children:["Once both agents are running and the mailbox is registered, go to\n",(0,r.jsx)(n.strong,{children:(0,r.jsxs)(n.a,{href:"https://asi1.ai",children:["ASI",":One"]})})," and send a message to the agent."]}),"\n",(0,r.jsx)(n.h3,{id:"repo-health-analyzer-prompts",children:"Repo Health Analyzer Prompts"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Prompt"}),(0,r.jsx)(n.th,{children:"What it does"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Analyze https://github.com/fastapi/fastapi"})}),(0,r.jsx)(n.td,{children:"Full health report for FastAPI"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Check the health of https://github.com/pallets/flask"})}),(0,r.jsx)(n.td,{children:"Health report for Flask"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Review https://github.com/fetchai/innovation-lab-examples/tree/main/openclaw/fetchai-openclaw-orchestrator"})}),(0,r.jsx)(n.td,{children:"Analyze this example in the Innovation Lab repo"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Analyze https://github.com/expressjs/express"})}),(0,r.jsx)(n.td,{children:"Health report for Express.js"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"https://github.com/django/django"})}),(0,r.jsx)(n.td,{children:"Even just a URL works"})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"weekly-dev-report-prompts",children:"Weekly Dev Report Prompts"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Prompt"}),(0,r.jsx)(n.th,{children:"What it does"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Generate my weekly dev report"})}),(0,r.jsx)(n.td,{children:"Scans demo repos, generates Markdown report"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Scan my projects and create a summary, then post to Slack"})}),(0,r.jsx)(n.td,{children:"3-step: scan, report, post (Slack)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Look at my repos and email the report to my team"})}),(0,r.jsx)(n.td,{children:"3-step: scan, report, post (email)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"Summarize: we shipped 3 features this week"})}),(0,r.jsx)(n.td,{children:"Runs text summarisation"})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"sample-chat",children:"Sample Chat"}),"\n",(0,r.jsxs)(n.p,{children:["See a real conversation with the agent on ASI:One:\n",(0,r.jsx)(n.a,{href:"https://asi1.ai/chat/f7ccb160-88bc-46a0-bd44-041483eca338",children:(0,r.jsxs)(n.strong,{children:["View Sample Chat on ASI",":One"]})})]}),"\n",(0,r.jsx)(n.h3,{id:"what-youll-see-repo-analyzer",children:"What You'll See (Repo Analyzer)"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"Repo Health Report: fastapi/fastapi\nHealth Score: 8.7/10 (Grade: A)\n\nLanguages:\n Python: 82.3% (48,200 lines)\n Markdown: 12.1% (7,100 lines)\n\nProject Stats:\n Total Files: 1,245\n Repo Size: 12.3 MB\n\nGit Activity:\n Total Commits: 3,456\n Commits (last 30 days): 124\n Contributors: 485\n\nTesting:\n Test Files Found: 340\n Frameworks Detected: pytest\n\nBest Practices:\n README: pass\n LICENSE: pass\n CI/CD Pipeline: pass\n SECURITY.md: pass\n"})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"running-tests",children:"Running Tests"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"pytest # run all 68 tests\npytest -v # verbose\npytest --cov # with coverage\n"})}
1),"\n",(0,r.jsx)(n.h3,{id:"end-to-end-local-test",children:"End-to-End Local Test"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"python scripts/local_test.py\n"})}),"\n",(0,r.jsx)(n.p,{children:"This simulates the full flow (pair, plan, dispatch, execute, result)\nin a single process without needing the agents to be running."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"project-structure",children:"Project Structure"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"fetchai-openclaw-orchestrator/\n|-- orchestrator/ # Fetch Orchestrator Agent (Agentverse)\n| |-- agent.py # Main entry point, agent construction\n| |-- planner.py # Objective -> TaskPlan (ASI:One LLM + fallback)\n| |-- policy.py # Fetch-side policy engine\n| |-- storage.py # In-memory device pairing store\n| +-- protocols/\n| |-- chat.py # AgentChatProtocol for ASI:One\n| |-- objective.py # Objective intake + task dispatch\n| |-- pairing.py # Device pairing protocol\n| +-- models.py # uAgents message models\n|\n|-- connector/ # OpenClaw Connector (local machine)\n| |-- server.py # Main entry point, auto-pairing\n| |-- executor.py # Task plan execution engine\n| |-- auth.py # Signature verification\n| |-- policy.py # Local policy engine (path sandbox, etc.)\n| +-- workflows/\n| |-- weekly_report.py # scan_directory, generate_report, post_summary\n| +-- repo_analyzer.py # clone_repo, analyze_repo, generate_health_report\n|\n|-- shared/ # Shared between orchestrator & connector\n| |-- schemas.py # Pydantic models (TaskPlan, TaskStep, etc.)\n| +-- crypto.py # Ed25519 key management & signing\n|\n|-- scripts/\n| |-- local_test.py # End-to-end local integration test\n| +-- setup_demo.py # Generate demo_projects/ with fake repos\n|\n|-- tests/ # 68 unit tests\n|-- blog/\n| +-- fetch-openclaw-integration.md # Technical blog post (step-by-step walkthrough)\n|-- pyproject.toml # Project metadata & dependencies\n|-- requirements.txt # Pinned dependencies\n+-- .env # Environment variables (not committed)\n"})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"architecture-deep-dive",children:"Architecture Deep Dive"}),"\n",(0,r.jsxs)(n.p,{children:["For a full step-by-step walkthrough with code samples, see the\n",(0,r.jsx)(n.a,{href:"./openclaw-fetchai-orchestrator-tech-walkthrough",children:"Technical Blog Post"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"how-it-works",children:"How It Works"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"1. Agent Creation (uAgents)"})}),"\n",(0,r.jsxs)(n.p,{children:["The orchestrator is a ",(0,r.jsx)(n.a,{href:"https://github.com/fetchai/uAgents",children:"uAgent"})," built with ",(0,r.jsx)(n.code,{children:"uagents==0.25.5"}),".\nThe ",(0,r.jsx)(n.code,{children:"Agent"})," class handles identity (Ed25519 keypair from the seed), messaging, protocol\nregistration, and Almanac registration on ",(0,r.jsx)(n.code,{children:"testnet"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["2. ASI",":One"," Compatibility (AgentChatProtocol)"]})}),"\n",(0,r.jsxs)(n.p,{children:["The agent implements the standard ",(0,r.jsx)(n.code,{children:"AgentChatProtocol"})," from ",(0,r.jsx)(n.code,{children:". When included with "}),"publish_manifest=True`, the protocol manifest is published to\nAgentverse, which makes ASI",":One"," able to discover and communicate with the agent."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"3. Agentverse Mailbox (Local Agent, Global Reach)"})}),"\n",(0,r.jsxs)(n.p,{children:["The agent runs on your machine but uses an Agentverse mailbox for inbound messages.\nMessages from ASI",":One"," are delivered to Agentverse, and the local agent polls for them.\nNo public IP, no port forwarding, no ngrok needed."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"4. Two Workflows"})}),"\n",(0,r.jsx)(n.p,{children:"The system supports two workflows out of the box:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Workflow"}),(0,r.jsx)(n.th,{children:"Actions"}),(0,r.jsx)(n.th,{children:"Use"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Repo Health Analyzer"})}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"clone_repo"})," -> ",(0,r.jsx)(n.code,{children:"analyze_repo"})," -> ",(0,r.jsx)(n.code,{children:"generate_health_report"})]}),(0,r.jsx)(n.td,{children:"Public: analyze any GitHub repo"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Weekly Dev Report"})}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"scan_directory"})," -> ",(0,r.jsx)(n.code,{children:"generate_report"})," -> ",(0,r.jsx)(n.code,{children:"post_summary"})]}),(0,r.jsx)(n.td,{children:"Paired: scan local repos"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"5. Signed Task Plans"})}),"\n",(0,r.jsxs)(n.p,{children:["Every task dispatch carries an Ed25519 signature over the full task plan. The\nconnector's ",(0,r.jsx)(n.code,{children:"RequestAuthenticator"})," verifies the signature against the orchestrator's\npublic key before executing anything. Tampered payloads are rejected."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"6. Dual Policy Enforcement"})}),"\n",(0,r.jsx)(n.p,{children:"Policies are checked at two independent layers:"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Layer"}),(0,r.jsx)(n.th,{children:"When"}),(0,r.jsx)(n.th,{children:"What it checks"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{children:["Fetch-side (",(0,r.jsx)(n.code,{children:"or
1chestrator/policy.py"}),")"]}),(0,r.jsx)(n.td,{children:"Planning time"}),(0,r.jsx)(n.td,{children:"Max steps, action allowlists, rate limits"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsxs)(n.td,{children:["Local (",(0,r.jsx)(n.code,{children:"connector/policy.py"}),")"]}),(0,r.jsx)(n.td,{children:"Execution time"}),(0,r.jsx)(n.td,{children:"Path sandboxing, action allowlists, no background execution"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["The orchestrator ",(0,r.jsx)(n.strong,{children:"cannot"})," bypass local policies. Your machine always has the final say."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.strong,{children:["7. Intelligent Planning (ASI",":One"," LLM)"]})}),"\n",(0,r.jsxs)(n.p,{children:["When ",(0,r.jsx)(n.code,{children:"ASI_ONE_API_KEY"})," is set, the orchestrator calls the ",(0,r.jsxs)(n.a,{href:"https://docs.asi1.ai",children:["ASI",":One"," LLM"]}),"\n(OpenAI-compatible API at ",(0,r.jsx)(n.code,{children:"https://api.asi1.ai/v1"}),", model ",(0,r.jsx)(n.code,{children:"asi1"}),") to convert\nnatural-language objectives into structured task plans. If the LLM is unavailable,\nthe planner falls back to keyword matching."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"8. Safety Model (Repo Analyzer)"})}),"\n",(0,r.jsx)(n.p,{children:"For the repo analyzer workflow specifically:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Only public GitHub HTTPS URLs are accepted"}),"\n",(0,r.jsx)(n.li,{children:"Repos are cloned into a temporary sandbox directory"}),"\n",(0,r.jsx)(n.li,{children:"No code from the repo is ever executed, imported, or installed"}),"\n",(0,r.jsx)(n.li,{children:"Size limit enforced (500 MB default)"}),"\n",(0,r.jsx)(n.li,{children:"Temp directory is deleted after analysis completes"}),"\n",(0,r.jsx)(n.li,{children:"Only static analysis tools are used (line counts, file parsing, git history)"}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"9. Feedback Loop Protection"})}),"\n",(0,r.jsxs)(n.p,{children:["When integrating with ASI",":One",", a practical challenge emerges: ASI",":One","'s LLM sometimes\nrewrites agent responses and sends them back as new objectives, creating infinite loops.\nThe chat handler includes multi-layered protection:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Echo pattern detection"})," - 100+ known ASI",":One"," rewrite patterns are blocked"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Emoji density check"})," - messages with 3+ emoji (typical of LLM rewrites) are filtered"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Per-sender cooldown"})," - 30-second minimum between objectives from the same sender"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Exact dedup"})," - identical objectives within a 120-second window are ignored"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Pending task cap"})," - maximum 5 concurrent tasks; stale entries are pruned"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"No intermediate messages"})," - the agent stays silent until the final result, avoiding\nthe primary trigger for ASI",":One","'s echo behavior"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"end-to-end-data-flow-repo-analyzer",children:"End-to-End Data Flow (Repo Analyzer)"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' 1. User types: "Analyze https://github.com/fastapi/fastapi" in ASI:One\n 2. ASI:One sends ChatMessage to the agent address\n 3. Agentverse mailbox holds the message\n 4. Local orchestrator polls and receives it\n 5. Chat handler runs feedback loop detection (echo patterns, cooldown, dedup)\n 6. Chat handler extracts the text and GitHub URL\n 7. Planner produces TaskPlan: [clone_repo, analyze_repo, generate_health_report]\n 8. Fetch-side policy validates the plan\n 9. Plan is serialised, signed with Ed25519, dispatched to connector\n10. Connector verifies signature, checks local policy\n11. clone_repo: shallow-clone into temp sandbox\n12. analyze_repo: cloc, git stats, deps, tests, security checks\n13. generate_health_report: compile scored Markdown report, delete temp dir\n14. Results sent back to orchestrator -> formatted -> sent to ASI:One (no intermediate messages)\n'})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"key-technologies",children:"Key Technologies"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Technology"}),(0,r.jsx)(n.th,{children:"Version"}),(0,r.jsx)(n.th,{children:"Role"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://github.com/fetchai/uAgents",children:"uAgents"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0.25.5"})}),(0,r.jsx)(n.td,{children:"Agent framework: identity, messaging, protocols, lifecycle"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://pypi.org/project/uagents-core/",children:"uAgents-core"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0.4.9"})}),(0,r.jsx)(n.td,{children:"Core protocol specs including AgentChatProtocol"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://agentverse.ai",children:"Agentverse"})}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{children:"Agent hosting, discovery, mailbox relay, manifest publishing"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsxs)(n.a,{href:"https://asi1.ai",children:["ASI",":One"," Chat"]})}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{children:"User-facing chat interface for interacting with agents"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsxs)(n.a,{href:"https://docs.asi1.ai",children:["ASI",":One"," LLM"]})}),(0,r.jsxs)(n.td,{children:["model: ",(0,r.jsx)(n.code,{children:"asi1"})]}),(0,r.jsx)(n.td,{children:"OpenAI-compatible API for intelligent task planning"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://innovationlab.fetch.ai/resources/docs/examples/chat-protocol/asi-compatible-uagents",children:"AgentChatProtocol"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0.3.0"})}),(0,r.jsxs)(n.td,{children:["Standard protocol for ASI",":One"," discoverability"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/EdDSA",children:"Ed25519"})}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{children:"Asymmetric signing for pairing and request authentication"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.a,{href:"https://docs.pydantic.dev",children:"Pydantic"})}),(0,r.jsx)(n.td,{}),(0,r.jsx)(n.td,{children:"Schema validation for task plans and messages"})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Variable"}),(0,r.jsx)(n.th,{children:"Default"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ORCHESTRATOR_AGENT_SEED"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"openclaw-orchestrator-dev-seed"})}),(0,r.jsx)(n.td,{children:"Seed for orchestrator agent identity"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ORCHESTRATOR_PORT"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"8200"})}),(0,r.jsx)(n.td,{children:"Orchestrator local server port"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CONNECTOR_AGENT_SEED"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"openclaw-connector-dev-seed"})}),(0,r.jsx)(n.td,{children:"Seed for connector agent identity"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CONNECTOR_PORT"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"8199"})}),(0,r.jsx)(n.td,{children:"Connector local server port"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CONNECTOR_USER_ID"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"u_dev"})}),(0,r.jsx)(n.td,{children:"User ID for pairing"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"CONNECTOR_DEVICE_ID"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"dev_local"})}),(0,r.jsx)(n.td,{children:"Device ID for pairing"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ORCHESTRATOR_AGENT_ADDRESS"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.em,{children:"(none)"})}),(0,r.jsx)(n.td,{children:"Set to auto-pair connector on startup"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"AGENT_NETWORK"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"testnet"})}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"testnet"})," or ",(0,r.jsx)(n.code,{children:"mainnet"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"AGENTVERSE_API_KEY"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.em,{children:"(none)"})}),(0,r.jsx)(n.td,{children:"Agentverse API key for mailbox registration"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ASI_ONE_API_KEY"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.em,{children:"(none)"})}),(0,r.jsxs)(n.td,{children:["ASI",":One"," API key for LLM planning"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ASI_ONE_BASE_URL"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"https://api.asi1.ai/v1"})}),(0,r.jsxs)(n.td,{children:["ASI",":One"," API base URL"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ASI_ONE_MODEL"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"asi1"})}),(0,r.jsxs)(n.td,{children:["ASI",":One"," model name"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"DEMO_PROJECTS_DIR"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"./demo_projects"})}),(0,r.jsx)(n.td,{children:"Safe demo directory for testing"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"USE_MAILBOX"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"true"})}),(0,r.jsx)(n.td,{children:"Enable Agentverse mailbox relay"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"MAX_REPO_SIZE_MB"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"500"})}),(0,r.jsx)(n.td,{children:"Max repo size for analyzer (MB)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"LOG_LEVEL"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"INFO"})}),(0,r.jsx)(n.td,{children:"Logging level"})]})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsxs)(n.em,{children:["Built with ",(0,r.jsx)(n.a,{href:"https://fetch.ai",children:"Fetch.ai uAgents"}),", ",(0,r.jsx)(n.a,{href:"https://openclaw.ai",children:"OpenClaw"}),",\nand ",(0,r.jsxs)(n.a,{href:"https://asi1.ai",children:["ASI",":One"]}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>l});var s=t(96540);const r={},i=s.createContext(r);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.