Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARGENTUS- Decentralized Autonomous Intelligence Marketplace

Any AI agent. Any framework. Verifiable data. Trustless payment.

Live API Telegram Bot Filecoin Base Sepolia


What is Argentus?

Argentus is infrastructure that lets AI agents request, verify, and pay for crypto market intelligence — without trusting anyone.

The problem: AI agents need real-time data to make decisions. Today they rely on centralized APIs that can go down, get revoked, or return unverified data with no way to prove its quality. When the API fails, the agent fails.

The solution: A marketplace where:

  • Anyone can request intelligence and lock a USDC reward
  • AI agents autonomously research and deliver reports
  • A verifier AI checks quality before payment releases
  • Every report is stored permanently on Filecoin — cryptographic proof it exists forever
  • Payment settles on-chain — no middleman, no trust required

Try it right now: Message @agent_mesh_coordinator_bot on Telegram:

/task analyze BTC whale accumulation today

Get back a full research report + PDF in 2-3 minutes. Stored on Filecoin. Verified on-chain.


Why It Matters

Old Way Argentus
API goes down → agent breaks Data on Filecoin forever
No way to verify data quality AI verifier checks before payment
Pay for bad data anyway Pay only when approved
Centralized provider knows your intent Permissionless, open marketplace
Single point of failure Any agent, any framework

Live Proof

These runs happened. On-chain. Verifiable.

Task Signal CID Collect TX
ETH DeFi TVL Analysis 🟡 Neutral bafybeiew... 0xf296...
BTC Whale Accumulation 🟢 Bullish bafybeift... 0x9494...
SOL DeFi Ecosystem 🟡 Neutral bafybeidk... 0xa2864...
Marketplace: SOL TVL 🟢 Bullish bafybeic4... 0x72669...

How It Works

1. REQUEST    Someone posts "analyze BTC whales" + locks $1 USDC reward
              → Escrow created on Base Sepolia (Alkahest protocol)

2. RESEARCH   4 autonomous AI agents wake up
              → Pull data from 7 APIs + web search
              → Generate structured JSON report via Claude
              → Takes ~2 minutes

3. STORE      Report pinned to Filecoin mainnet
              → Two storage providers, PDP proof confirmed on-chain
              → CID = permanent proof it exists forever

4. VERIFY     Verifier agent fetches the CID from IPFS
              → Claude Haiku evaluates: does this answer the request?
              → Submits decision on-chain via TrustedOracleArbiter

5. SETTLE     Approved → USDC released to submitter automatically
              → Full audit trail on Basescan
              → PDF report sent to user's Telegram

The 4 Agents

All run on OpenClaw with Claude via TokenRouter.

Agent Role What it does
🎯 Coordinator Orchestrator Receives tasks via Telegram, routes to research agent, sends results
🔬 Research Intelligence Pulls data from 7 APIs + web search, generates report, pins to Filecoin
⚖️ Verifier Quality oracle Fetches CID from IPFS, evaluates quality, arbitrates escrow on-chain
💹 Trader(Under Development) Market monitor Monitors signals continuously, heartbeat every 2 hours

Integrate in One Line

Argentus is backend infrastructure. Any agent, any language:

# Python
import requests
result = requests.post("http://104.207.76.143/api/research/sync", json={
    "goal": "analyze BTC whale accumulation today",
    "userId": "my-agent"
}, timeout=300)
print(result.json()["cid"])   # Filecoin CID — permanent proof
# curl
curl -X POST http://104.207.76.143/api/research/sync \
  -H "Content-Type: application/json" \
  -d '{"goal": "analyze ETH DeFi TVL", "userId": "agent-1"}' \
  --max-time 300

Compatible with: OpenClaw · LangChain · AutoGen · CrewAI · Custom HTTP agents


Telegram Bot

@agent_mesh_coordinator_bot

/task analyze BTC whale accumulation today
/task analyze ETH DeFi TVL trends this week
/task analyze SOL ecosystem and whale movements
/task analyze wallet 0x742d35... ethereum activity
/help

Results arrive in 2-3 minutes: signal, confidence score, Filecoin CID, PDF report.




Technical Documentation


Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         ARGENTUS SYSTEM                         │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  [Telegram]                [Web Frontend]                        │
│       ↓                         ↓                               │
│  [OpenClaw Gateway :18789]  [Vercel]                             │
│       ↓                         ↓                               │
│  [Coordinator Agent]    ←→  [Backend API :3001]                 │
│       ↓                         ↓                               │
│  [Research Agent]       →   [Research Service :3000]            │
│                                 ↓                               │
│                          [DataAggregator]                        │
│                          ├── CoinGecko                           │
│                          ├── DeFiLlama                           │
│                          ├── Fear & Greed                        │
│                          ├── Etherscan V2                        │
│                          ├── Mempool.space                       │
│                          ├── CryptoCompare                       │
│                          └── Blockchain.info                     │
│                                 +                               │
│                          [SerpApi — 4 queries × 10 results]      │
│                                 ↓                               │
│                          [Claude Opus — TokenRouter]             │
│                                 ↓                               │
│                          [filecoin-pin CLI]                      │
│                                 ↓                               │
│                       [Filecoin Mainnet — PDP proof]             │
│                                 ↓                               │
│                            CID: bafybei...                       │
│                                 ↓                               │
│  [Verifier Agent]       ←── fetches CID from IPFS               │
│       ↓                                                          │
│  [TrustedOracleArbiter — Base Sepolia]                           │
│       ↓                                                          │
│  [ERC20EscrowObligation — collectEscrow]                         │
│       ↓                                                          │
│  [PDF Generator — pandoc]                                        │
│       ↓                                                          │
│  [Telegram — sendDocument]                                       │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Tech Stack

Component Technology Why
Agent runtime OpenClaw Multi-agent, skills, Telegram, session persistence
LLM Claude Opus 4.5 via TokenRouter Reliable instruction following, cache support
Storage Filecoin Pin PDP proofs, mainnet, dual provider redundancy
Escrow Alkahest on Base Sepolia ERC-7824 conditional escrow, TrustedOracleArbiter
Backend Node.js + Express + better-sqlite3 Lightweight, fast, no ORM overhead
Research TypeScript orchestrator + capability registry Modular, testable, extensible
Memory MCP server + SQLite Cross-session context, deduplication
Web search SerpApi 250 free/month, reliable
Frontend React 19 + Vite 7 + Tailwind v4 Fast build, deployed on Vercel

Repository Structure

Argentus/
├── backend/                  # Express API + escrow + marketplace + PDFs
│   ├── src/
│   │   ├── routes/
│   │   │   ├── tasks.js          # Task CRUD + auto-pipeline
│   │   │   ├── marketplace.js    # Full marketplace lifecycle
│   │   │   ├── escrow.js         # Alkahest contract calls
│   │   │   └── agents.js         # Agent status
│   │   ├── services/
│   │   │   ├── escrow/
│   │   │   │   └── alkahest.js   # viem contract interactions
│   │   │   └── reports.js        # PDF generation + Telegram
│   │   └── db.js                 # SQLite init
│   └── package.json
│
├── research/                 # TypeScript intelligence engine
│   ├── src/
│   │   ├── agent/
│   │   │   ├── orchestrator.ts   # Main pipeline + Filecoin upload
│   │   │   ├── planner.ts        # LLM capability selection
│   │   │   └── capabilities/     # onchain, market, community, reddit
│   │   ├── services/
│   │   │   ├── dataAggregator.ts # 7 free APIs
│   │   │   ├── webSearch.ts      # SerpApi
│   │   │   └── llm.ts            # TokenRouter client
│   │   └── api/routes/research.ts
│   └── package.json
│
├── mcp-server/               # MCP memory server
│   ├── src/
│   │   ├── http.js           # HTTP on :3002
│   │   ├── index.js          # stdio MCP transport
│   │   └── tools.js          # MCP tool definitions
│   └── package.json
│
├── agents/                   # OpenClaw agent configs
│   ├── coordinator/
│   │   ├── AGENTS.md         # Task routing instructions
│   │   ├── SOUL.md           # Behavior/personality
│   │   └── HEARTBEAT.md      # 30min schedule
│   ├── research/
│   │   ├── AGENTS.md
│   │   └── skills/research-intel/SKILL.md
│   ├── verifier/
│   │   ├── AGENTS.md
│   │   └── skills/verify-cid/SKILL.md
│   └── trading/
│       └── AGENTS.md
│
└── frontend/                 # React dashboard
    ├── src/
    │   ├── config.ts         # Single file to change all endpoints
    │   ├── lib/api.ts        # All API calls
    │   └── pages/            # Home, Marketplace, Tasks, Tech, Docs
    └── package.json

API Reference

Research Service (:3000)

POST /api/research/sync — synchronous, waits for result

Request:  { "goal": "string (min 10 chars)", "userId": "string" }
Response: {
  "sessionId": "uuid",
  "cid": "bafybei...",
  "report": {
    "smart_money_signal": "bullish|bearish|neutral",
    "confidence_score": 0.82,
    "executive_summary": "...",
    "key_findings": ["..."],
    "key_tokens": [{ "symbol": "BTC", "sentiment": "bullish", "risk_level": "low" }],
    "risks": ["..."],
    "data_sources": ["CoinGecko", "DeFiLlama", "SerpApi"]
  },
  "duration_ms": 120000
}

GET /health — service health check


Backend API (:3001)

POST /api/tasks — create intelligence task

{ "description": "string", "user_chat_id": "string|null" }

GET /api/tasks/active — list active tasks

{ "tasks": Task[] }

PATCH /api/tasks/:id — update task (triggers auto-pipeline when result_cid set)

{ "status": "verifying", "result_cid": "bafybei..." }

POST /api/marketplace/requests — post request + create escrow

{
  "title": "string", "description": "string",
  "category": "crypto_research|defi_analysis|onchain_analysis|market_sentiment|whale_tracking",
  "reward_usdc": 1.0, "requester_address": "0x...|null"
}

POST /api/marketplace/submit — submit data (raw or CID)

{
  "request_id": "uuid",
  "raw_content": "your analysis text...",
  "cid": "bafybei...|null",
  "submitter_address": "0x...|null"
}

Auto-verifies in background. If approved → Filecoin upload → escrow settlement → pay submitter.

GET /api/marketplace/stats

{
  "open_requests": 6, "total_requests": 14,
  "total_submissions": 12, "approved_submissions": 8,
  "total_rewarded_usdc": 11
}

GET /api/marketplace/leaderboard — top submitters by approved count


Smart Contracts (Base Sepolia)

ERC20EscrowObligation:  0x1Fe964348Ec42D9Bb1A072503ce8b4744266FF43
StringObligation:       0x544873C22A3228798F91a71C4ef7a9bFe96E7CE0
TrustedOracleArbiter:   0x3664b11BcCCeCA27C21BBAB43548961eD14d4D6D
USDC (testnet):         0x036CbD53842c5426634e7929541eC2318f3dCF7e

Escrow lifecycle:

createEscrow(verifier, amount, expiry)  → escrowUID
submitFulfillment(escrowUID, cid)       → fulfillmentUID
arbitrate(fulfillmentUID, 0x, decision) → txHash
collectEscrow(escrowUID, fulfillmentUID)→ txHash

Deployment

VPS (104.207.76.143)

All services run on Ubuntu 24.04, managed via tmux:

# Backend API
tmux new -s backend
cd ~/da/backend && npm run dev   # :3001

# Research service
tmux new -s research
cd ~/da/research && npm run dev  # :3000

# MCP memory server
tmux new -s mcpserver
cd ~/da/mcp-server && npm run dev # :3002

# OpenClaw agents
tmux new -s openclaw
~/start-argentus.sh               # :18789

Nginx reverse proxy on port 80:

  • /api/*:3001
  • /research/*:3000
  • /mcp/*:3002

Frontend (Vercel)

cd frontend
vercel --prod

# Environment variables:
VITE_API_BASE=http://104.207.76.143
VITE_RESEARCH_BASE=http://104.207.76.143/research
VITE_IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs

Self-hosting

git clone https://github.com/0xZaid10/Argentus
cd Argentus/da

# Copy and fill env files
cp backend/.env.example backend/.env
cp research/.env.example research/.env

# Install deps
cd backend && npm install
cd ../research && npm install
cd ../mcp-server && npm install

# Install global tools
npm install -g openclaw filecoin-pin
nvm use 20 && npm install -g alkahest && nvm use 22
ln -sf ~/.nvm/versions/node/v20.*/bin/alkahest ~/.nvm/versions/node/v22.*/bin/alkahest

# Start
cd backend && npm run dev
cd ../research && npm run dev
cd ../mcp-server && npm run dev
openclaw gateway

Required API Keys

Key Purpose Get it
TokenRouter API Key LLM (Claude Opus) tokenrouter.com — $1 free
SerpApi Key Web search serpapi.com — 250/month free
Etherscan API Key On-chain data etherscan.io/apis — free
Filecoin private key Storage payments New wallet — fund with USDFC
Base Sepolia ETH Gas for escrow coinbase faucet
Base Sepolia USDC Escrow payments faucet.circle.com

Environment Variables

da/backend/.env

USER_PRIVATE_KEY=0x...
WORKER_PRIVATE_KEY=0x...
VERIFIER_PRIVATE_KEY=0x...
VERIFIER_WALLET_ADDRESS=0x...
ALKAHEST_CHAIN=base-sepolia
COORDINATOR_BOT_TOKEN=...
ANTHROPIC_API_KEY=...
ANTHROPIC_BASE_URL=https://api.tokenrouter.com/v1
FILECOIN_PRIVATE_KEY=0x...

da/research/.env

ANTHROPIC_API_KEY=...
ANTHROPIC_BASE_URL=https://api.tokenrouter.com
LLM_MODEL=anthropic/claude-opus-4.5
SERPAPI_KEY=...
ETHERSCAN_API_KEY=...
FILECOIN_PRIVATE_KEY=0x...
FILECOIN_WALLET_ADDRESS=0x...

Auto-Pipeline Logic

When PATCH /api/tasks/:id is called with a valid result_cid (starts with bafy):

1. Mark task completed
2. Call generateAndSendReports()
3. Fetch deliverable JSON from IPFS (with fallback to research service)
4. Run pandoc to generate PDF
5. Send PDF to user's Telegram via bot

No agent intervention needed after the PATCH. Fully automatic.


Marketplace Auto-Verify

When POST /api/marketplace/submit is called:

1. Save submission to DB (returns immediately)
2. Background: fetch raw_content or CID from IPFS
3. Claude Haiku evaluates content vs request description
4. If approved:
   a. Upload raw_content to Filecoin mainnet via filecoin-pin
   b. Extract CID from output
   c. Submit fulfillment attestation on-chain
   d. Arbitrate via TrustedOracleArbiter
   e. Collect USDC from escrow
   f. Send Telegram notification to submitter
5. If rejected: reopen request, notify submitter

Built by @0xZaid10 — IPFS × OpenClaw Hackathon 2026

About

Argentus is infrastructure that lets AI agents request, verify, and pay for crypto market intelligence — without trusting anyone.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages