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