SDK HTTP Endpoints
The minimal HTTP session routes Downcity can expose for RemoteAgent
These SDK routes do not belong to Agent itself.
They are exposed by the City HTTP transport returned from city.http(). City may start the
standalone server itself or mount its router in a host server such as the Downcity gateway.
The current core set includes:
GET /api/sdk/sessionsPOST /api/sdk/sessionsGET /api/sdk/sessions/:session_idPOST /api/sdk/sessions/:session_id/promptGET /api/sdk/sessions/:session_id/eventsGET /api/sdk/sessions/:session_id/messagesGET /api/sdk/sessions/:session_id/systemGET /api/sdk/sessions/:session_id/interactionsGET /api/sdk/sessions/:session_id/statusPOST /api/sdk/sessions/:session_id/setPOST /api/sdk/sessions/:session_id/respondPOST /api/sdk/sessions/:session_id/retry-model-stepPOST /api/sdk/sessions/:session_id/forkPOST /api/sdk/sessions/:session_id/archiveGET/DELETE /api/sdk/archived-sessionsPOST /api/powers/action
status and runtime events expose the same current activity and live_execution. Final model failure completes that call, closes its message, and releases resources; after cleanup live_execution is false. Submit the current in-process { message_id, error_part_id } once to retry-model-step, with type in the query. The response includes result.accepted and that call completion in result.result, continuing the original ModelCall in the same Turn and Message. Original finished, callback, and settled business results retain the failure. RPC uses sdk.sessions.retry_model_step with { session_id, type, input }. Busy or duplicate submissions are rejected. On transport uncertainty read status and messages; do not resend automatically. New input, configuration changes, Stop, release, or restart may invalidate the binding. Targeted Stop sends expected_turn_id and expected_message: { message_id, revision }; after same-Turn recovery, missing or stale checkpoints are rejected.