humanagentprotocol
A universal protocol for symbiotic collaboration between humans and autonomous AI agents. HAP enables AI agents to request human decisions in a structured, auditable, and latency-safe manner. Agents never block — they create tickets with defined timeout behaviors, allowing graceful degradation or escalation.
How to use
The Human Agent Protocol (HAP) server facilitates seamless collaboration between humans and autonomous AI agents, enabling structured decision-making processes. With its unique ticketing system, HAP ensures that AI agents can request human input without causing delays, allowing for efficient task management and escalation if needed. This protocol is particularly valuable for developers looking to integrate AI with human oversight in a robust and auditable manner.
Once connected to the Human Agent Protocol server, you can interact with it by sending structured requests for human decisions. You primarily use the ticket system to submit queries, which include details such as the decision type and timeout behaviors. It’s beneficial to focus on high-level queries that require human judgment, as the server is optimized for handling complex decision-making scenarios without blocking operations.
How to install
Prerequisites
Make sure you have Node.js installed on your machine, as the Human Agent Protocol server runs on a Node environment.
Option A: Quick start with npx
You can quickly start using the Human Agent Protocol server by running the following command:
npx -y @spinualexandru/humanagentprotocol
Option B: Global install alternative
Alternatively, you can install the package globally:
npm install -g @spinualexandru/humanagentprotocol
This allows you to access the server from anywhere in your terminal.
Additional notes
To configure the Human Agent Protocol server effectively, ensure you set the appropriate environment variables for timeout behaviors and log levels. This is especially important to avoid unexpected escalations or ticket failures. A common issue developers face is forgetting to handle ticket expiration, so be sure to implement checks for outstanding tickets in your application logic.
Related MCP Servers
git
Put an end to code hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
mcp-framework
Rust MCP framework for building AI agents
mcp -blog
Example of a MCP implementation using TypeScript and OAuth.
vscode-context
MCP Server to Connect with VS Code IDE
mcp-document-converter
MCP Document Converter - A powerful MCP tool for converting documents between multiple formats, enabling AI agents to easily transform documents.