Quickstart
Put a human in the loop in 5 minutes.
Pick your stack, gate one irreversible action, and mint a receipt anyone can verify offline. No account needed to start; public read tools need no key.
1. Pick your path
SDK — requireReceipt
wrap the irreversible write (strongest)
import { EPClient } from '@emilia-protocol/sdk';
const ep = new EPClient({ apiKey }); // EP_API_KEY from your env
// the write only runs after the receipt is consumed:
await ep.requireReceipt({ action: 'payment.release', amount: 82000 },
async ({ receipt }) => releasePayment(receipt));MCP & tool-calls
wrap a dangerous MCP tool — fail closed
import { withMcpGuard } from '@emilia-protocol/mcp-guard';
const guarded = withMcpGuard(handleTool, {
annotations: { release_payment: { irreversible: true, action: 'payment.release' } },
});MCP client
Claude Desktop, Cursor, Cline, Continue
{ "command": "npx", "args": ["-y", "@emilia-protocol/mcp-server"] }LangChain.js
wrap any irreversible tool
import { withGuard } from '@emilia-protocol/langchain';
const safe = withGuard(tool, { action: 'payment.release' });CrewAI / AutoGen
Python — the guard() decorator
@guard("payment.release", context_fn=..., fetch=post)
def wire_transfer(amount, destination): ...Any Node service
demand side — answer 428
import { requireEmiliaReceipt } from '@emilia-protocol/require-receipt';
app.post('/release', requireEmiliaReceipt({
action: 'payment.release',
statusCode: 428,
manifestUrl: '/.well-known/agent-actions.json',
}), handler);2. The pattern (same everywhere)
Whatever the framework, the gate does one job: hold an irreversible action until it’s allowed, denied, or signed off by a named human.
const d = await guardAction({ action: 'payment.release', context });
if (d.deny) throw new Error(d.reason); // blocked outright
if (d.signoffRequired) await waitForHuman(d); // a NAMED human approves
// ...otherwise proceed. Every approval mints an authorization receipt.3. Verify the receipt — offline, any language
A receipt minted anywhere checks anywhere, with no account and no network.
JavaScript
npm i @emilia-protocol/verifyPython
pip install emilia-verify