01 · Structured data
SQL execution
Use source metadata before generating a read query; execute against the configured database boundary and return rows plus query metadata.
- Inspect schema
- Choose joins + columns
- Generate query
- Execute + correct
Ask Titan routes business questions to governed capabilities for structured data, Power BI semantic models and enterprise documents. LangGraph coordinates the runtime; MCP provides a consistent capability boundary; application policy decides which tools reach the model.
The engineering problem
A simple user → LLM → database → answer flow is enough to explain a prototype. It is not enough to run against enterprise systems. The application also has to determine which capabilities a user may access, which source should answer the question, what metadata the model may rely on, how failed queries are handled, how conversation state is maintained and how an answer can be traced back to the execution that produced it.
Prototype view
This hides authorization, source selection, query execution, state management and observability behind a single connection.
Ask Titan architecture
Ask Titan keeps these responsibilities in the application. The LLM receives only the capabilities and context required for the current request.
Design constraints
We treated these as separate engineering problems rather than collapsing them into one agent prompt.
Different sources require different metadata and execution semantics.
A capability can exist without being eligible for the current user or runtime mode.
Source metadata should be discovered rather than invented by the model.
Autonomy is useful only when deterministic runtime bounds surround it.
Persisted conversation and active LLM context are different concerns.
For data questions, the final text is not enough operational evidence.
Reference architecture
Ask Titan is organized into five main layers: frontend, middleware, orchestration, MCP capabilities and enterprise data sources. Identity and capability policy determine what can be used for a request, while conversation state and execution observability are handled alongside the runtime.
One question end-to-end
The diagram below follows one request through Ask Titan. The example asks: “Which customers caused our margin decline last month?” Ask Titan resolves the user’s access, routes the question to the Power BI capability, runs the required DAX against the semantic model and returns the result while retaining the relevant execution metadata.
Principle 1 · orchestration vs execution
Orchestrator responsibility
Capability responsibility
graph = StateGraph(ConversationState)
graph.add_node("agent", agent_node)
graph.add_node("tools", tool_node)
graph.add_conditional_edges(
"agent",
route_next_step,
{"tools": "tools", "end": END},
)
graph.add_edge("tools", "agent")
graph = graph.compile(
checkpointer=conversation_memory,
)
Principle 2 · capabilities + authorization
MCP gives the orchestrator a consistent way to discover and invoke capabilities. It does not decide whether a capability is appropriate for this user. Ask Titan resolves that application policy before tools are bound to the orchestrator.
Available catalog
Sales SQL · Production SQL · Finance Power BI · documents …
Application policy
Identity, entitlements and runtime configuration determine the eligible subset.
Bound tool set
Unavailable capabilities are absent from the model's callable tool set.
available_tools = discover_capabilities()
policy = resolve_capability_policy(user)
permitted_tools = [
tool for tool in available_tools
if policy.allows(tool.name)
]
agent = build_orchestrator(
tools=permitted_tools,
state=conversation_state,
)Security boundary
Identity
Who is making the request?
Capability authorization
Which Ask Titan tools may be bound?
Tool/source scope
Which configured tables, models or collections may the tool use?
Datasource authorization
What does the underlying source actually permit?
Important: application-level tool authorization is not equivalent to row-level or column-level security in a connected source.
Principle 3 · source semantics
The architecture does not force every question through RAG. Structured databases, Power BI semantic models and enterprise documents are separate execution domains because they carry different metadata, business semantics and failure modes.
01 · Structured data
Use source metadata before generating a read query; execute against the configured database boundary and return rows plus query metadata.
02 · Semantic data
When measures, relationships and business definitions live in a semantic model, inspect that model and generate DAX rather than bypassing it with raw SQL.
03 · Unstructured data
Rewrite the question for retrieval, fetch relevant document chunks from the configured collection and ground the answer in those sources.
Runtime discipline
A durable conversation can be much larger than the context a model should receive on the next turn. Configuration also belongs outside the active agent loop, while execution evidence must survive the final response.
Context engineering
Thread checkpoints preserve conversation state. Older finished turns can collapse to user + final answer while the active tool interaction stays intact. Oversized tool payloads do not have to be replayed into the model.
Control plane
Data sources, tool definitions, model/provider settings, prompts, semantic metadata, vector collections and user entitlements are durable configuration and not ad-hoc prompt content.
Execution observability
Retain tool calls and source telemetry around the answer. For database-backed capabilities that can include query IDs, SQL/DAX, duration, processed data and cost where available.
Observability is not chain-of-thought. The useful audit and debugging surface is the software execution path: tool calls, queries, timings and results. Private model reasoning is not part of that surface.
Failure handling and system boundaries
Ask Titan has to handle more than successful tool calls. A capability can be selected incorrectly, a generated query can fail, a result can be too large for the active context and an agent loop can run longer than intended. These cases are handled in the application layer, while access to the underlying systems remains enforced by those systems themselves.
| Failure mode | Architectural response |
|---|---|
| Wrong capability selected | Limit the available tools to the capabilities permitted for the current request. |
| Invalid schema assumption or query | Read source metadata and return execution errors to the specialist capability for a bounded retry. |
| Agent loop does not finish | Count tool-planning iterations and stop execution when the configured limit is reached. |
| Tool result exceeds the active context | Store the complete result outside the model context and pass only a bounded representation back to the model. |
| Answer cannot be traced to execution | Link the answer to tool events and source-query metadata such as query ID, duration and result details. |
Controlling which capability is exposed to the model does not replace permissions in the warehouse or semantic model.
Read-only access must be enforced through source credentials, roles, grants and platform controls.
MCP defines the tool interface. Authorization, input validation, network controls and source permissions are implemented separately.
Retrieval provides source context. The quality of the answer still depends on the documents retrieved and how well they match the question.
Engineering takeaway
Ask Titan becomes easier to reason about when probabilistic model decisions sit inside deterministic software boundaries. The application owns capability exposure, graph control, durable state and execution evidence. Specialist capabilities own source semantics.
Seven principles we keep
Next in the series
Next we go inside the orchestration layer: how Ask Titan resolves permitted tools, runs the LangGraph agent-tool loop, invokes specialist agents through MCP, persists conversation state and shapes the context sent to the model.
Read Part 2FAQ
Practical answers about LangGraph, MCP, capability authorization, SQL, Power BI, RAG, conversation state and observability.
An enterprise AI assistant architecture surrounds the language model with explicit application controls for identity, capability access, orchestration, state, source-specific execution and observability. The model can decide which permitted capability to use, but it is not the security boundary or the control plane.
[object Object]
The Model Context Protocol (MCP) is the standardized capability boundary between the top-level orchestrator and specialist execution tools. It lets the orchestrator discover and invoke capabilities through a consistent interface while source-specific implementation details remain behind each tool.
No. Ask Titan resolves application-level capability access before tools are bound to the LangGraph orchestrator. MCP exposes capabilities through a standard interface; authorization policy and datasource permissions remain separate controls.
The top-level orchestrator chooses among the permitted specialist capabilities based on the user question and tool descriptions. Structured databases use a SQL path, Power BI semantic models use a DAX-oriented path, and enterprise documents use retrieval and source grounding.
No. Retrieval-augmented generation is one capability in Ask Titan, not the overall architecture. Questions can also be answered through governed structured-data tools or Power BI semantic models when those sources carry the relevant business facts and definitions.
Conversation state is persisted with thread-scoped checkpoints. When building the next model context, older completed turns can be collapsed to the user question and final answer while the active turn keeps the full tool interaction required for correct tool-call execution.
Ask Titan stores execution metadata around answers, including intermediate tool calls and answer duration. Database-backed tools can additionally capture query identifiers, query text, duration, processed data and cost or consumption metrics where the underlying source exposes them.
No. The top-level orchestrator calls a specialist capability. The structured-data capability owns schema inspection, query generation, database execution and source-specific telemetry instead of embedding database connector logic directly in the orchestrator.
No. Tool authorization controls which Ask Titan capabilities are exposed to the agent. Row-level, column-level and other datasource permissions are separate enforcement layers that must be implemented in the connected database, warehouse or semantic model.
From AI demo to governed runtime
Ask Titan is built for business questions that need controlled access to company data, semantic models and documents. The same architecture principles can also inform custom Data & AI platforms where explainability, permissions and source semantics matter.
A governed enterprise AI boundary
Technical references
The Ask Titan repository is private. These public references document the open technologies and protocol concepts discussed in this article.