PromptGate is an AI + Algorand TestNet demo that combines prompt inference with on-chain escrow settlement, publisher payouts, and a lightweight consumer/publisher dashboard.
- On-chain escrow flow for prompt payments (lock -> release -> payout)
- Auto and manual agent routing
- Complexity-based auto model selection across Spark Lite, Balanced Core, and Thorough Pro
- Publisher registration and pricing model support
- Reputation and leaderboard tracking
- 3-stage autonomous pipeline (Research -> Analysis -> Summary)
- x402 payment challenge endpoints
- QR verification entry point in dashboard for TestNet account checks
- Backend: FastAPI, Algorand Python SDK
- Frontend: React
- AI runtime: Ollama
- Network: Algorand TestNet
promptgate-chain/backend API, escrow logic, deploy metadata, agentspromptgate-dashboard/React dashboard UI
- Python 3.11+ (or compatible with your local setup)
- Poetry
- Node.js + npm
- AlgoKit CLI
- Ollama running locally
- Internet access to Algorand TestNet API/Indexer
Windows (recommended):
winget install --id AlgorandFoundation.AlgoKitAlternative (if winget is unavailable):
pip install algokitVerify:
algokit --versioncd promptgate-chain
poetry installcd promptgate-dashboard
npm installCreate promptgate-chain/.env with your values:
PROMPTGATE_AGENT_ADDRESS=<your_algorand_address>
PROMPTGATE_AGENT_MNEMONIC=<your_25_word_mnemonic>
PROMPT_GATE_APP_ID=758619852
PROMPT_GATE_CONTRACT_ADDRESS=MUSEVZDHZJWQEJFTONPSYYV3S5IIBYPMA4CMN6IPJM6Q5MTDVDQTSBZ2SUOptional overrides:
ALGOD_SERVER=https://testnet-api.algonode.cloud
INDEXER_SERVER=https://testnet-idx.algonode.cloud
OLLAMA_SERVER=http://localhost:11434
OLLAMA_MODEL=llama3.2Set frontend env values if needed:
REACT_APP_API_BASE(default:http://localhost:8000)REACT_APP_WALLET_ADDRESSREACT_APP_WALLET_MNEMONIC
cd promptgate-chain
poetry run uvicorn promptgate_api.main:app --host 0.0.0.0 --port 8000 --reloadOpen a new terminal:
cd promptgate-dashboard
$env:PORT=3000
npm startGo to http://localhost:3000
- Backend status:
GET http://localhost:8000/status - Publishers:
GET http://localhost:8000/publishers - Leaderboard:
GET http://localhost:8000/leaderboard
- Keep Ollama running before sending prompts.
- If a prompt expires before release on-chain, backend now handles this safely and returns a clean retry message.
- If UI looks stale, hard refresh (
Ctrl+Shift+R).