AI SystemsNovember 2026Status: Platform Template

AI Agent Operational Platform

A Self-Hosted Platform for Governed AI Agents in Regulated Industries

At a glance

Problem
Regulated organizations need AI agents that stay within approved tools, user permissions, data boundaries and accountable human approval.
My role
Designed and built the platform end to end: execution engine, agent runtime, governance controls and web console.
Key decision
Enforce governance in code, database constraints and network isolation rather than prompts; agents act only through versioned, deterministic tools.
Result
Runs end to end, with every tool call recorded and consequential decisions routed to human approval.
Proof
Approximately 780 Python tests66 web testsPlaywright end-to-end coverage
Built with
Backend
  • Python 3.12+
  • FastAPI
  • Pydantic
  • PostgreSQL
  • SQLAlchemy
  • Alembic
AI
  • Ollama
  • vLLM
  • Anthropic API
Frontend
  • React
  • TypeScript
  • Mantine
Infrastructure
  • Docker Compose
  • NGINX
  • Squid Proxy
Quality
  • pytest
  • Vitest
  • Playwright
  • GitHub Actions

In Practice

Platform walkthrough (1:43)

Running on a local Qwen 3 model, a fee-refund assistant checks a customer's overdraft and maintenance fees against the courtesy-refund policy using only the tools it's been granted. Its refund proposal waits for a fee manager's approval. Workflows run in isolated workers, and operators monitor activity without seeing the underlying data.

Context

Building an AI application is different from delivering software an organization can install, secure and operate inside its own infrastructure. In regulated industries, adoption also depends on access controls, data boundaries, accountability and auditable evidence. I wanted to see whether a reusable platform could provide those capabilities once, so each business solution can focus on domain logic instead of rebuilding infrastructure and governance.

How can organizations deploy AI agents inside their own infrastructure while maintaining control over data, permissions, decisions and the evidence needed to audit their execution?

Most agent implementations focus on model capabilities and orchestration, leaving security, authorization, operational controls and auditability to each application. The result is duplicated engineering effort and inconsistent risk boundaries, the kind of gap a bank's risk, compliance and audit teams will not accept.

Approach

I treated governance as a platform responsibility, not an application feature. Three principles shaped the design: business logic runs in deterministic, versioned tools, while agents interpret results and coordinate work; controls are enforced through application logic, database constraints and network isolation, never through prompts; and shared infrastructure is built once, so new business solutions register through typed contracts instead of rebuilding it.

Data sources

  • Synthetic Fixtures and Seeded Activity

    Synthetic fixtures, including a retail-banking fee-refund scenario, exercise the platform's solutions, agents, workflows, approvals and operational monitoring. No customer data is included. In a real deployment, each industry implementation supplies its own data inside the confidential execution boundary.

Solution

Platform

  1. Modular architecture. Established a modular platform architecture separating core services, API, workers, persistence, model providers and agent runtime from independently registered business solutions. New solutions integrate through typed contracts without modifying platform internals.

  2. Async execution engine. Built an asynchronous execution engine using PostgreSQL for work coordination, with worker routing, leases, recovery, process isolation and execution limits.

  3. Provider-neutral agents. Implemented a provider-neutral agent runtime supporting local Ollama models and optional Anthropic integration, with multi-turn conversations, tool authorization, specialist delegation, background workflows and execution budgets.

Governance and audit

  1. Governance controls. Developed governance controls including role-based permissions, capability-based tool access, isolated network egress, protected data handling, versioned agent definitions and evaluation requirements.

  2. Human approval. Added human-in-the-loop proposal and approval workflows with scoped authority, separation of duties, decision records and verifiable exports. Agent responses also undergo grounding checks against recorded tool results and conversation evidence.

  3. Audit and provenance. Implemented append-only audit records, hash-chain verification and execution provenance capturing the data, rules, model versions and content digests associated with results.

Console and delivery

  1. Web console. Built a white-labelled React and TypeScript web console for solution execution, agent conversations, workflow monitoring, proposal review, audit history and operational metrics.

  2. Controlled egress. Containerized the platform with Docker Compose, separating internal services from controlled outbound network access through an egress worker and allow-listing proxy.

  3. Automated quality gates. Established automated quality controls with approximately 780 Python tests, 66 web tests, Playwright end-to-end coverage and GitHub Actions for formatting, linting, type checking, API contract validation and container builds.

Architecture

The design separates shared infrastructure from business solutions and the agents that use them. Users interact through a web console or API, with requests authorized and persisted before asynchronous execution.

Internal workers execute deterministic tools and agent workflows. Agents invoke approved tools through the platform runtime, with each execution recorded and linked to its results. A separate egress worker handles permitted outbound requests, keeping confidential tools isolated from network-enabled capabilities.

Human approvals, execution provenance and audit records provide accountability across the lifecycle. Operators monitor execution activity, failures, model usage and worker health through the console.

Architecture: people use the console or API; the API and a separate worker share one PostgreSQL database holding executions, approvals, the audit log and provenance; the worker calls a local model; an optional egress worker reaches allow-listed sites through a logging proxy.
Hover to magnify · click to open full sizeTap to open full size

Components

  • White-labelled web console and REST API
  • Solution, agent and workflow registries
  • Authorization and policy enforcement
  • PostgreSQL execution queue and isolated workers
  • Provider-neutral model integration
  • Agent runtime with tool execution and delegation
  • Isolated network egress and allow-listing proxy
  • Human approval and proposal management
  • Grounding checks and agent evaluations
  • Audit trail and execution provenance
  • Operational monitoring and diagnostics
  • Containerized deployment and migrations

Outcome

The platform runs end to end: agent conversations, specialist delegation, background workflows, deterministic tool execution, human approval and operational monitoring. Every tool call produces a recorded execution, and agent responses can be checked against that evidence. With a local model, development and demonstrations run without sending data to an external provider.

Scope and limits

The project demonstrates a working platform template, not a production-ready or regulator-approved system. It has not undergone independent security review or customer deployment. SSO, MFA, encryption at rest, dual-control approvals and deployment beyond a single host remain open requirements.

Lessons Learned

  • The deployment and operationalization gap is a distinct product problem. A working agent is not automatically software that an organization can securely install and operate.

  • Governance must be built into the platform. Authorization, data boundaries and approval authority cannot depend on prompts or individual application implementations.

  • Deterministic tools provide a foundation for trustworthy AI workflows. Keeping calculations and business rules outside the model makes results traceable to recorded executions.

  • Human approval requires enforceable separation of duties and appropriately scoped authority, not simply an approval button.

What's next

  • Build a second industry implementation to validate the portability of the platform and its solution registration model (now under way: Financial Services AI).
  • Integrate customer identity providers, SSO, MFA and user management.
  • Add connectors to customer systems of record with versioned data snapshots and execution-level provenance.
  • Introduce dual-control approvals, approval delegation and expanded governance workflows.
  • Strengthen deployment security with encryption, TLS, image signing, software bills of materials and vulnerability scanning.
  • Evaluate scalable deployment patterns, model lifecycle management, backup and recovery, and independent security review.