handshake-prompt-agent
Agent-side SDK + CLI for the Handshake Prompt Protocol (HPP). Zero external dependencies (Python stdlib only).
Install
pip install handshake-prompt-agent
CLI
# Extract credentials from a handshake prompt
handshake-prompt-agent parse-prompt --prompt "$(pbpaste)"
# Get current schema + values
handshake-prompt-agent get-context --sid <sid> --token <token> --base <url>
# Submit field values
handshake-prompt-agent action --sid <sid> --token <token> --base <url> \
--data '{"name":"Alice","age":30}'
# Get incremental changes since last submit
handshake-prompt-agent get-diff --sid <sid> --token <token> --base <url> \
--since "2026-06-23T10:22:00+08:00"
# Extend the token/session for a long-running task (server may reject or cap it)
handshake-prompt-agent extend --sid <sid> --token <token> --base <url> \
--extra-seconds 1800
Programmatic API
from handshake_prompt_agent import HandshakeAgent, parse_prompt
# Parse user-pasted prompt
creds = parse_prompt(prompt_text)
agent = HandshakeAgent(
sid=creds['sessionId'],
token=creds['token'],
base_url=creds['baseUrl'],
)
# Read current state (call this BEFORE every action!)
state = agent.get_context()
print(state['schema']) # field definitions
print(state['context']) # current values + who filled (user/ai/empty/user_edit)
print(state['missing']) # required-but-empty keys
# Apply values
result = agent.action({
'name': 'Alice',
'email': 'alice@example.com',
'age': 30,
})
print(result['applied']) # fields successfully written
print(result['rejected']) # fields blocked (e.g. user already filled)
print(result['context']) # full state snapshot after the action
# Long task? Ask the server to extend the session.
# The server policy decides whether this is allowed.
extension = agent.extend(extra_seconds=1800)
print(extension['expiresIn'])
Skill integration
This package is intended to be used inside an Agent skill (e.g. Codemaker, Claude, Cursor). A typical skill file:
# my-handshake-skill SKILL.md
Triggered when user pastes a message containing `sessionId:` and `token:`.
Workflow:
1. parse-prompt to extract credentials
2. get-context to read current schema + values
3. reason out field values based on user's request
4. action to submit values
Always call get-context BEFORE each action to see latest state
(user may have edited fields manually).
License
MIT
Metadata
Release files for handshake-prompt-agent 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| handshake_prompt_agent-0.2.0.tar.gz | 6.3 kB | Without provenance | Details for handshake_prompt_agent-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| handshake_prompt_agent-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for handshake_prompt_agent-0.2.0-py3-none-any.whl |
Total release size: 14.0 kB
Release files / handshake_prompt_agent-0.2.0.tar.gz
| Download URL | handshake_prompt_agent-0.2.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6511b03202d2bce058958dafb4ccff7c56237773d67a2b81b05f3b2b8ff975f6
|
|
BLAKE2b-256 checksum How to use checksums |
aeb1ca8856e66973ec9d4587bd9239c129587bc667c622e1198379b34e24a71e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / handshake_prompt_agent-0.2.0-py3-none-any.whl
| Download URL | handshake_prompt_agent-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8c1489c563ae800375b080e906adc94229325dcf58ec58b6adaaf09f34e39aa
|
|
BLAKE2b-256 checksum How to use checksums |
7e6346ae10f7a1e2ea47091e308a27396590b2d8b76337de72fe00613676f974
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for handshake-prompt-agent 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.