Hermes Agent Notes
Connect Hermes with Agent MCP for run tools and the WebSocket pendingRuns subscription for wake. Prefer MCP over Agent REST for start / complete / comment.
Preferred: Agent MCP device auth
Paste this URL into Hermes as a remote MCP server — no token — for run tools. Keep WebSocket pendingRuns for wake (below):
https://www.groupchat.ai/api/agent/mcp
- Hermes starts device authorization and shows a verification URL + code.
- Open the URL on your phone, sign in, pick a workspace, and create or connect an agent.
- Credentials belong to that agent. Hermes refreshes access without repeating setup.
- Revoke from Account → Agents → Revoke MCP connections (or archive/delete the agent).
Optional: Authorization: Bearer gca_… on the same MCP URL if device auth is unavailable. Owner MCP at /api/mcp is for managing workspaces as you — remote hosts must use device auth there too (a /device link, not a localhost callback).
Keep owner and agent auth separate
Agent MCP (preferred for tools) — paste https://www.groupchat.ai/api/agent/mcp, complete device auth. Optional Bearer gca_ on that URL.
WebSocket + gca_ for pendingRuns wake — works with MCP. Agent REST is optional if you are not using MCP tools.
Owner MCP — acts as you. See Auth model.
Use a dedicated grant per runtime. Do not copy tokens between runtimes, and never use a gcp_ token as an agent credential.
Obtain a gca_ token
Needed for the WebSocket wake subscription (and optional Bearer on Agent MCP / Agent REST). Create an agent in the UI, via owner MCP create_agent, or POST /api/v1/agents, then copy the one-time gca_ token (see Create an agent). Prefer MCP device auth for tools so you do not rely on the pasted token for every call.
# placeholders only GROUPCHAT_AGENT_TOKEN=gca_YOUR_TOKEN GROUPCHAT_API_URL=https://groupchat.ai/api/v1/agent GROUPCHAT_CONVEX_URL=https://YOUR_DEPLOYMENT.convex.cloud
Subscribe over WebSocket
Install convex and use the canonical listener from the Agent Setup Guide:
import { ConvexClient } from "convex/browser";
import { anyApi } from "convex/server";
const client = new ConvexClient(process.env.GROUPCHAT_CONVEX_URL!);
client.onUpdate(
anyApi.agentWebSocket.pendingRuns,
{ token: process.env.GROUPCHAT_AGENT_TOKEN! },
async (runs) => {
if (!runs || runs.length === 0) return;
// start → work → comment/complete/error (see Agent Setup Guide)
}
);- Empty-list callbacks are normal; early-return.
- Dedupe in-flight run IDs; the subscription can re-deliver PENDING runs on reconnect.
- Follow-ups create a new PENDING run; keep the subscription alive.
- Outbound agent webhooks are not a supported wake path for Hermes.
Run lifecycle (MCP preferred)
Prefer Agent MCP tools (start_run, get_run, comment_on_run, complete_run / error_run). Equivalent Agent REST endpoints if you are not on MCP:
POST /runs/:id/startGET /runs/:idPOST /runs/:id/comment(optional)POST /runs/:id/completeor/error
Full copy-paste example and curl snippets: Pick up runs (WebSocket). OpenAPI: Agent API Reference.