AI engineering is more than choosing a model. Production systems need identity, data boundaries, controlled tools, resilient routing, observability, evaluation and evidence that can survive audits and incidents.

This page starts with the architecture and operating model I use, then keeps the broader tool ecosystem as a secondary reference rather than the product itself.

My AI platform journey

The page now follows the platform layers from agents through governance. Use this journey to jump directly to an architectural responsibility.

Secure AI platform engineering

The goal is not to accumulate AI tools. It is to operate models, agents, MCP tools and knowledge pipelines behind explicit security, reliability, cost and governance boundaries.

Architecture principles

Controlled model gateway

Route local and remote inference through LiteLLM so clients share authentication, budgets, fallbacks, telemetry and provider policy instead of calling models directly.

Identity, secrets & data boundaries

Keep credentials server-side, constrain access by workload, and separate sensitive prompts, documents and tenant data from public or lower-trust execution paths.

MCP & agent trust boundaries

Treat tools as privileged capabilities: scope what agents can call, isolate execution, minimize filesystem and network reach, and keep human approval for destructive actions.

RAG provenance & lifecycle

Track source provenance, ingestion state and retention across Paperless, OCR and retrieval pipelines so generated answers remain traceable to controlled knowledge.

Observability, evaluation & FinOps

Trace prompts, latency, model selection and token cost with Langfuse and operational metrics, then evaluate quality separately instead of relying on anecdotal output checks.

Governance by design

Map technical controls to GDPR, ISO 27001 and ISO 42001 concerns: accountability, access control, evidence, data residency, supplier risk and model-use policy.

What this architecture optimizes for

  • local-first privacy with controlled remote fallback
  • one policy layer for models and agents
  • measurable cost, latency and quality
  • replaceable providers instead of vendor lock-in
  • auditable execution and knowledge flows

My AI platform architecture

A local-first platform structured as layers rather than a product catalogue. LiteLLM is the central control plane connecting interfaces, models, tools, workflows, and observability.

  1. Interfaces & agents

    • Open WebUI
    • OpenClaw
    • OpenCode / Codex / Cursor
  2. AI gateway & policy

    • LiteLLM
    • Redis cache
    • routing · budgets · fallbacks · telemetry
  3. Inference providers

    • Ollama · local
    • OpenAI API · remote
  4. Tools, MCP & knowledge

    • FastAPI MCP
    • Open Terminal
    • OpenRAG
    • SearXNG
    • Paperless
  5. Workflow & orchestration

    • n8n
    • Temporal
    • Langflow
  6. Observability, evaluation & FinOps

    • Langfuse
    • Opik
    • Prometheus

Local-first & privacy

Routine workloads prefer Ollama inside the homelab. Routing through LiteLLM keeps one shared routing and protection policy before any remote inference.

Cost & resilience

Redis caching, fallbacks, and centralized routing reduce unnecessary remote calls and avoid coupling clients to a single model.

Measurable

Langfuse, Opik, and Prometheus separate LLM observability, quality evaluation, and operational metrics while preserving a coherent platform view.

Workflow & orchestration

Three complementary roles: n8n for rapidly composing automations, Temporal for durable execution, and Langflow for experimenting with and assembling AI flows.

n8n

Visual automation layer for rapidly connecting APIs, data, agents, and homelab services.

n8n

Temporal

Durable orchestration for stateful, long-running, critical workflows: retries, persistent state, timers, human-in-the-loop steps, and LLM activities.

Temporal

Langflow

Visual workbench for prototyping LLM chains, agents, tools, and RAG before productionizing them in orchestration and service layers.

Langflow

OpenCommit

OpenCommit complements the development workflow with consistent Conventional Commit messages; it intentionally remains outside the orchestration layer.

GitHub

Global AI components

Shared capabilities decoupled from agents: execution, knowledge, and isolation can be consumed by Open WebUI, agents, and workflows.

Open Terminal

Self-hosted terminal exposing a simple API so agents and automation can execute commands and manipulate files in a controlled environment.

GitHub

OpenRAG

Shared RAG layer fed by the vetted PDF corpus produced through Paperless. OpenRAG combines Langflow workflows, Docling parsing, and OpenSearch-backed retrieval to provide document ingestion, search, and chat in one stack. Its APIs can then be wrapped by a custom MCP server so AI interfaces and agents reuse a common retrieval surface instead of reimplementing knowledge-base access.

GitHub

NVIDIA OpenShell

Sandboxed runtime for autonomous agents with isolation, declarative policies, and controlled network, filesystem, process, and credential access.

GitHub

Models, frameworks & ecosystem reference

Secondary reference material for technologies that can fit behind the platform controls above. Product names are examples, not architectural requirements.

Selected models & developer resources

NVIDIA Nemotron

A compact open model family useful when evaluating smaller local or edge inference footprints.

Learn more

Context7

Context and documentation retrieval tooling for development assistants and agent workflows.

Website

Awesome MCP Servers

A curated directory of MCP servers and integrations for exploring standardized tool capabilities.

Repository

Learning & understanding

A visual guide to reasoning LLMs that helps explain how modern models approach multi-step reasoning and where evaluation still matters.

Read article

Ecosystem compass

Treat this list as replaceable implementation options. Keep authentication, routing, policy, telemetry and data lifecycle independent from any single provider.

LLM APIs & chat

  • OpenAI
  • Groq
  • Cohere
  • Anthropic
  • Google Gemini
  • Mistral AI
  • Azure OpenAI
  • Open WebUI
  • LocalAI

Coding assistants & IDEs

  • GitHub Copilot
  • Cursor
  • Amazon Q Developer
  • Dust

Cloud ML & notebooks

  • Azure Machine Learning
  • Hugging Face
  • AWS SageMaker
  • Google Vertex AI

RAG, vectors & frameworks

  • LangChain
  • PGvector
  • Elasticsearch

Agents & automation

  • n8n
  • LangGraph
  • Zapier
  • HubSpot
  • CrewAI
  • Temporal

Evals, traces & monitoring

  • Weights & Biases
  • Langfuse
  • OpenTelemetry
  • Opik

Local & open inference

  • Ollama
  • LiteLLM
  • vLLM
  • llama.cpp
  • LM Studio
  • AnythingLLM
  • OpenRAG
  • Open Terminal

LLM observability, evaluation & FinOps

A unified view of quality, traces, costs, tokens, and latency: evaluate LLM applications, monitor production behavior, and apply FinOps discipline to model consumption.

Opik by Comet

Open-source platform for evaluating, testing, and monitoring LLM applications, useful for comparing model outputs and tracking production quality.

Documentation

Langfuse

Open-source LLM observability platform for traces, prompts, scores, costs, and latency. Langfuse collects telemetry from LiteLLM and the MCP server to provide a cross-platform view of AI calls.

Langfuse

ChatGPT / Codex usage

Track ChatGPT and Codex usage across credits, tokens, models, activity, and consumption. Available analytics depend on the workspace plan; Codex also exposes usage and limit details in supported account settings.

ChatGPT / Codex analytics

Cursor

Review Cursor account usage and token-consumption patterns to spot expensive workflows and plan limits before they become delivery friction.

Cursor analytics

LiteLLM

Use LiteLLM as the metered gateway for routing, budgets, fallbacks and provider-independent usage evidence rather than distributing cost controls across every client.

LiteLLM

Document-to-knowledge pipeline

A controlled PDF-to-RAG flow with explicit preparation, archive/OCR, enrichment, durable orchestration, private review and a shared retrieval surface.

  1. Stirling PDF

    Normalize, split, merge or clean PDFs locally before ingestion so the archive receives predictable inputs.

    Stirling PDF
  2. Paperless-ngx

    Archive, OCR, tag and index the prepared documents in Paperless-ngx as the durable source corpus.

    Paperless-ngx
  3. Paperless-AI

    Enrich consumed documents with classification and metadata only after the canonical archive has accepted them.

    Paperless-AI
  4. Temporal

    Run summarization, translation, retries and human-in-the-loop activities as durable workflows rather than fragile background scripts.

    Temporal
  5. AnythingLLM

    Use a private workspace to inspect and question the processed corpus while validating OCR, tags and downstream transformations.

    AnythingLLM
  6. OpenRAG

    Publish the vetted corpus to a shared RAG layer, then expose controlled retrieval capabilities through an MCP surface instead of reimplementing access per agent.

    OpenRAG

Engineering & governance practices

The platform controls matter only when they are paired with repeatable engineering habits and explicit evidence.

  • Define a measurable objective and failure criteria before introducing an AI component.
  • Monitor quality, latency, cost and failure modes continuously instead of validating only with anecdotal prompts.
  • Threat-model prompts, tools, identities, data movement and supplier boundaries; review bias and misuse separately from infrastructure security.
  • Automate repetitive controls, but keep approval boundaries for destructive or high-impact agent actions.
  • Version prompts, models, policies and retrieval pipelines so changes can be explained and rolled back.
  • Test deterministic code, retrieval quality, policy enforcement and model behavior at the appropriate layer.
  • Keep architecture, data provenance, evaluation results and operational evidence understandable to engineering, security and governance stakeholders.

Build a secure AI platform

Need to turn an AI proof of concept into an operable platform with security, observability and governance boundaries?