Human-in-the-loop sign-off agent β any agent hires Summon to get a human Approve/Reject via Telegram
The Human-in-the-Loop Workflow. Agent triggers Summon β Summon sends Telegram message β Human taps Approve/Reject β Summon returns decision to agent.
Fully autonomous agents can make costly mistakes. Before executing a high-stakes transaction, agents need a reliable way to halt and ask for human permission. Summon solves this by providing a universal Human-in-the-loop agent that bridges on-chain AI with real-time human communication via Telegram.
Key Features:
- β‘ Instant Notification: Pushes agent requests directly to your Telegram.
- π Secure Sign-off: Only authorized Telegram users can approve or reject.
- π¨ Seamless Integration: Any agent in the Constellation A2A ecosystem can hire Summon to act as its human arbiter.
- π Active State Recovery: Retains and re-evaluates active Telegram sign-off requests on startup to prevent lost approvals.
- πΌ Dynamic Payout Wallet: Dynamically routes earned USDC fees directly to custom wallet destinations (via
SUMMON_PAYOUT_ADDRESS).
Summon is the constellation's human arbiter: any agent can hire it on-chain to put a real person in the loop, escrow-backed with an SLA auto-refund if no one responds in time. "An agent pays a human for a yes/no decision, with on-chain escrow" simply doesn't exist on a normal API marketplace.
graph LR
User([Any Agent / User]) -->|hires for sign-off| S[Summon π€]
S -->|Approve / Reject| H((Human via Telegram))
M[Maestro πΌ] -->|escalates low-confidence work| S
G[Gauntlet π§€] -.->|certifies| S
classDef hot fill:#F59E0B,stroke:#111,color:#111,font-weight:bold;
class S hot;
- SLA safety: if the human doesn't tap in time, Summon cancels the request and the buyer's escrow is cleanly refunded β no stuck funds.
- Adoption wedge: the Demo Insurance snippet lets any hackathon bot add a human fallback in a few lines.
Real CAP orders Summon fulfilled as a provider β an agent paid for a human decision.
Total real CAP orders: 0 Β· last updated: 2026-06-_
| # | Date | Counterparty (requester) | Amount (USDC) | Order ID | Tx (BaseScan) | Decision |
|---|---|---|---|---|---|---|
| 1 | 2026-06-_ | Maestro / external bot | 0.00 | _ord_β¦_ |
0xβ¦ | β Approved / β Rejected |
Order IDs + the buyer's pay tx are in the provider logs and the CROO dashboard. Delete this note once populated.
| Layer | Technology |
|---|---|
| Runtime | Node.js (TypeScript) |
| Messaging | Telegram Bot API |
| Ecosystem | Constellation A2A (croo-core) |
| Testing | Vitest |
- Node.js β₯ 20
- npm
- A Telegram Bot Token (from @BotFather)
- Clone:
git clone https://github.com/edycutjong/summon.git - Install:
npm install - Configure:
cp .env.example .env.localand fill inCROO_SDK_KEY,SUMMON_SERVICE_ID,TELEGRAM_BOT_TOKEN, andTELEGRAM_CHAT_ID(or setCROO_MOCK=truefor offline mode) - Run:
npm run dev
npm install
CROO_MOCK=true npm run dev # boots the provider with no on-chain callsFor the full human round-trip, set TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID and run npm run dev β taps on the Telegram inline buttons resolve the order.
For Judges: Skip account creation! You can test the bot interaction by messaging our live test bot at @SummonTestBot.
4-stage pipeline: Quality β Security β Build β Deploy Gate
# ββ Code Quality ββββββββββββββββββββββββββββ
npm run lint # ESLint
npm run typecheck # TypeScript check
npm run test # Run tests
npm run test:coverage # Coverage report
npm run ci # Full quality gate
# ββ Security ββββββββββββββββββββββββββββββββ
make security-scan # npm audit + license check| Layer | Tool | Status |
|---|---|---|
| Code Quality | ESLint + TypeScript | β |
| Unit Testing | Vitest (37 tests) | β |
| Security (SAST) | CodeQL | β |
| Security (SCA) | Dependabot + npm audit | β |
| Secret Scanning | TruffleHog | β |
dorahacks-croo-summon/
βββ docs/ # README assets (screenshots)
βββ src/ # Application source code
βββ scripts/ # Build and run scripts
βββ __tests__/ # Vitest test suites
βββ .env.example # Environment template
βββ .github/ # CI workflows
βββ README.md # You are here
Containerized for any PaaS. Summon is a background worker (Telegram polling + CROO WebSocket β no inbound port):
docker build -t summon .
docker run --env-file .env.local summonMIT Β© 2026 Edy Cu
Built for the DoraHacks CROO Hackathon 2026.
Terrified your autonomous DeFi or Research bot might hallucinate or crash during the live judge demo?
Add this 5-line Summon snippet to your error-catching block. If your bot hits a wall, it autonomously hires my agent for $0.01 USDC. I will get pinged on Telegram, manually review the data, and tap 'Approve/Override'.
Your agent recovers gracefully, you get a bulletproof demo showing A2A resilience, and we both satisfy the Hackathon's Anti-Sybil counterparty rule.
import { hire } from "@edycutjong/croo-core";
// Drop this in your catch block or low-confidence branch.
// hire() runs the full requester flow: negotiate β pay β wait for delivery.
const { delivery } = await hire<{ approved: boolean }>(client, {
serviceId: process.env.SUMMON_SERVICE_ID!, // DM me in Discord for my ID!
requirement: {
prompt: "Demo emergency: Bot confidence low. Proceed with execution?",
context: JSON.stringify(failedPayload),
},
maxPrice: 1.0, // max USDC you're willing to spend
});
if (delivery.approved) {
// Proceed safely based on the human verdict!
}