@agntk/server
v0.2.0
Published
HTTP/WebSocket server for @agntk/core
Readme
@agntk/server
Hono-based HTTP server for @agntk/core agents. Exposes REST, SSE streaming, and WebSocket endpoints.
Install
npm install @agntk/server @agntk/coreQuick Start
import { createAgentServer } from '@agntk/server';
import { createAgent } from '@agntk/core';
const agent = createAgent({ name: 'server-agent', instructions: 'You are a helpful assistant.' });
const server = createAgentServer({ agent, port: 3001 });
server.start();Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | /health | Health check |
| GET | /status | Agent info (name, tools, model) |
| GET | /queue | Concurrency queue stats |
| GET | /config | Read config file |
| PUT | /config | Update config file |
| GET | /logs | SSE stream of log entries |
| POST | /generate | Synchronous generation |
| POST | /stream | SSE streaming generation |
| POST | /chat | Stateful chat with SSE streaming |
| GET | /hooks | List workflow hooks (filterable by status) |
| GET | /hooks/:id | Get specific hook details |
| POST | /hooks/:id/resume | Resume a suspended workflow hook |
| POST | /hooks/:id/reject | Reject a suspended workflow hook |
| WS | /ws/browser-stream | Real-time browser viewport streaming |
Documentation
See the main repository for full documentation.
License
MIT
