mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
Adds a new gateway platform adapter that exposes an HTTP server with OpenAI-compatible endpoints, allowing any OpenAI-compatible frontend (Open WebUI, LobeChat, etc.) to use hermes-agent as a backend. Endpoints: - POST /v1/chat/completions - OpenAI Chat Completions format (stateless) - POST /v1/responses - OpenAI Responses API format (stateful via previous_response_id) - GET /v1/models - lists hermes-agent as an available model - GET /health - health check Features: - Bearer token auth via API_SERVER_KEY env var (unauthenticated when no key set) - System messages/instructions become ephemeral system prompt (layered on top of core prompt) - In-memory LRU response store for Responses API conversation chaining - Agent runs in thread executor (run_conversation is synchronous) - Streaming returns 501 (not yet implemented) New files: - gateway/platforms/api_server.py - APIServerAdapter class (~470 lines) - tests/gateway/test_api_server.py - 51 tests covering all endpoints, auth, config Modified files: - gateway/config.py - Added Platform.API_SERVER enum, env var overrides, connected platforms - gateway/run.py - Added _create_adapter() case, auth map entries, auth bypass |
||
|---|---|---|
| .. | ||
| platforms | ||
| __init__.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| hooks.py | ||
| mirror.py | ||
| pairing.py | ||
| run.py | ||
| session.py | ||
| status.py | ||
| sticker_cache.py | ||