API server: OpenAI-compatible REST endpoint for sessions and runs #805

Closed
opened 2026-10-27 13:37:49 +00:00 by sam · 0 comments
Owner

OpenAI-compatible REST API for external tool integration:

  1. Chat Completions: POST /v1/chat/completions — stateless, with X-Hermes-Session-Id for continuity.
  2. Responses API: POST /v1/responses — stateful via previous_response_id.
  3. Sessions: CRUD + fork for session management.
  4. Runs: POST /v1/runs (returns run_id immediately), GET /v1/runs/{id} (status), GET /v1/runs/{id}/events (SSE stream), POST /v1/runs/{id}/approval and /stop (resolve or interrupt).
  5. Models: GET /v1/models — list configured models.
  6. Health: GET /health (simple), GET /health/detailed (authenticated readiness).

This enables Open WebUI, LobeChat, and other OpenAI-compatible frontends to use archie-core as a backend.

Ref: docs/prds/hermes-gap-analysis.md (api_server.py)

Acceptance Criteria

curl -X POST /v1/chat/completions with a model and messages returns a streaming response. Sessions persist across requests via session ID. Runs can be stopped mid-execution.

Notes

docs/prds/hermes-gap-analysis.md (referenced above) was intentionally deleted in commit 65aa5b4 ('chore: cleanup', 2026-07-28) after it had already spawned this and ~14 sibling beads issues from its 60 identified gaps — it is not a broken link to restore. This issue's description is the surviving record of its slice of that analysis.

Close reason

No use case (maintainer 2026-09-22). Recorded for the file: the premise was NOT invented by the bead author - the deleted source doc claims it twice (hermes-gap-analysis.md:25 'API server | OpenAI-compatible REST | None' and :153 'OpenAI-compatible API server (/v1/chat/completions, /v1/responses, session CRUD, runs with SSE streaming)'). That doc was an AI-generated vendor comparison and the Hermes claim was never independently verified, so this closes as not-wanted rather than as disproven. Do not resurface on parity grounds.


Imported from beads archie-core-1786637496982-273-2078b865 · GitHub #294 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-21

OpenAI-compatible REST API for external tool integration: 1. **Chat Completions**: POST /v1/chat/completions — stateless, with X-Hermes-Session-Id for continuity. 2. **Responses API**: POST /v1/responses — stateful via previous_response_id. 3. **Sessions**: CRUD + fork for session management. 4. **Runs**: POST /v1/runs (returns run_id immediately), GET /v1/runs/{id} (status), GET /v1/runs/{id}/events (SSE stream), POST /v1/runs/{id}/approval and /stop (resolve or interrupt). 5. **Models**: GET /v1/models — list configured models. 6. **Health**: GET /health (simple), GET /health/detailed (authenticated readiness). This enables Open WebUI, LobeChat, and other OpenAI-compatible frontends to use archie-core as a backend. Ref: docs/prds/hermes-gap-analysis.md (api_server.py) ### Acceptance Criteria curl -X POST /v1/chat/completions with a model and messages returns a streaming response. Sessions persist across requests via session ID. Runs can be stopped mid-execution. ### Notes docs/prds/hermes-gap-analysis.md (referenced above) was intentionally deleted in commit 65aa5b4 ('chore: cleanup', 2026-07-28) after it had already spawned this and ~14 sibling beads issues from its 60 identified gaps — it is not a broken link to restore. This issue's description is the surviving record of its slice of that analysis. ### Close reason No use case (maintainer 2026-09-22). Recorded for the file: the premise was NOT invented by the bead author - the deleted source doc claims it twice (hermes-gap-analysis.md:25 'API server | OpenAI-compatible REST | None' and :153 'OpenAI-compatible API server (/v1/chat/completions, /v1/responses, session CRUD, runs with SSE streaming)'). That doc was an AI-generated vendor comparison and the Hermes claim was never independently verified, so this closes as not-wanted rather than as disproven. Do not resurface on parity grounds. --- _Imported from beads `archie-core-1786637496982-273-2078b865` · GitHub #294 · type feature · priority P2 · created 2026-08-08 · closed 2026-09-21_
sam added the mediumfeature labels 2026-10-27 13:37:49 +00:00
sam self-assigned this 2026-10-27 13:37:49 +00:00
sam closed this issue 2026-10-27 13:37:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#805