feat(api-server): add read-only sessions, memory, skills, config endpoints#6334
Open
outsourc-e wants to merge 1 commit intoNousResearch:mainfrom
Open
feat(api-server): add read-only sessions, memory, skills, config endpoints#6334outsourc-e wants to merge 1 commit intoNousResearch:mainfrom
outsourc-e wants to merge 1 commit intoNousResearch:mainfrom
Conversation
…oints
Adds purely additive read-only and metadata endpoints to the gateway
API server. All chat continues to flow through /v1/chat/completions
exclusively — no parallel agent lifecycle or gateway runner bypass.
New endpoints:
- GET /api/sessions — list sessions (paginated)
- POST /api/sessions — create session (metadata only)
- GET /api/sessions/{id} — session details
- PATCH /api/sessions/{id} — update title
- DELETE /api/sessions/{id} — delete session
- GET /api/sessions/{id}/messages — message history
- GET /api/memory — read memory files (MEMORY.md, USER.md)
- GET /api/skills — list installed skills with frontmatter
- GET /api/config — safe config subset (API keys stripped)
All handlers use the existing _check_auth() gate and follow
established aiohttp patterns. Session endpoints delegate to the
existing SessionDB (list_sessions_rich, get_session, get_messages,
create_session, set_session_title, delete_session).
This enables web UIs like Hermes Workspace to connect to hermes
--gateway for session management, memory browsing, and skill
inspection while keeping chat on the gateway's existing message
handling pipeline.
Follows up on NousResearch#4639 feedback — read-only endpoints approved,
chat endpoints removed in favor of /v1/chat/completions.
8 tasks
|
Superseded by #8556 which adds the same read-only endpoints plus session chat (sync + SSE streaming), memory CRUD, config write, capability probes, and 91 tests. |
|
Closing in favor of #8556 which supersedes this with a complete session management API (20 endpoints including streaming chat, memory CRUD, config write, capability probes, and 91 tests). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds read-only and metadata endpoints to
gateway/platforms/api_server.pythat enable web UIs to inspect gateway state without bypassing the existing message handling pipeline.All chat continues to flow through
/v1/chat/completionsexclusively — no parallel agent lifecycle, no directAIAgentcalls, no gateway runner bypass.This follows up on #4639 feedback from @teknium1:
What changed (1 file, purely additive)
Sessions (delegates to existing SessionDB)
GET /api/sessions— list sessions (paginated vialist_sessions_rich)POST /api/sessions— create session (metadata only, viacreate_session)GET /api/sessions/{id}— session details (viaget_session)PATCH /api/sessions/{id}— update title (viaset_session_title)DELETE /api/sessions/{id}— delete session (viadelete_session)GET /api/sessions/{id}/messages— message history (viaget_messages)Memory, Skills, Config (read-only)
GET /api/memory— reads~/.hermes/memories/files (MEMORY.md, USER.md)GET /api/skills— scans installed skill directories, parses YAML frontmatterGET /api/config— returns safe config subset (API keys stripped)Architecture
_check_auth()gateSessionDB— the same database that/v1/chat/completionsalready writes to/v1/chat/completionswithX-Hermes-Session-Idfor session continuityWhy
The existing
/v1/chat/completionsendpoint handles agent creation, session persistence, and streaming. These additions fill the gap for stateful web UIs that need to read sessions, memory, and skills — following the same aiohttp patterns already established.Testing
hermes --gateway/v1/chat/completions+X-Hermes-Session-Idwith session continuity confirmed