top of page
Search

Inside a Governed Enterprise AI Agent Platform

  • Writer: Mark Kendall
    Mark Kendall
  • 1 day ago
  • 9 min read

Inside a Governed Enterprise AI Agent Platform


FastAPI, agents, RAG, AI gateways, embeddings, observability, and multiple LLMs can look like a complicated AI diagram. Underneath it is a surprisingly understandable enterprise architecture.

When developers first see a modern enterprise AI architecture, it can look like a collection of unfamiliar boxes:

NGINX → FastAPI → AI Agent → Knowledge Gateway → Embeddings → Vector Store → LiteLLM → OpenAI / Claude / Gemini / Bedrock

That raises a perfectly reasonable question:

What is this thing actually doing?

Is it a search engine?

Is it ChatGPT running inside the enterprise?

Is it an AI agent?

Is FastAPI somehow the AI?

Why do we need an AI Gateway when we can just call an LLM API?

And what exactly is flowing between all these components?

The easiest way to understand the architecture is to stop thinking about the individual technologies and start with the four enterprise problems it is trying to solve:

  1. How do we govern AI usage?

  2. How do we observe AI behavior?

  3. How do we provide reliable enterprise knowledge?

  4. How do we keep agents consistent?

Once those problems are understood, nearly every box in the architecture has an obvious reason for existing.


1. Start With the User’s Intent

Imagine an employee asks:

“What is our procedure when a customer order fails after Salesforce account creation but before billing provisioning?”

An LLM may understand Salesforce, billing systems, distributed transactions, and provisioning in general.

But it doesn’t know our architecture.

It doesn’t necessarily know:

  • our Salesforce implementation,

  • our billing platform,

  • our integration adapters,

  • our recovery procedures,

  • our operational runbooks,

  • our security policies,

  • our Jira stories,

  • or our internal architecture decisions.

That enterprise knowledge has to come from somewhere.

So instead of simply doing this:

User

  │

  ▼

LLM

  │

  ▼

Answer

we build something closer to:

User / Application

        │

        ▼

   Agent Runtime

        │

        ├──── Need enterprise knowledge?

        │              │

        │              ▼

        │       Knowledge Gateway

        │              │

        │              ▼

        │        Enterprise Data

        │

        ▼

     AI Gateway

        │

        ▼

   Approved LLM

        │

        ▼

   Grounded Answer

That is the basic architecture.

Everything else makes it reliable enough for enterprise use.


2. The Agent Is the Decision-Making Layer

The AI Agent is the component receiving the user’s goal or question.

Conceptually:

POST /agent/chat


{

  "prompt":

  "What should I do when provisioning fails?"

}

The agent doesn’t necessarily send that text immediately to an LLM.

It may first determine:

What is the user asking?


Do I already have enough context?


Do I need enterprise knowledge?


Do I need to call a tool?


Which tools am I allowed to use?


Do I need another specialized agent?


Which information should be included

in the model context?


Which model is appropriate?


What should I return?

That is where the system starts becoming agentic rather than simply generative AI.

The agent isn’t merely generating words.

It is coordinating work toward a goal.


3. FastAPI Isn’t the AI

One potentially confusing part of architectures like this is seeing FastAPI everywhere.

FastAPI is simply a popular Python framework for exposing services over HTTP.

A service might expose something like:

@app.post("/agent/chat")

async def chat(request):

    result = await agent.run(request.prompt)

    return result

Another might expose:

POST /knowledge/search

POST /knowledge/retrieve

POST /knowledge/embed

FastAPI provides the network interface.

It does not provide the intelligence.

Think of it this way:

FastAPI

   │

   └── "Here is how other systems call me."


Agent

   │

   └── "Here is what I should do."


Knowledge Service

   │

   └── "Here is what the company knows."


LLM

   │

   └── "Here is my reasoning/generation."

Python and FastAPI happen to be popular because the AI ecosystem has enormous Python support.

A common deployment pattern therefore becomes:

Python

  +

FastAPI

  +

Docker

  +

Kubernetes

But nothing about this architecture requires Python.

The same architecture could be implemented using:

ASP.NET Core

Node / TypeScript

Java / Spring Boot

Go

FastAPI is simply the service boundary around some of the AI capabilities.


4. The Knowledge Gateway Solves a Completely Different Problem

Now suppose the agent determines:

“I cannot reliably answer this from the model’s general knowledge.”

It calls the Knowledge Gateway.

The Knowledge Gateway’s job is to retrieve relevant enterprise information.

For example:

Agent


"What happens when Salesforce succeeds

but billing provisioning fails?"


        │

        ▼


Knowledge Gateway


        │

        ├── Architecture documents

        ├── Confluence

        ├── Runbooks

        ├── Jira

        ├── PDFs

        ├── Service documentation

        ├── Databases

        └── Internal APIs

The Knowledge Gateway may return:

1. Provisioning recovery procedure

2. Salesforce account lifecycle documentation

3. Billing compensation procedure

4. Relevant architecture decision

Those results become context for the LLM.

That distinction is critical.

The LLM isn’t magically learning the enterprise.

The architecture is dynamically supplying the relevant enterprise knowledge to the model.


5. This Is Where RAG Enters the Architecture

Much of the lower half of this architecture is essentially a Retrieval-Augmented Generation, or RAG, pipeline.

Documents enter the system:

Documents

    │

    ▼

Chunking

    │

    ▼

Embedding Model

    │

    ▼

Vectors

    │

    ▼

Vector / Search Index

An embedding converts text into a numerical representation capturing semantic relationships.

That allows a question like:

“What happens if billing fails after account creation?”

to retrieve documentation that might actually contain language such as:

“Compensation processing following downstream provisioning failure.”

Those sentences don’t contain exactly the same words.

But they may mean approximately the same thing.

Semantic retrieval can discover that relationship.


6. Search Is Part of the Architecture — But This Isn’t Just a Search Engine

This is an important distinction.

Traditional enterprise search might do:

Question

   │

   ▼

Search

   │

   ▼

10 documents

The employee still has to read the documents.

A knowledge-grounded agent does something more like:

Question

   │

   ▼

Retrieve

   │

   ▼

Relevant passages

   │

   ▼

LLM reasoning

   │

   ▼

Synthesized answer

And preferably:

Answer

+

Sources

+

Evidence

+

Confidence / validation

Search therefore becomes one capability available to the agent, rather than the final product.


7. The AI Gateway Solves Yet Another Enterprise Problem

Suppose we have hundreds of AI applications.

Without an AI Gateway, developers might create:

Application A ──→ OpenAI


Application B ──→ Gemini


Application C ──→ Claude


Application D ──→ Bedrock


Application E ──→ Azure OpenAI

Now imagine trying to govern that.

Every application potentially has different:

  • credentials,

  • logging,

  • quotas,

  • models,

  • retry behavior,

  • security policies,

  • costs,

  • configuration,

  • fallback logic.

Instead, the enterprise introduces an AI Gateway:

                 ┌── OpenAI

                 │

Applications ──→ AI Gateway ── Claude

                 │

                 ├── Gemini

                 │

                 └── Bedrock

Now developers don’t necessarily decide how every model request is executed.

The platform can enforce those decisions centrally.


8. LiteLLM Is Acting as the Model Abstraction Layer

In the architecture we’re examining, LiteLLM fills that gateway role.

Conceptually:

Agent

  │

  ▼

LiteLLM

  │

  ├── OpenAI

  ├── Azure OpenAI

  ├── Gemini

  ├── Claude

  ├── Bedrock

  └── Other Models

The agent asks for inference.

The gateway determines how that inference should happen.

That opens the door to capabilities such as:

Model routing

Failover

Load balancing

Quotas

Cost tracking

Authentication

Policy enforcement

Caching

Request logging

Provider abstraction

The architecture therefore separates:

“I need intelligence.”

from:

“Which provider should supply that intelligence?”

That is a powerful enterprise boundary.


9. The Complete Runtime Flow

Put everything together and we get something like this.

Step 1 — User provides intent

"What should I do when provisioning fails?"

Step 2 — Agent interprets the request

Agent Runtime


Goal:

Determine the correct enterprise recovery procedure.

Step 3 — Agent determines knowledge is required

Need company-specific information?


YES

Step 4 — Knowledge Gateway retrieves context

Knowledge Gateway

       │

       ▼

Semantic / Vector Search

       │

       ▼

Enterprise Knowledge

Step 5 — Relevant evidence returns

The agent now has something like:

User Question

+

Relevant Runbook

+

Architecture Documentation

+

Operational Policy

Step 6 — Construct the model request

The effective prompt may become conceptually:

SYSTEM:

You are an enterprise operations assistant.


POLICY:

Answer only using approved enterprise information.


USER:

What should happen when Salesforce succeeds

but billing provisioning fails?


CONTEXT:

[Relevant architecture documentation]


[Recovery procedure]


[Operational runbook]


INSTRUCTIONS:

Provide the recovery procedure.

Identify required compensation steps.

Cite the supporting sources.

Do not invent missing procedures.

Now we have something much more useful than simply sending the original question to ChatGPT.

Step 7 — AI Gateway selects the model

Agent

  │

  ▼

AI Gateway

  │

  ├── policy

  ├── routing

  ├── cost

  ├── availability

  └── model suitability

         │

         ▼

       Model

Step 8 — LLM reasons over the supplied context

The model produces the response.

Step 9 — Agent validates and returns it

The agent can potentially:

Validate output

Check policy

Verify citations

Call another tool

Ask another agent

Retry

Escalate

Return response

And throughout the process, telemetry is being collected.


10. Observability Becomes Critical With Agents

Traditional monitoring asks:

Is my service running?


How long did the API call take?


Did I receive HTTP 500?

Agent observability needs to answer much more:

What did the user ask?


What did the agent decide?


What knowledge did it retrieve?


Which tools did it call?


Which model did it use?


How many tokens were consumed?


How much did the request cost?


How long did each step take?


Did the agent retry?


Did a guardrail fire?


Was the final response grounded?


Was the answer useful?

That is why Agent Monitoring deserves its own architectural component.

With deterministic software, developers can often reconstruct execution from logs.

With agentic systems, we need visibility into the reasoning workflow and tool interactions surrounding the model.


11. Now Add Tools and the Architecture Becomes Truly Agentic

The original architecture is primarily a governed, knowledge-grounded AI assistant.

But add tools and something interesting happens.

Instead of:

User

Question

Knowledge

LLM

Answer

we can have:

User Intent

     │

     ▼

Orchestrator

     │

     ├── Retrieve Knowledge

     │

     ├── Query Salesforce

     │

     ├── Query ServiceNow

     │

     ├── Check Database

     │

     ├── Create Jira Issue

     │

     ├── Invoke Workflow

     │

     └── Delegate to Agent

Now the system isn’t simply answering questions.

It can perform work.

That is an important architectural transition:

AI Assistant → AI Agent → Agentic System


12. Tools and MCP Fit Naturally Into This Architecture

External enterprise systems should not simply become arbitrary capabilities available to every agent.

Instead, tools provide controlled operations.

For example:

Agent

├── Salesforce Tool

├── Jira Tool

├── ServiceNow Tool

├── Database Tool

└── Deployment Tool

MCP or another enterprise tool-access layer can provide standardized access to those capabilities.

Now our architecture starts looking like:

                    USER INTENT

                        │

                        ▼

                 AGENT / ORCHESTRATOR

                        │

          ┌─────────────┼─────────────┐

          │             │             │

          ▼             ▼             ▼

       SKILLS       KNOWLEDGE        TOOLS

          │             │             │

          │             │             ▼

          │             │          MCP / APIs

          │             │             │

          │             │        Enterprise

          │             │          Systems

          │             │

          └─────────────┼─────────────┘

                        │

                        ▼

                   AI GATEWAY

                        │

                        ▼

                 APPROVED MODELS

That is much closer to a full enterprise agentic platform.


13. Skills Solve the Consistency Problem

Suppose ten development teams independently teach their agents:

“Here is how our company creates an integration adapter.”

Eventually there will be ten different implementations.

Instead, reusable organizational expertise can be packaged as a skill.

Developer Intent

       │

       ▼

Adapter Scaffolding Skill

       │

       ├── approved architecture

       ├── repo conventions

       ├── security requirements

       ├── testing requirements

       ├── deployment patterns

       └── governance rules

The skill isn’t merely information.

It represents:

How this organization performs a particular kind of work.

That makes skills another important piece of the enterprise AI platform.


14. The Architecture Eventually Becomes Intent-Driven

Once these pieces exist, the developer shouldn’t have to orchestrate every low-level step.

The developer should increasingly be able to describe the desired outcome.

INTENT


Create an adapter that consumes

TMF events and sends approved

organization accounts to Salesforce.


Preserve the existing adapter

architecture and governance.

The platform can then coordinate:

Intent

  │

  ▼

Orchestrator

  │

  ├── Skill

  │

  ├── Knowledge

  │

  ├── Subagent

  │

  ├── Tool

  │

  ├── MCP

  │

  └── Validation

  │

  ▼

AI Gateway

  │

  ▼

Models

Now the architecture has moved beyond AI chat.

It has become an intent-to-execution platform.


15. The Most Important Architectural Separation

The whole system becomes easier to understand when we stop treating “AI” as one thing.

There are several independent layers.

Layer

Responsibility

Intent

What outcome is wanted?

Agent / Orchestrator

What needs to happen?

Skill

How does our organization perform this task?

Knowledge

What does our organization know?

Tools / MCP

What external actions can be performed?

AI Gateway

Which models may be used and under what policies?

LLM

Reasoning and generation

Observability

What happened?

Governance

What is allowed?

That is the architecture.

And notice what isn’t on that list:

FastAPI.

FastAPI is an implementation technology that can expose several of these capabilities.

It is useful.

It is popular.

But it is not the architecture.


16. Four Questions Every Enterprise AI Platform Must Eventually Answer

Technologies will change.

FastAPI may eventually be replaced.

Vector databases will change.

Agent frameworks will come and go.

Today’s preferred model won’t be tomorrow’s preferred model.

But four questions remain remarkably durable.

How do we govern AI usage?

Centralize model access, security, permissions, policies, costs, and auditing.

How do we observe AI behavior?

Capture traces, tool calls, retrieval, model usage, latency, cost, failures, and quality.

How do we provide reliable knowledge?

Separate enterprise knowledge from model knowledge and retrieve the right evidence at runtime.

How do we keep agents consistent?

Centralize reusable skills, tools, policies, orchestration patterns, and approved agent capabilities.

Those are architectural problems rather than model problems.


17. The Developer Mental Model

When looking at one of these diagrams, don’t start by memorizing:

FastAPI

LiteLLM

Typesense

Docker

Embedding Model

NGINX

Start here:

                  INTENT

                     │

                     ▼

               ORCHESTRATION

                     │

        ┌────────────┼────────────┐

        ▼            ▼            ▼

     SKILLS      KNOWLEDGE       TOOLS

                     │

                     ▼

                AI GATEWAY

                     │

                     ▼

                   LLMs


        ─────────────────────────

        GOVERNANCE + OBSERVABILITY

        ─────────────────────────

Then map technologies onto those responsibilities.

FastAPI might expose the agent.

Typesense might provide retrieval.

LiteLLM might provide model routing.

Docker might package the services.

Kubernetes might run them.

OpenAI, Claude, Gemini, or Bedrock might provide inference.

Tomorrow some of those technologies may change.

The architectural responsibilities remain.


The Bigger Lesson

The enterprise AI platform isn’t really about giving developers access to more LLMs.

It’s about putting architecture between the enterprise and the models.

Without that architecture:

Developer → LLM

With it:

                    INTENT

                      │

                      ▼

                  ORCHESTRATOR

                      │

       ┌──────────────┼──────────────┐

       ▼              ▼              ▼

     SKILLS        KNOWLEDGE        TOOLS

                      │

                      ▼

                  AI GATEWAY

                      │

          ┌───────────┼───────────┐

          ▼           ▼           ▼

        Claude      OpenAI      Gemini

And surrounding everything:

GOVERNANCE

SECURITY

OBSERVABILITY

AUDIT

COST CONTROL

QUALITY

That’s the transition developers need to understand.

The LLM is becoming one component inside a larger software architecture.

The intelligence may come from the model.

But the enterprise value comes from everything we build around it.

 
 
 

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Post: Blog2_Post

Subscribe Form

Thanks for submitting!

©2020 by LearnTeachMaster DevOps. Proudly created with Wix.com

bottom of page