GET /system-prompt returns the full per-session system prompt as plain text. It’s Tier 6 of the six system-prompt tiers — kept because the Open WebUI filter needs it, and because it’s the simplest integration for anything that isn’t an MCP client.
Request
Priority
The server resolveschat_id and user_email from headers first, then query params, then defaults:
Response
- Body — rendered system prompt text. Includes
<available_skills>, file URL hints, skill mount paths, and the per-chat identity block. - Header —
X-Public-Base-URL: <PUBLIC_BASE_URL>. The Open WebUI filter caches this alongside the prompt so itsoutlet()can build browser-facing archive/preview links without its own Valve.
Cache
render_system_prompt(chat_id, user_email) is cache-backed with a 60-second TTL. Second request for the same (chat_id, user_email) is a dict lookup. Cache is load-bearing — the MCP middleware calls it on every request to pre-fill the ContextVar for Tier 4.
Usage pattern for custom clients
Related endpoints
| Endpoint | Purpose |
|---|---|
GET /skill-list?user_email=... | Skills list for sub-agent prompts |
GET /skill-mounts?user_email=... | Docker bind-mounts for user skills |
GET /mcp-info | Available tools, required headers, endpoint URL (JSON) |
GET /health | {"status":"healthy"} |
Related
- System prompt reference — the six-tier delivery model
- Open WebUI filter — how Tier 6 gets consumed
