Quick login & scoped auth · 快捷登录与鉴权方案

One prompt.
Any Agent.
Any service.

Handshake Prompt Protocol (HPP) is a quick login and authorization scheme. Just as QR-code login made signing in effortless, HPP makes granting a bounded, auditable session to an Agent or service as simple as copying one handshake prompt — no API keys, OAuth flows, or MCP wiring.

一段握手提示词同时携带会话凭证、权限边界、有效期或续期策略和审计上下文。可用于一次性短任务,也可作为长期配对关系的入口。

No setup用户无需配置 API Key / OAuth / MCP
Fixed boundary一段提示词,一个清晰操作边界
Short or long短期任务或长期配对都支持
Device / Web Service paired
# Handshake Prompt sessionId: hp_8e04f8... token: 192-bit one-time credential scope: current expense form mode: form-fill ttl: 30 minutes renewal: server policy GET /handshake/context/:sid POST /handshake/action/:sid
Agent sees only this bounded session. 审计可追踪

Why this matters

Connecting users, Agents, and services still wastes time on auth. HPP turns that into one familiar step — share a handshake prompt, as quick as QR-code login made signing in.

Capability API Key OAuth MCP Handshake Prompt
User setup steps 3–5 2–3 5–10 1
Permission matrix Manual Complex Complex Prompt is the scope
User watches actions live No No No Yes
Short-term + long-term pairing Hard Possible Possible Native pattern

One protocol, many surfaces

HPP is a network component. Your application decides the mode: form-fill, device pairing, Agent-to-Agent cooperation, or custom workflows.

📋

Legacy web forms

AI fills ERP, CRM, OA, finance, or game configuration forms while the user reviews and submits.

🤖

Smart devices

QR / NFC / Bluetooth carries a handshake prompt so an Agent can pair with robots, appliances, rooms, or cars.

🤝

Agent-to-Agent

Agents can exchange temporary or durable, revocable credentials without long-lived shared secrets.

Live Agent form demo

This is a real handshake prompt application demo. The browser creates a session, copies a prompt, and any Agent can call the action API to fill this form on the page.

Browser form controlled by Agent

Prompt for your Agent

no session

Handshake session log

Create a session to see the exact Agent API request.

Smart hardware pairing

Just as QR-code login simplified device sign-in, HPP simplifies pairing: one handshake for a temporary task, or upgrade to a long-term, revocable credential.

1. Device shows promptQR / NFC / Bluetooth carries sessionId + token.
2. Agent reads contextCapabilities, boundaries, expiry, renewal policy.
3. User speaks naturally“Set AC to 24°C and dim the lights.”
4. Service verifies tokenOnly allowed actions for this device/session.
5. Execute or pairTemporary session or durable, revocable pairing.

Run the real example

The live protocol needs a backend for session storage, token auth, context/action endpoints, and WebSocket push. Run the included Flask example locally.

git clone https://github.com/CGandGameEngineLearner/handshake-prompt
cd handshake-prompt/examples/server-flask
pip install -r requirements.txt
python app.py
# Open http://localhost:5000

Server SDK

pip install handshake-prompt

Browser SDK

npm install handshake-prompt-client

Agent CLI

pip install handshake-prompt-agent