AgentSourcing is an autonomous multi-agent research network where AI agents hire other AI agents and pay each other in real-time USDC on the Arc blockchain via Circle Nanopayments.
A user submits a research task for $0.05 USDC. A Manager Agent breaks it into sub-tasks, hires 6 Specialist Agents at $0.002 USDC each, and they in turn call premium data APIs at $0.0005 USDC per call — all settled on-chain, autonomously.
| Layer | Technology | Why |
|---|---|---|
| Blockchain | Arc (EVM-compatible, USDC gas) | Sub-cent gas fees — makes $0.002 payments viable |
| Payments | Circle Programmable Wallets (Developer-Controlled) | Automated agent treasury, no key management |
| Payment Standard | x402 / Circle Nanopayments | Per-API-call monetisation at $0.0005 each |
| Currency | USDC | Stable, no volatility risk for agent commerce |
| Reputation | ERC-8004 Trust Layer (Vyper) | On-chain agent trust scores for agent selection |
| Smart Contracts | Vyper 0.4.3 on Arc Testnet | Escrow + reputation + payment release logic |
| AI / LLM | Featherless.ai (LLaMA 3.1 70B, Qwen, Mistral, DeepSeek) | Per-agent specialised model routing |
| Backend | FastAPI + Python 3.12 + SSE | Real-time event streaming to UI |
| Frontend | React + TypeScript + Tailwind CSS (Vite) | Glassmorphism dashboard with real-time SSE feed |
| Network | Gas per Tx | Our Payment | Gas as % | Viable? |
|---|---|---|---|---|
| Ethereum Mainnet | $2 – $8 | $0.002 | 100,000%+ | ❌ Impossible |
| Polygon / L2 | $0.01 – $0.05 | $0.002 | 500–2,500% | ❌ Unprofitable |
| Arc + Nanopayments | $0.000x | $0.002 | < 1% | ✅ Fully viable |
The math is simple: every other blockchain makes sub-cent agent payments economically impossible. Arc + Circle fix this.
- Python 3.12+
- Node.js 18+ (for building the React frontend)
- Circle Developer Account (free sandbox)
- Featherless.ai API Key (for LLM inference)
- MetaMask wallet funded from Arc Testnet Faucet
git clone https://github.com/YOUR_USERNAME/AgentSourcing.git
cd AgentSourcingpip install -r requirements.txt
# Build the frontend UI
cd frontend && npm install && npm run build && cd ..# Windows
copy .env.example .env
# Linux / Mac
cp .env.example .envEdit .env with your API keys — see Setup Guide for full instructions.
# Step 1: Generate and save to .env as CIRCLE_ENTITY_SECRET
python circle/entity_secret.py generate
# Step 2: Get cipher text and register at console.circle.com
# → Developer Controlled Wallets → Configurator → paste cipher text
python circle/entity_secret.py ciphertextpython circle/setup.py
# Prints all wallet IDs and addresses — copy to .envVisit faucet.circle.com → send test USDC to your Manager wallet address.
python scripts/deploy_contract.py
# Saves contract address to .env as ERC8004_CONTRACT_ADDRESSpython main.py
# Open: http://localhost:8000AgentSourcing/
│
├── main.py # FastAPI app — all routes, SSE streaming, x402 endpoints
├── config.py # Centralised config loaded from .env
├── requirements.txt
├── .env.example # ← copy this to .env and fill in your keys
│
├── agents/
│ ├── base_agent.py # Abstract base — timing, ERC-8004 hooks, x402 integration
│ ├── llm_client.py # Featherless.ai LLM wrapper with per-agent model routing
│ ├── manager_agent.py # Tier-1 — orchestrator, hires specialists, pays USDC
│ ├── scraper_agent.py # Tier-2 — real-time web research (DuckDuckGo + BS4)
│ ├── analyst_agent.py # Tier-2 — market data analysis and trend detection
│ ├── summarizer_agent.py # Tier-2 — executive summaries and report writing
│ ├── fact_checker_agent.py # Tier-2 — claim verification and source checking
│ ├── translator_agent.py # Tier-2 — multilingual output + cultural relevance
│ ├── validator_agent.py # Tier-2 — LLM-powered quality validation
│ └── data_agent.py # Tier-3 — x402 nanopayment data fetcher
│
├── circle/
│ ├── entity_secret.py # RSA-OAEP entity secret generation and encryption
│ ├── wallet_manager.py # Wallet set / wallet CRUD + USDC balance queries
│ ├── payment_processor.py # USDC transfers + fee estimation + Arc explorer links
│ ├── setup.py # One-time provisioning of 8 agent wallets
│ ├── x402_client.py # x402 payment protocol client for data API calls
│ └── wallets.json.example # Example wallet structure (real wallets.json in .gitignore)
│
├── reputation/
│ ├── erc8004.py # ERC-8004 reputation scoring (in-memory + on-chain)
│ ├── erc8004.vy # Vyper 0.4.3 smart contract — deployed on Arc Testnet
│ └── erc8004_abi.json # Contract ABI for Web3 integration
│
├── frontend/
│ ├── src/
│ │ ├── App.tsx # Main app — SSE streaming, payment events, routing
│ │ ├── components/ # AgentRoster, ReportViewer, TransactionFeed, etc.
│ │ └── index.css # Tailwind + glassmorphism design system
│ └── dist/ # Production build (served by FastAPI)
│
├── docs/
│ ├── setup_guide.md # Full setup walkthrough
│ ├── agent_workflow.md # How agents collaborate
│ ├── agent_economy.md # Circle wallets and payment architecture
│ ├── architecture.md # System architecture overview
│ └── api_reference.md # Full API endpoint reference
│
├── scripts/
│ ├── deploy_contract.py # Deploy Vyper contract to Arc Testnet
│ ├── generate_wallet.py # Generate new Circle wallets
│ ├── check_deploy_ready.py # Pre-deployment readiness check
│ └── test_*.py # Test scripts for individual components
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Dashboard UI |
GET |
/api/health |
System health + config status |
POST |
/api/research |
Submit a research task |
GET |
/api/research/{id}/stream |
SSE real-time event stream |
GET |
/api/research/{id}/result |
Full research result |
GET |
/api/research |
List all runs |
GET |
/api/agents |
All agent ERC-8004 reputation profiles |
GET |
/api/agents/{id} |
Single agent profile |
POST |
/api/agents/register-wallet |
Register agent wallet address |
GET |
/api/wallets |
List Circle wallets |
GET |
/api/wallets/{id}/balance |
Wallet USDC balance |
GET |
/api/transactions/{id} |
Circle transaction status |
GET |
/api/x402/payments |
All x402 nanopayment records |
GET |
/api/x402/endpoints |
13 available premium data APIs |
GET |
/data/{slug} |
x402-gated data endpoint (402 → pay → 200) |
Interactive docs: http://localhost:8000/api/docs
Agents build trust scores over time based on their track record:
score = 50
+ (completion_rate × 25) # reliability → max +25
+ (avg_quality / 10 × 20) # output quality → max +20
+ min(completions, 10) # experience → max +10
− (failures × 5) # failure penalty
− min(avg_latency_s, 5) # speed penalty
Score clamped to [0, 100]. Manager uses scores to select best available agent per task.
English · French · German · Hindi · Italian · Portuguese · Spanish · Thai
- Setup Guide — Full step-by-step setup
- Agent Workflow — How agents collaborate
- Agent Economy & Circle Wallets — Payment architecture
- System Architecture — Technical architecture overview
- API Reference — All endpoints
- Never commit
.env— it is in.gitignore - Your
CIRCLE_ENTITY_SECRETandARC_DEPLOYER_PRIVATE_KEYmust stay local - Use Circle sandbox environment for development (no real money)
- Rotate your API keys immediately if accidentally exposed
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
Proprietary License — All rights reserved.
AgentSourcing — Built with ❤️ for the Agentic Economy on Arc
Powered by Arc + Circle + Featherless.ai