Skip to content

Add API server session control surface - #29435

Closed
Codename-11 wants to merge 1 commit into
NousResearch:mainfrom
Codename-11:feat/api-session-control
Closed

Add API server session control surface#29435
Codename-11 wants to merge 1 commit into
NousResearch:mainfrom
Codename-11:feat/api-session-control

Conversation

@Codename-11

Copy link
Copy Markdown
Contributor

Summary

Reworks the stale API Server control-surface idea from PR #8556 into a focused patch on current upstream/main.

This adds a client/session resource layer for mobile and web clients while keeping it as a thin wrapper over current upstream primitives:

  • GET /api/sessions
  • POST /api/sessions
  • GET /api/sessions/{session_id}
  • PATCH /api/sessions/{session_id}
  • DELETE /api/sessions/{session_id}
  • GET /api/sessions/{session_id}/messages
  • POST /api/sessions/{session_id}/fork
  • POST /api/sessions/{session_id}/chat
  • POST /api/sessions/{session_id}/chat/stream

The implementation uses existing SessionDB and _run_agent machinery, including X-Hermes-Session-Id and X-Hermes-Session-Key semantics. It does not add a second session DB helper or a parallel agent execution path.

/v1/capabilities now advertises the session/chat surface and explicitly marks deferred areas as unsupported so clients can choose safe fallbacks.

Explicitly deferred

This PR intentionally does not implement broad admin/config control, jobs admin expansion, memory write APIs, skills/category APIs, WebRTC, provider-native realtime sessions, or realtime voice.

Verification

  • python -m py_compile gateway/platforms/api_server.py
  • python -m pytest tests/gateway/test_api_server.py -q -o 'addopts=' — 149 passed
  • python -m pytest tests/gateway/test_session_api.py -q -o 'addopts=' — 7 passed
  • Extra local sweep: python -m pytest tests/gateway/test_api_server*.py -q -o 'addopts=' — 275 passed

@Codename-11

Copy link
Copy Markdown
Contributor Author

Closing as duplicate/noise: this was opened from an accidentally resumed local session after existing API server session/audio PRs were already open (#29302, #29364).

@Codename-11
Codename-11 deleted the feat/api-session-control branch May 20, 2026 19:18
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants