@rcrsr/rill-agent-http
v0.19.0
Published
rill agent HTTP harness — Hono-based HTTP server wrapping AgentRouter
Readme
@rcrsr/rill-agent-http
Hono-based HTTP harness for @rcrsr/rill-agent. Wraps an AgentRouter in an HTTP server that exposes agent discovery and invocation endpoints.
Install
npm install @rcrsr/rill-agent @rcrsr/rill-agent-httpQuick Start
import { loadManifest, createRouter } from '@rcrsr/rill-agent';
import { httpHarness } from '@rcrsr/rill-agent-http';
const manifest = await loadManifest('./build');
const router = await createRouter(manifest, {
globalVars: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY ?? '' },
});
const harness = httpHarness(router);
await harness.listen(3000);Routes
| Method | Path | Description |
|--------|------|-------------|
| GET | /agents | List agents (describe() output) |
| POST | /agents/:name/run | Invoke a named agent |
| POST | /run | Invoke the manifest's default agent |
Request bodies match RunRequest from @rcrsr/rill-agent: { params?, timeout? }. Responses return RunResponse: { state, result, streamed? }.
API
httpHarness(router)— returns aHttpHarnesswrapping the givenAgentRouterHttpHarness—{ app, listen(port), close() }
License
MIT
