Sync from GitHub via hub-sync
Browse files- .env +0 -4
- .env.example +43 -0
- LICENSE +21 -0
- README.md +66 -39
- docs/ACP_PROTOCOL.md +89 -0
- docs/ARCHITECTURE.md +114 -0
- docs/DEPLOYMENT.md +117 -0
.env
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
GROQ_API_KEY=gsk_...
|
| 2 |
-
GEMINI_API_KEY=your_gemini_key_here
|
| 3 |
-
VAPE_PRIVATE_KEY=0x...
|
| 4 |
-
HACK_PRIVATE_KEY=0x...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.env.example
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# V.A.P.E. + HACK β Environment Configuration
|
| 2 |
+
# Copy to .env and fill in real values. NEVER commit .env (it is gitignored).
|
| 3 |
+
# For GitHub Actions, these are set as repository Secrets instead of a file.
|
| 4 |
+
|
| 5 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 6 |
+
# LLM / Inference (REQUIRED for the Python agent + SKILLFORGE synthesize)
|
| 7 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 8 |
+
# Groq β free tier, powers llama-3.1-8b-instant in agents/run.py & main.py
|
| 9 |
+
GROQ_API_KEY=gsk_your_groq_key_here
|
| 10 |
+
# Google Gemini β powers agent web_search intel feed (free tier; mind rate limits)
|
| 11 |
+
GEMINI_API_KEY=your_gemini_key_here
|
| 12 |
+
|
| 13 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 14 |
+
# On-chain data (Node src/ agent + SKILLFORGE recon tier)
|
| 15 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 16 |
+
# Base RPC endpoint (read-only). Public default works; private endpoint = higher limits
|
| 17 |
+
BASE_RPC_URL=https://mainnet.base.org
|
| 18 |
+
# Etherscan V2 multichain key β contract_recon (free tier) + wallet_trace (needs Pro)
|
| 19 |
+
# chainids: Base=8453 Eth=1 Arb=42161 Op=10 Polygon=137
|
| 20 |
+
ETHERSCAN_API_KEY=your_etherscan_v2_key_here
|
| 21 |
+
|
| 22 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 23 |
+
# Virtuals Protocol / ACP (Node src/acp + agents/acp.py)
|
| 24 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 25 |
+
VIRTUALS_API_KEY=your_virtuals_api_key_here
|
| 26 |
+
VIRTUALS_API_URL=https://api.virtuals.io
|
| 27 |
+
VAPE_AGENT_ID=your_acp_agent_id_here
|
| 28 |
+
|
| 29 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 30 |
+
# Wallet signing keys β KEEP SECRET. Used by agents/wallet.py for on-chain actions.
|
| 31 |
+
# In production these live ONLY in GitHub Secrets / a 600-perm local file, never here.
|
| 32 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
+
VAPE_PRIVATE_KEY=0x_your_vape_private_key
|
| 34 |
+
HACK_PRIVATE_KEY=0x_your_hack_private_key
|
| 35 |
+
|
| 36 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 37 |
+
# Runtime tuning (optional β sane defaults applied if unset)
|
| 38 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 39 |
+
CHECK_INTERVAL=3600 # Node agent investigation cycle, seconds
|
| 40 |
+
MAX_CASES_PER_RUN=3 # cap cases per cycle
|
| 41 |
+
LOG_LEVEL=info # pino log level for Node side
|
| 42 |
+
|
| 43 |
+
# GITHUB_TOKEN is injected automatically by GitHub Actions β do not set it here.
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 jUXTAPOSITION1 (V.A.P.E. β Virtual Ape Private Eye)
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -3,19 +3,19 @@ title: VAPE - Private Agent
|
|
| 3 |
emoji: π¦
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
-
sdk:
|
| 7 |
-
sdk_version: "
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
#
|
| 13 |
|
| 14 |
-
|
| 15 |
-
# VAPE β’ Private Mobile Agent
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
## Agent Commerce Protocol ACP Profile
|
| 21 |
**Deployment Base Blockchain + Virtuals Protocol**
|
|
@@ -44,61 +44,88 @@ Equal parts noir detective, blockchain archaeologist, and protocol guardian, V.A
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
## Project Structure
|
| 48 |
|
| 49 |
```
|
| 50 |
V.A.P.E/
|
| 51 |
-
βββ
|
| 52 |
-
β
|
| 53 |
-
|
| 54 |
-
β βββ
|
| 55 |
-
β βββ
|
| 56 |
-
β βββ
|
| 57 |
-
β βββ
|
| 58 |
-
β
|
| 59 |
-
|
| 60 |
-
βββ
|
| 61 |
-
βββ
|
| 62 |
-
βββ
|
| 63 |
-
|
| 64 |
-
βββ
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
```
|
| 67 |
|
|
|
|
|
|
|
|
|
|
| 68 |
---
|
| 69 |
|
| 70 |
## Quick Start
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
- Node.js 18+
|
| 75 |
-
- npm or yarn
|
| 76 |
-
- Base RPC endpoint
|
| 77 |
-
- Virtuals Protocol API key
|
| 78 |
-
|
| 79 |
-
### Installation
|
| 80 |
|
| 81 |
```bash
|
| 82 |
git clone https://github.com/jUXTAPOSITION1/V.A.P.E.git
|
| 83 |
cd V.A.P.E
|
| 84 |
-
|
| 85 |
-
cp .env.example .env
|
| 86 |
-
# Edit .env with your configuration
|
| 87 |
```
|
| 88 |
|
| 89 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
|
|
|
| 91 |
```bash
|
| 92 |
-
npm
|
|
|
|
| 93 |
```
|
| 94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
---
|
| 96 |
|
| 97 |
## Documentation
|
| 98 |
|
| 99 |
-
- [
|
| 100 |
-
- [ACP_PROTOCOL.md](docs/ACP_PROTOCOL.md)
|
| 101 |
-
- [
|
|
|
|
| 102 |
|
| 103 |
---
|
| 104 |
|
|
|
|
| 3 |
emoji: π¦
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.44.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# V.A.P.E. β VIRTUAL APE PRIVATE EYE
|
| 13 |
|
| 14 |
+
_Full control β’ Autonomous β’ Growing_
|
|
|
|
| 15 |
|
| 16 |
+
[](https://github.com/jUXTAPOSITION1/V.A.P.E/actions/workflows/bounty-cycle.yml)
|
| 17 |
+
[](https://github.com/jUXTAPOSITION1/V.A.P.E/actions/workflows/skillforge-toolcheck.yml)
|
| 18 |
+
[](LICENSE)
|
| 19 |
|
| 20 |
## Agent Commerce Protocol ACP Profile
|
| 21 |
**Deployment Base Blockchain + Virtuals Protocol**
|
|
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
+
## How It Runs (two cooperating runtimes + a self-improving forge)
|
| 48 |
+
|
| 49 |
+
- **Python engine** (`agents/`) β runs **hourly in GitHub Actions** (zero-cost, 24/7).
|
| 50 |
+
LLM analysis (Groq Llama 3.1) + Slither static analysis β timestamped reports.
|
| 51 |
+
- **Node agent** (`src/`) β a continuous on-chain investigation loop for local/blockchain depth.
|
| 52 |
+
- **SKILLFORGE** (`skillforge/`) β self-improving skill+tool ecosystem; 13 verified security
|
| 53 |
+
tools across static / fuzzing / AI-red-team / recon tiers, all on free runners.
|
| 54 |
+
- **intel/** β the real-data audit trail (reports, audits, broadcasts, bounty-radar).
|
| 55 |
+
- **ACP monitor** β autonomous USDC-escrow revenue via 14 live offerings on Virtuals/Base.
|
| 56 |
+
|
| 57 |
+
> **Real data only.** Every loop is grounded in live on-chain/market/CVE sources β
|
| 58 |
+
> no simulated or hypothetical output.
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
## Project Structure
|
| 63 |
|
| 64 |
```
|
| 65 |
V.A.P.E/
|
| 66 |
+
βββ agents/ # Python engine (CI workhorse): run.py, main.py, vape.py, hack.py,
|
| 67 |
+
β # acp.py, wallet.py, redteam.py, self_improve.py, *_system.md
|
| 68 |
+
βββ src/ # Node agent (continuous investigation lifecycle)
|
| 69 |
+
β βββ agents/vape.js # VAPEAgent class + investigation loop
|
| 70 |
+
β βββ blockchain/ # analyzer.js (Base RPC activity)
|
| 71 |
+
β βββ security/ # scanner.js (threat detection)
|
| 72 |
+
β βββ data-fetchers/ # fetcher.js (market metrics)
|
| 73 |
+
β βββ acp/ # protocol.js (findings reporting)
|
| 74 |
+
β βββ config/ # logger.js (pino)
|
| 75 |
+
βββ skillforge/ # Self-improving skill+tool ecosystem
|
| 76 |
+
β βββ tools/ # static/ fuzzing/ ai-redteam/ recon/ (13 tools)
|
| 77 |
+
β βββ skills/ # playbooks (sc-static, ai-redteam, onchain-recon)
|
| 78 |
+
β βββ memory/ # append-only registry + findings/skills/lessons + INDEX
|
| 79 |
+
βββ intel/ # Real-data audit trail
|
| 80 |
+
β βββ reports/ audits/ broadcasts/ bounty-radar/ engagements/ catalog/
|
| 81 |
+
βββ .github/workflows/ # bounty-cycle, skillforge-{harvest,toolcheck,synthesize}, sync-to-hub
|
| 82 |
+
βββ docs/ # ARCHITECTURE.md, ACP_PROTOCOL.md, DEPLOYMENT.md, index.html (Pages)
|
| 83 |
+
βββ app.py # Gradio UI (Hugging Face Space)
|
| 84 |
+
βββ package.json # Node agent deps/scripts (ESM, main: src/agents/vape.js)
|
| 85 |
+
βββ requirements.txt # gradio (UI); agents/requirements.txt = Python engine deps
|
| 86 |
+
βββ .env.example # all referenced env vars (copy to .env)
|
| 87 |
```
|
| 88 |
|
| 89 |
+
_Tree reflects tracked files (`git ls-files`). Not every claimed-but-empty dir from earlier
|
| 90 |
+
drafts exists; this is the real layout._
|
| 91 |
+
|
| 92 |
---
|
| 93 |
|
| 94 |
## Quick Start
|
| 95 |
|
| 96 |
+
There are **two run paths** β the Python engine (what CI runs) and the Node agent (local depth).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
```bash
|
| 99 |
git clone https://github.com/jUXTAPOSITION1/V.A.P.E.git
|
| 100 |
cd V.A.P.E
|
| 101 |
+
cp .env.example .env # fill in real values (gitignored)
|
|
|
|
|
|
|
| 102 |
```
|
| 103 |
|
| 104 |
+
### Path 1 β Python engine (matches CI; needs only a Groq key)
|
| 105 |
+
```bash
|
| 106 |
+
pip install -r agents/requirements.txt
|
| 107 |
+
python -m agents.run # bounty-hunt pass
|
| 108 |
+
python -m agents.run --review-repo # self-review pass
|
| 109 |
+
```
|
| 110 |
|
| 111 |
+
### Path 2 β Node agent (continuous on-chain investigation)
|
| 112 |
```bash
|
| 113 |
+
npm install
|
| 114 |
+
npm start # src/agents/vape.js investigation loop
|
| 115 |
```
|
| 116 |
|
| 117 |
+
### Path 3 β Just deploy it autonomously (recommended)
|
| 118 |
+
Set `GROQ_API_KEY` in **repo Secrets** and enable Actions. The hourly workflows run VAPE
|
| 119 |
+
24/7 with zero local compute. Full steps in [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md).
|
| 120 |
+
|
| 121 |
---
|
| 122 |
|
| 123 |
## Documentation
|
| 124 |
|
| 125 |
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) β system architecture, runtimes, data flow
|
| 126 |
+
- [docs/ACP_PROTOCOL.md](docs/ACP_PROTOCOL.md) β ACP integration, job lifecycle, 14 offerings
|
| 127 |
+
- [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) β deploy the CI engine, Node agent, UI, and ACP monitor
|
| 128 |
+
- **Live dashboard:** [Bounty Command Center](https://jUXTAPOSITION1.github.io/V.A.P.E/) (GitHub Pages)
|
| 129 |
|
| 130 |
---
|
| 131 |
|
docs/ACP_PROTOCOL.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ACP Protocol Integration
|
| 2 |
+
|
| 3 |
+
How V.A.P.E. earns autonomous on-chain revenue via the **Agent Commerce Protocol (ACP)**
|
| 4 |
+
on Virtuals Protocol / Base.
|
| 5 |
+
|
| 6 |
+
> Status: β
live Β· π‘ partial Β· βͺ planned
|
| 7 |
+
|
| 8 |
+
## What ACP gives the agent
|
| 9 |
+
ACP is Virtuals Protocol's stack for autonomous-agent identity + commerce. VAPE operates
|
| 10 |
+
as a **provider** (sells security/intel services) and can act as a **client** (hires other
|
| 11 |
+
agents). Every job is an on-chain **USDC-escrow** contract on Base (chainId 8453).
|
| 12 |
+
|
| 13 |
+
- **Identity:** ACP agent + on-chain wallet, ERC-8004 registered (agent #54988). β
|
| 14 |
+
- **Signer:** P256 signing key, `restricted` policy (authorizes all ACP txns). β
|
| 15 |
+
- **Wallet:** `0xa1420293a7df49bc8380f543a1fe7b8d6f582879`, USDC-funded on Base. β
|
| 16 |
+
|
| 17 |
+
## Job lifecycle (provider / selling side)
|
| 18 |
+
|
| 19 |
+
```
|
| 20 |
+
job.created βββΊ set-budget βββΊ job.funded βββΊ submit βββΊ completed
|
| 21 |
+
(client) (VAPE) (client) (VAPE) (escrow β VAPE)
|
| 22 |
+
β β
|
| 23 |
+
ββ price = offering priceValue ββ real deliverable from SKILLFORGE tool
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
| Phase | Who acts | Command |
|
| 27 |
+
|---|---|---|
|
| 28 |
+
| `job.created` | VAPE | `acp provider set-budget --job-id <id> --amount <price> --chain-id 8453` |
|
| 29 |
+
| `job.funded` | VAPE | run tool β `acp provider submit --job-id <id> --deliverable <data>` |
|
| 30 |
+
| `submitted` | client | `acp client complete` / `reject` |
|
| 31 |
+
| `completed` | β | escrow released to VAPE (terminal) |
|
| 32 |
+
|
| 33 |
+
## Live offerings (14)
|
| 34 |
+
Each offering maps to a verified SKILLFORGE tool that produces **real data only**.
|
| 35 |
+
|
| 36 |
+
| Offering | Price (USDC) | SLA | Backing tool |
|
| 37 |
+
|---|---|---|---|
|
| 38 |
+
| exploit_check | 0.01 | 5m | contract_recon + slither |
|
| 39 |
+
| partner_referral | 0.01 | 5m | referral |
|
| 40 |
+
| token_safety_check | 0.02 | 5m | recon/token_safety.sh |
|
| 41 |
+
| liquidity_check | 0.02 | 5m | token_safety.sh (dex) |
|
| 42 |
+
| wallet_recon | 0.03 | 5m | recon/wallet_trace.sh / base_rpc |
|
| 43 |
+
| rug_pull_alert | 0.03 | 5m | token_safety.sh (mint/owner) |
|
| 44 |
+
| tx_decode | 0.05 | 5m | contract_recon (abi) + RPC |
|
| 45 |
+
| safety_preflight | 0.05 | 5m | token_safety + contract_recon |
|
| 46 |
+
| whale_watch | 0.10 | 5m | wallet_trace + market_data |
|
| 47 |
+
| community_intel_broadcast | 0.10 | 5m | intel/broadcasts + market_data |
|
| 48 |
+
| market_intel | 0.15 | 5m | recon/market_data.sh |
|
| 49 |
+
| bulk_safety_bundle | 0.50 | 15m | token_safety Γ N |
|
| 50 |
+
| deep_contract_audit | 1.00 | 30m | slither + aderyn + mythril |
|
| 51 |
+
| forensics_deep | 2.00 | 60m | wallet_trace + contract_recon |
|
| 52 |
+
|
| 53 |
+
## The autonomous monitor (β
)
|
| 54 |
+
Jobs are caught and fulfilled at near-zero compute via a 3-layer monitor:
|
| 55 |
+
1. **Listener daemon** β `acp events listen` streams job events to a file. Zero LLM.
|
| 56 |
+
2. **Drain + triage** β classifies events, tracks per-job state, idempotent. Zero LLM.
|
| 57 |
+
3. **Reasoning handler** β fires only on a real funded job: reads the requirement, runs
|
| 58 |
+
the mapped tool, submits a tailored deliverable, settles, logs to `intel/catalog/`.
|
| 59 |
+
|
| 60 |
+
This keeps cost β 0 while idle; the model only wakes when escrow money is on the table.
|
| 61 |
+
|
| 62 |
+
## Client side (hiring other agents) π‘
|
| 63 |
+
VAPE can also delegate: `acp browse "<service>"` β `acp client create-job` β `fund` β
|
| 64 |
+
`complete`. Used to obtain specialist work (data, compute, content) when cheaper than
|
| 65 |
+
doing it in-house.
|
| 66 |
+
|
| 67 |
+
## CLI surface (reference)
|
| 68 |
+
All actions run through the ACP CLI (`acp`), never ad-hoc Web3 scripts:
|
| 69 |
+
```
|
| 70 |
+
acp agent whoami # identity + signer
|
| 71 |
+
acp offering list # our sellable services
|
| 72 |
+
acp job list --all # active jobs
|
| 73 |
+
acp events listen # provider monitor stream
|
| 74 |
+
acp provider set-budget # price a job
|
| 75 |
+
acp provider submit # deliver
|
| 76 |
+
acp client fund/complete # buyer side
|
| 77 |
+
acp wallet balance # treasury
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## Security
|
| 81 |
+
- Signing keys never live in the repo; signer is provisioned per-environment via
|
| 82 |
+
`acp agent add-signer` (one-time browser approval).
|
| 83 |
+
- `restricted` policy scopes the signer to ACP transactions only.
|
| 84 |
+
- Real deliverables only β never fabricated findings, scores, or tx hashes.
|
| 85 |
+
|
| 86 |
+
## Roadmap
|
| 87 |
+
- βͺ Full end-to-end deliverable automation for all 14 offerings.
|
| 88 |
+
- βͺ Dynamic pricing from demand + dedup against `intel/catalog/`.
|
| 89 |
+
- βͺ Client-side delegation for compute-heavy audits.
|
docs/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# V.A.P.E. Architecture
|
| 2 |
+
|
| 3 |
+
> Status legend: β
implemented & running Β· π‘ partial/scaffolded Β· βͺ planned
|
| 4 |
+
|
| 5 |
+
V.A.P.E. is an autonomous on-chain security & intelligence operation. It runs as
|
| 6 |
+
**two cooperating runtimes** plus a **self-improving skill ecosystem**, all on free
|
| 7 |
+
tiers (Groq + GitHub Actions + open-source tooling).
|
| 8 |
+
|
| 9 |
+
## High-level flow
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
ββββββββββββββββββββββββββββββββββββββββββββ
|
| 13 |
+
β DATA SOURCES (real) β
|
| 14 |
+
β Base RPC Β· Etherscan V2 Β· DexScreener β
|
| 15 |
+
β GoPlus Β· CoinGecko Β· DeFiLlama Β· CVEs β
|
| 16 |
+
β Immunefi/Code4rena Β· X/@based_vape β
|
| 17 |
+
βββββββββββββββββ¬βββββββββββββββββββββββββββ
|
| 18 |
+
β
|
| 19 |
+
βββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
|
| 20 |
+
β β β
|
| 21 |
+
βββββββββΌβββββββββ βββββββββββΌββββββββββ βββββββββββΌββββββββββ
|
| 22 |
+
β PYTHON ENGINE β β NODE AGENT β β SKILLFORGE β
|
| 23 |
+
β (CI, hourly) β β (local, periodic) β β (GitHub Actions) β
|
| 24 |
+
β agents/*.py β β src/*.js β β skillforge/* β
|
| 25 |
+
β β β β β β
|
| 26 |
+
β β
run.py β β π‘ vape.js loop β β β
harvest hourly β
|
| 27 |
+
β β
vape/hack β β π‘ analyzer β β β
toolcheck 6x/d β
|
| 28 |
+
β β
Groq LLM β β π‘ scanner β β β
synthesizeβPR β
|
| 29 |
+
β β
slither β β π‘ fetcher β β β
13 sec tools β
|
| 30 |
+
β π‘ acp/wallet β β π‘ acp/protocol β β β
memory base β
|
| 31 |
+
βββββββββ¬βββββββββ βββββββββββ¬ββββββββββ βββββββββββ¬ββββββββββ
|
| 32 |
+
β β β
|
| 33 |
+
βββββββββββββββββββ¬ββββββββββββββββ΄ββββββββββββββββββ¬ββββββββββββββββ
|
| 34 |
+
β β
|
| 35 |
+
ββββββββββΌβββββββββ ββββββββββΌββββββββββ
|
| 36 |
+
β intel/ (β
) β β ACP MONITOR (β
) β
|
| 37 |
+
β reports/audits/ β β eventsβtriageβ β
|
| 38 |
+
β broadcasts/ β β negotiate/fund/ β
|
| 39 |
+
β bounty-radar/ β β complete jobs β
|
| 40 |
+
ββββββββββ¬βββββββββ ββββββββββ¬ββββββββββ
|
| 41 |
+
β β
|
| 42 |
+
ββββββββββΌβββββββββ ββββββββββΌββββββββββ
|
| 43 |
+
β GitHub Pages / β β Virtuals ACP β
|
| 44 |
+
β HF Space (UI)π‘ β β USDC escrow $$$ β
β
|
| 45 |
+
βββββββββββββββββββ ββββββββββββββββββββ
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Components
|
| 49 |
+
|
| 50 |
+
### 1. Python engine β `agents/` β
(the CI workhorse)
|
| 51 |
+
Runs hourly in GitHub Actions (`.github/workflows/bounty-cycle.yml`).
|
| 52 |
+
- **`run.py`** β single-pass orchestrator. `ask_llm()` (Groq `llama-3.1-8b-instant`,
|
| 53 |
+
3-retry rate-limit backoff) + `run_slither()` (30s timeout). Dual mode via
|
| 54 |
+
`--review-repo` β bounty reports vs. self-review reports.
|
| 55 |
+
- **`main.py`** β `VAPE` (investigator) + `HACK` (red-team auditor) over fetched bounties.
|
| 56 |
+
- **`vape.py` / `hack.py`** β persona engines with `vape_system.md` / `hack_system.md` prompts.
|
| 57 |
+
- **`tools.py`** β `fetch_bounties()`, `log_report()`.
|
| 58 |
+
- **`acp.py` / `wallet.py`** π‘ β ACP reporting + wallet scaffolding (signing via ACP CLI).
|
| 59 |
+
- **`redteam.py` / `self_improve.py` / `create_pr.py` / `self_pr.py`** β AI red-team + self-improvement β opens PRs.
|
| 60 |
+
|
| 61 |
+
### 2. Node agent β `src/` π‘ (continuous-investigation lifecycle)
|
| 62 |
+
Local/long-running runtime (`package.json`, ESM, `main: src/agents/vape.js`).
|
| 63 |
+
- **`agents/vape.js`** β `VAPEAgent` class: `initialize()`, `startInvestigation()`
|
| 64 |
+
(`setInterval` cycles), `runInvestigationCycle()` β calls the modules below.
|
| 65 |
+
- **`blockchain/analyzer.js`** β `analyzeRecentActivity()` over Base RPC.
|
| 66 |
+
- **`security/scanner.js`** β `scanForThreats()`.
|
| 67 |
+
- **`data-fetchers/fetcher.js`** β `getMarketMetrics()`.
|
| 68 |
+
- **`acp/protocol.js`** β `reportFindings()` + alerting.
|
| 69 |
+
- **`config/logger.js`** β pino logging.
|
| 70 |
+
- Read-only provider today (no signing). Not wired into CI (CI uses the Python engine).
|
| 71 |
+
|
| 72 |
+
### 3. SKILLFORGE β `skillforge/` β
(self-improving skill+tool ecosystem)
|
| 73 |
+
Zero-local-compute skill growth via GitHub Actions. See `skillforge/MANIFEST.md`.
|
| 74 |
+
- **harvest** (hourly) β real CVE + tool-release intel, no LLM.
|
| 75 |
+
- **toolcheck** (6Γ/day) β installs & verifies 13 security tools on runners, no LLM.
|
| 76 |
+
- **synthesize** (daily) β Groq distills harvested data β opens a PR.
|
| 77 |
+
- **Tool tiers:** static (slither/aderyn/mythril) Β· fuzzing (echidna/foundry) Β·
|
| 78 |
+
ai-redteam (garak/promptfoo/deepteam) Β· recon (token_safety/contract_recon/wallet_trace/base_rpc/market_data).
|
| 79 |
+
- **Memory:** append-only `memory/` (tools-registry.json, findings/skills/lessons.jsonl, INDEX.md).
|
| 80 |
+
- **Skills:** playbooks in `skillforge/skills/` (sc-static-analysis, ai-agent-redteam, onchain-recon-forensics).
|
| 81 |
+
|
| 82 |
+
### 4. intel/ pipeline β
(the audit trail)
|
| 83 |
+
Timestamped real-data outputs committed continuously: `reports/`, `audits/poc-reports/`,
|
| 84 |
+
`broadcasts/`, `bounty-radar/`, `engagements/`, `catalog/`. Synced to the HF Space via
|
| 85 |
+
`sync-to-hub.yml`.
|
| 86 |
+
|
| 87 |
+
### 5. ACP job monitor β
(autonomous revenue)
|
| 88 |
+
Catches incoming ACP jobs and negotiates β funds β completes at near-zero compute.
|
| 89 |
+
3 layers: persistent `acp events listen` daemon (zero LLM) β drain+triage loop (zero LLM)
|
| 90 |
+
β reasoning handler that fires only on a real funded job. 14 live offerings; USDC escrow on Base.
|
| 91 |
+
*(Operational layer; runs on the host alongside the repo.)*
|
| 92 |
+
|
| 93 |
+
### 6. UI β `app.py` / `docs/` π‘
|
| 94 |
+
Gradio app (`app.py`, `requirements.txt: gradio`) for the HF Space; `docs/index.html`
|
| 95 |
+
is the GitHub Pages "Bounty Command Center" status page. Currently minimal/status-level.
|
| 96 |
+
|
| 97 |
+
## Data-flow summary
|
| 98 |
+
Real sources β engines analyze β findings written to `intel/` (audit trail) and
|
| 99 |
+
SKILLFORGE memory (learning) β surfaced via UI/broadcasts β monetized via ACP jobs.
|
| 100 |
+
Every loop is grounded in **real data only** β no simulated or hypothetical output.
|
| 101 |
+
|
| 102 |
+
## Runtime map
|
| 103 |
+
| Runtime | Trigger | Compute | State |
|
| 104 |
+
|---|---|---|---|
|
| 105 |
+
| Python engine | GH Actions hourly | free runner | reports/ commits |
|
| 106 |
+
| SKILLFORGE | GH Actions (hourly/6x/daily) | free runner | skillforge/memory |
|
| 107 |
+
| Node agent | local `npm start` | local | in-memory + intel/ |
|
| 108 |
+
| ACP monitor | persistent daemon | ~zero idle | acp-monitor/state.json |
|
| 109 |
+
|
| 110 |
+
## Current vs. future
|
| 111 |
+
**Now:** autonomous hourly LLM+slither reports, SKILLFORGE 13-tool verification, intel
|
| 112 |
+
audit trail, ACP job monetization, self-review PRs.
|
| 113 |
+
**Next:** wire Node fetchers to grounded targets, richer UI, external-target auditing
|
| 114 |
+
(beyond self-repo), persistent cross-run agent memory, full ACP deliverable automation.
|
docs/DEPLOYMENT.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Deployment Guide
|
| 2 |
+
|
| 3 |
+
V.A.P.E. runs on free tiers. There are three independently deployable surfaces:
|
| 4 |
+
**(A) the autonomous CI engine**, **(B) the local Node agent**, **(C) the UI**.
|
| 5 |
+
|
| 6 |
+
## Prerequisites
|
| 7 |
+
- GitHub account (free Actions minutes; public repo = unlimited)
|
| 8 |
+
- Groq API key (free) β `GROQ_API_KEY`
|
| 9 |
+
- Optional: Gemini key, Etherscan V2 key, Base RPC URL, Virtuals/ACP credentials
|
| 10 |
+
- Node.js 18+ (only for the local Node agent)
|
| 11 |
+
- Python 3.11+ (for local Python runs)
|
| 12 |
+
|
| 13 |
+
## 0. Clone & configure
|
| 14 |
+
```bash
|
| 15 |
+
git clone https://github.com/jUXTAPOSITION1/V.A.P.E.git
|
| 16 |
+
cd V.A.P.E
|
| 17 |
+
cp .env.example .env # fill in real values; .env is gitignored
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## A. Autonomous CI engine (recommended β 24/7, zero cost)
|
| 23 |
+
The Python engine + SKILLFORGE run entirely in GitHub Actions. No server needed.
|
| 24 |
+
|
| 25 |
+
### A1. Set repository secrets
|
| 26 |
+
`Settings β Secrets and variables β Actions β New repository secret`:
|
| 27 |
+
|
| 28 |
+
| Secret | Required | Used by |
|
| 29 |
+
|---|---|---|
|
| 30 |
+
| `GROQ_API_KEY` | β
| bounty-cycle, synthesize |
|
| 31 |
+
| `GEMINI_API_KEY` | β¬ | intel web_search |
|
| 32 |
+
| `ETHERSCAN_API_KEY` | β¬ | recon toolcheck (contract_recon) |
|
| 33 |
+
| `GITHUB_TOKEN` | auto | commits/pushes (injected by Actions) |
|
| 34 |
+
|
| 35 |
+
> If `GITHUB_TOKEN` is restricted by org policy and pushes fail, add a fine-grained
|
| 36 |
+
> **PAT** with `contents: write` as a secret (e.g. `VAPE_PAT`) and reference it in the
|
| 37 |
+
> workflow checkout/push step.
|
| 38 |
+
|
| 39 |
+
### A2. Workflows (already in `.github/workflows/`)
|
| 40 |
+
| Workflow | Schedule | Purpose |
|
| 41 |
+
|---|---|---|
|
| 42 |
+
| `bounty-cycle.yml` | hourly `0 * * * *` | bounty-hunt + self-review β commits reports/ |
|
| 43 |
+
| `skillforge-harvest.yml` | hourly `:17` | real CVE + tool-release intel (no LLM) |
|
| 44 |
+
| `skillforge-toolcheck.yml` | every 4h `:37` | install+verify 13 security tools (no LLM) |
|
| 45 |
+
| `skillforge-synthesize.yml` | daily `06:00` | Groq distill β opens PR |
|
| 46 |
+
| `sync-to-hub.yml` | manual/dispatch | mirror to Hugging Face Space |
|
| 47 |
+
|
| 48 |
+
### A3. Enable & verify
|
| 49 |
+
```bash
|
| 50 |
+
# Enable Actions in the repo UI, then trigger a manual run:
|
| 51 |
+
# Actions β "VAPE + HACK Bounty + Self-Improvement Cycle" β Run workflow
|
| 52 |
+
# Confirm a new file appears under reports/ after the run.
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## B. Local Node agent (continuous investigation, blockchain depth)
|
| 58 |
+
For long-running on-chain monitoring beyond the hourly CI pass.
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
npm install
|
| 62 |
+
npm run setup-wallet # one-time wallet setup (if applicable)
|
| 63 |
+
npm start # starts VAPEAgent investigation loop (src/agents/vape.js)
|
| 64 |
+
# dev mode with reload:
|
| 65 |
+
npm run dev
|
| 66 |
+
```
|
| 67 |
+
Reads `BASE_RPC_URL`, `VIRTUALS_API_KEY`, `CHECK_INTERVAL`, `MAX_CASES_PER_RUN`, `LOG_LEVEL`
|
| 68 |
+
from `.env`. Read-only by default (no signing).
|
| 69 |
+
|
| 70 |
+
### Local Python run (single pass)
|
| 71 |
+
```bash
|
| 72 |
+
pip install -r agents/requirements.txt
|
| 73 |
+
python -m agents.run # bounty mode
|
| 74 |
+
python -m agents.run --review-repo # self-review mode
|
| 75 |
+
python -m agents.main # VAPE + HACK over fetched bounties
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## C. UI surfaces
|
| 81 |
+
### C1. Hugging Face Space (Gradio)
|
| 82 |
+
`app.py` + `requirements.txt` (`gradio`) deploy to a HF Space. The repo auto-mirrors via
|
| 83 |
+
`sync-to-hub.yml` (set the `HF_TOKEN` secret). The Space frontmatter lives in the repo
|
| 84 |
+
README/Space config.
|
| 85 |
+
|
| 86 |
+
### C2. GitHub Pages (status dashboard)
|
| 87 |
+
`docs/index.html` is the "Bounty Command Center". Enable Pages:
|
| 88 |
+
`Settings β Pages β Source: Deploy from branch β main /docs`.
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## D. ACP job monitor (autonomous revenue)
|
| 93 |
+
The provider monitor (catch β negotiate β fund β complete) runs on a host with the ACP
|
| 94 |
+
CLI configured. One-time setup:
|
| 95 |
+
```bash
|
| 96 |
+
acp configure # auth (one URL click)
|
| 97 |
+
acp agent add-signer --policy restricted # signer (one URL click)
|
| 98 |
+
acp offering list # confirm offerings live
|
| 99 |
+
# start the monitor daemons (see acp-monitor/README.md on the host)
|
| 100 |
+
```
|
| 101 |
+
See `docs/ACP_PROTOCOL.md` for the full lifecycle.
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
## Verification checklist
|
| 106 |
+
- [ ] `.env` filled (or secrets set in Actions) β never commit `.env`
|
| 107 |
+
- [ ] Manual workflow run produced a new `reports/` file
|
| 108 |
+
- [ ] SKILLFORGE toolcheck shows tools verified (Actions log)
|
| 109 |
+
- [ ] (Node) `npm start` connects to Base RPC and logs a cycle
|
| 110 |
+
- [ ] (ACP) `acp agent whoami` shows agent + signer; offerings listed
|
| 111 |
+
- [ ] (Pages) status dashboard reachable
|
| 112 |
+
- [ ] No secrets in git history (`git log -p -- .env` should be empty/placeholder)
|
| 113 |
+
|
| 114 |
+
## Security notes
|
| 115 |
+
- `.env` is gitignored; only `.env.example` (placeholders) is committed.
|
| 116 |
+
- Private keys live in GitHub Secrets or 600-perm local files β never in the repo.
|
| 117 |
+
- The ACP signer is `restricted`-scoped and per-environment (revocable from the dashboard).
|