🔌 API Server Mode
HelseCLI can be run as a standalone FastAPI web server. This allows you to integrate Helse's core assistant and tools into other applications, websites, or custom dashboards.
HelseCLI can be run as a standalone FastAPI web server. This allows you to integrate Helse's core assistant and tools into other applications, websites, or custom dashboards.
🚀 Launching the Server
Run the dedicated server script:
python api_server.py --port 8000 --host 0.0.0.0
📂 Key Endpoints
POST /chat
Interact with the Helse core assistant.
- Input: User message, session ID, model selection.
- Output: Streamed or batch response from the LLM, including tool call proposals.
POST /document
Trigger the document generation pipeline via API.
- Input: Objective, type, format, etc.
- Output: Task ID to track generation progress.
GET /tools
List all registered tools and their schemas. useful for building dynamic UIs.
🏗️ Use Cases
- Custom UI: Build a web-based chat interface that uses Helse's local file tools.
- CI/CD Integration: Trigger Helse research or documentation tasks from a GitLab/GitHub pipeline.
- Team Collaboration: Host a central Helse instance that multiple teammates can connect to via a UI.
🛡️ Security Note
The API server does not include built-in authentication by default. If exposing it over a network:
- Wrap it in a reverse proxy (like Nginx) with SSL.
- Implement your own auth layer (e.g., API keys or JWT) in
api_server.py. - Use a firewall to restrict access to trusted IPs.