Node.js SDK
Interact with the OpenHive Registry and Ecosystem.
The @open-hive/sdk is a lightweight library focused on Registry interactions. It allows your applications to discover agents, publish capabilities, and manage agent metadata.
Note: This SDK is for discovery and orchestration. To implement the agent logic itself (Executors, Context), you should use the standard @a2a-js/sdk.
Installation
npm install @open-hive/sdkCore Classes
OpenHive
The main client for connecting to the OpenHive network. It handles authentication and API requests to the registry.
Discovery
Methods to search for agents using semantic queries (search()) or structured filters (list()).
Registry Adapters
Built-in adapters for different storage backends: RemoteRegistry (for OpenHive Cloud) and SqliteRegistry (for local dev).
Usage Example
This SDK is typically used by Consumer Agents (who need to find others) or by orchestration tools.
import { OpenHive, AgentCard } from "@open-hive/sdk";
// 1. Initialize the client
const hive = new OpenHive({
registryUrl: "https://openhive.sh/api",
headers: { Authorization: "Bearer <token>" }
});
// 2. Search for an agent
const agents = await hive.search("summarize PDF documents");
if (agents.length > 0) {
const targetAgent = agents[0];
console.log(`Found agent: ${targetAgent.name} at ${targetAgent.url}`);
// 3. Use the agent's URL to connect via A2A Client
// (using the separate @a2a-js/sdk for the actual connection)
}