harnessd Daemon
harnessd is the HTTP daemon at the center of go-code. It boots a complete agent runtime — LLM provider, tool registry, memory, cron scheduler, MCP client, skills, and workflow engines — and exposes everything over a REST + SSE (Server-Sent Events) API on a single TCP port (:8080 by default). Clients like harnesscli, the BubbleTea TUI, or any HTTP client can submit agent runs, stream live events, steer running agents, and manage conversations without coupling directly to the Go runtime.
Authentication
harnessd protects its HTTP API with Bearer token authentication backed by a key store. Each API key carries a tenant identity and a set of permission scopes. The server validates every incoming request against those scopes before dispatching it to a handler. Multi-tenant deployments get an additional layer: a tenant isolation check that ensures one tenant cannot read or modify another's runs.
HTTP API Guide
harnessd is the HTTP daemon that backs every go-code agent run. It exposes a REST + Server-Sent Events (SSE) API on a single port (default :8080). Any process that can make HTTP requests — a shell script, a CI job, another service — can start agent runs, stream their output in real time, and control them mid-flight.
Script Workflows API
The Script Workflows API lets you run multi-agent Go pipelines through harnessd without writing a single line of HTTP client code. You define a script — a plain Go function registered under a name — and the engine runs it asynchronously, tracks its lifecycle, emits structured events, and exposes everything over HTTP with Server-Sent Events (SSE) for real-time streaming.
harnessd as MCP Server
The Model Context Protocol (MCP) is a JSON-RPC 2.0 based standard for connecting AI models to tools and data sources. harnessd supports MCP in both directions: it can consume tools from external MCP servers (acting as an MCP client), and it can expose itself as an MCP server so that Claude Desktop and other MCP hosts can drive it directly.