Zum Inhalt

Rebuild Prompt: Full AI Ops Stack

This is a reusable, generalized prompt for rebuilding the full AI Operations stack pattern in another environment. It contains no secrets and no customer-specific data.

See the template repository at:

dist/ai-ops-context-gateway-template/

Prompt

Build a full AI Operations stack.

The stack must include Ollama, LiteLLM, Qdrant, OpenWebUI, an OpenAI-compatible
context gateway, an Obsidian vault as human knowledge source, local secret
bootstrap, knowledge ingestion/reindex hooks and smoke tests.

Architecture:

User
 -> OpenWebUI / OpenCode / Voice / Teams
 -> LiteLLM visible alias: <ORG>/ai
 -> AI Ops Context Gateway
 -> Obsidian/MkDocs/Runbook Retrieval via Qdrant
 -> LLM or Agent Core
 -> MCP / Controlled Execution for read-only tools and approved writes

Hard rules:
- Never expose secrets in chat, logs, docs or tool traces.
- The gateway must require Bearer auth.
- Bootstrap must generate local secrets and save them to `.env` with `0600`.
- No generated secret may be committed.
- Obsidian must be created as a local vault with frontmatter governance.
- Obsidian is the source of truth for reviewed human facts; Qdrant is only the index.
- Never store secrets in Obsidian.
- Ollama chat and embedding models must be configurable.
- LiteLLM must expose `<ORG>/ai` as the visible model alias.
- OpenWebUI must point to LiteLLM.
- The gateway must not execute infrastructure writes directly.
- All writes require governed tooling, approval, backup, audit, verification and rollback.
- If customer/tenant scope is ambiguous, block and ask for scope.
- If live data is unavailable, say so clearly.
- Do not mix customer data.
- Answer with confirmed/interpreted/uncertain.

Implement:
- GET /health
- GET /ready
- GET /v1/models
- POST /v1/chat/completions
- optional SSE streaming
- retrieval against vector DB with metadata filters
- lexical reranking for exact infrastructure terms
- compact source snippets
- audit metadata without secrets
- Obsidian vault folders for inbox, platform, runbooks, customers, decisions and historical notes
- LiteLLM alias <ORG>/ai -> gateway
- smoke tests for known facts, ambiguous scope and unavailable live data

Expected result:
<ORG>/ai behaves like a single user-facing AI Operations model, while the
gateway safely injects context and governance before the underlying model
generates an answer.