openhands-backend / README.md
PYAE1994's picture
Phase 1 backend deploy
46258b3 verified
metadata
title: OpenHands Simplified Backend
emoji: πŸ€–
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false

OpenHands Simplified Backend (Phase 1)

FastAPI service that exposes:

  • GET /health β€” liveness + provider/key status
  • POST /api/chat β€” non-streaming chat
  • POST /api/chat/stream β€” SSE; auto-routes chat vs E2B execution
  • POST /api/execute β€” SSE; always runs in E2B sandbox
  • POST /api/intent β€” intent classifier only

Environment variables (set in HF Space β†’ Settings β†’ Secrets)

Name Required Notes
GEMINI_KEY optional comma-separated Gemini API keys
SAMBANOVA_KEY optional comma-separated SambaNova API keys
GITHUB_KEY optional comma-separated GitHub Models tokens
E2B_API_KEY yes required for execution endpoints
E2B_TEMPLATE optional custom sandbox template id
ALLOWED_ORIGINS optional CSV; defaults to *
LOG_LEVEL optional default INFO

At least ONE LLM provider key must be set.

Test (after deploy)

curl https://<your-space>.hf.space/health
curl -N -X POST https://<your-space>.hf.space/api/execute \
  -H 'Content-Type: application/json' \
  -d '{"message":"Create proof.txt with the current UNIX timestamp and print its contents."}'