Component map
Components
Agent server (Railway)
The always-on Node.js process that runs every verification. Responsibilities:- Receives Telegram webhooks on new group joins
- Checks Postgres for group registration and active campaign budget
- Manages per-user verification state machine
- Calls the conversational LLM to generate agent turns
- Submits transcripts to Kimi for scoring
- Fires
logCompletionandreleasePayoutcontract calls - Delivers completion data to advertisers
Postgres
| Table | Contents |
|---|---|
groups | Registered groups, topic, floor price, payout wallet |
campaigns | Advertiser campaigns, bid price, budget, group assignments |
verifications | Per-user verification state, conversation history, Kimi score |
user_sessions | Active conversation state per Telegram user ID |
Conversational LLM
Generates dialogue turns from the advertiser brief and group context. Decides whether to probe based on response length and specificity. Closes the conversation after 2–3 agent turns. Does not score responses.Kimi (Moonshot AI)
Receives the full transcript after the conversation closes. Returns a quality score between 0 and 1. Score at or aboveKIMI_PASS_THRESHOLD triggers releasePayout. Score below threshold triggers re-prompt.
API endpoint: api.moonshot.ai/v1Relevant env vars:
KIMI_API_KEY, KIMI_BASE_URL, KIMI_MODEL, KIMI_PASS_THRESHOLD
Escrow contract (Base mainnet)
Address:0xf808b264E13Bf809C8e86afaF4e14c200931101E
Handles advertiser deposits, per-completion onchain logging, and USDC release to group owner wallets. Full function reference: Smart contract.
Telegram bot (@CanvasVerificationBot)
- Detects join events via Telegram webhook
- Posts a brief verification notice in the group chat
- Opens a DM with the joining user
- Relays turns between user and conversational LLM
- Restricts and unrestricts users based on verification outcome
Infrastructure
| Layer | Service |
|---|---|
| Agent server | Railway (Node.js, always-on) |
| Database | Railway Postgres |
| Frontend / dashboard | Vercel |
| DNS | Cloudflare |
| Blockchain | Base mainnet |
| Bot | Telegram BotFather (@CanvasVerificationBot) |
| Conversational LLM | Lightweight model (e.g. Gemini Flash 2.0) |
| Quality scoring | Kimi · Moonshot AI |