8 Commits
Author SHA1 Message Date
hermes-agent 2d46eda619 adapter: support OpenAI streaming (SSE) in /v1/chat/completions
OpenCode's @ai-sdk/openai-compatible sends stream:true and would render an
empty response because the adapter always returned a single non-streaming
chat.completion JSON body. Now when stream:true, emit OpenAI-compatible SSE
chat.completion.chunk events (role, content, [DONE]) so streaming clients
render text. Non-streaming path unchanged.

Adds a local EchoServer test that exercises the streaming route end-to-end.
2026-09-12 10:50:47 +00:00
hermes-agent beb9b1b3ef Add temporary chat-request logging (diagnose SwiftChat error) 2026-09-11 18:44:45 +00:00
hermes-agent cb512a7f17 admin: serve the page without requiring the Bearer header
A browser opening /admin can't send an Authorization header, so the
admin page was unreachable (401 blank). Serve the HTML form openly — it
exposes no data — and let the in-page ADMIN_API_KEY field drive the
auth'd /admin/agents CRUD calls.
2026-09-11 15:36:15 +00:00
hermes-agent 72e18a0a0c Remove AGENTS env seeding; agents managed only via admin API
The store now starts empty and agents are added/removed exclusively through
the web admin page / admin API, persisted to AGENTS_FILE. No AGENTS env var
needed in the sops secret.
2026-09-10 07:06:26 +00:00
hermes-agent e2be3f652e Add web admin page to manage agents
GET /admin serves a self-contained HTML page (ADMIN_API_KEY protected)
that lists agents and lets you add/update/remove them via the admin API —
no redeploy needed to add an agent.
2026-09-10 06:59:08 +00:00
hermes-agent 490bd32322 Add admin API to manage agents at runtime
- AgentRegistry is now file-backed (AGENTS_FILE, default
  /var/lib/n8n-openai/agents.json): agents persist across restarts and
  can be added/removed without a redeploy.
- New admin endpoints (separate ADMIN_API_KEY):
    GET    /admin/agents
    POST   /admin/agents   {model, webhook}
    DELETE /admin/agents/:model
- AGENTS env only seeds the store on first boot; the file is authoritative.
- NixOS module sets AGENTS_FILE under the writable StateDirectory.
2026-09-10 06:46:05 +00:00
hermes-agent c3d024c16c Apply mix format 2026-09-09 21:46:16 +00:00
hermes-agent 5197b6ece6 OpenAI-compatible adapter for n8n chat agents (Elixir)
Exposes self-hosted n8n chat agents behind /v1/chat/completions and
/v1/models. Model -> n8n webhook routing via a GenServer registry, so
multiple agents map to multiple models. Plug + Bandit, req for the
n8n webhook call, Bearer auth (ADAPTER_API_KEY). Ships a flake.nix
(beamPackages.mixRelease) so it can be consumed as a NixOS flake input.
2026-09-09 21:43:21 +00:00