Skip to main content
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 resolves chat_id and user_email from headers first, then query params, then defaults:
This matches how the rest of the server reads session identity.

Response

  • Body — rendered system prompt text. Includes <available_skills>, file URL hints, skill mount paths, and the per-chat identity block.
  • HeaderX-Public-Base-URL: <PUBLIC_BASE_URL>. The Open WebUI filter caches this alongside the prompt so its outlet() 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