Back
Products

Why AI Agents Need Real-Time Analytics and Hybrid Search: The Data Infra for Production Agents

2026/6/24
Matt Yi
Matt Yi
Apache Doris PMC Member and Tech VP @ VeloDB

A revenue alert fires at 2 a.m. The on-call ops agent picks it up and receives a direct question from the engineer they report to: “Find incidents from the past two weeks related to GPU failures that caused over $1M in revenue loss, and include similar historical cases.”

Before the agent can reason about a fix, it has to answer that. Answering it is mostly an analytics job. The agent filters incidents to the last two weeks, matches fault-log text for GPU failures, aggregates revenue impact above $1M, and then ranks past incidents by semantic similarity. Four of those five steps are filtering, time-windowing, and aggregation. One is vector retrieval.

Most teams build the data layer for agents in the reverse order of how agents use it. They start with semantic retrieval: vector databases, RAG frameworks, workflow orchestration. That work is real, and production agents do need it. The layer that gets under-built is the one the agent hits first: real-time analytics over concrete business facts.

Those facts are specific and operational: orders, user records, transactions, inventory levels, alerts. A customer service agent needs the current order status, shipping updates, and refund eligibility. A business analytics agent needs live revenue, conversion rates, and anomaly signals. An ops agent needs to know which alerts are firing and what they affect. Each task is a more automated version of real-time analytics that a human operator already runs.

Agents also push harder on that layer than people do. They fire many queries per task, expect fresh data, and run in parallel across thousands of sessions. Real-time ingestion, low latency, high concurrency, and unified querying become baseline requirements. Those are the defining capabilities of real-time analytics systems like Apache Doris.

The shift to agentic workloads changes what the data layer has to deliver. Here is the comparison at the workload level:

DimensionTraditional Real-Time AnalyticsAgentic Analytics
Primary ConsumersAnalysts, operations, business teamsAgents, AI applications, automated workflows
Core RequirementSurface business factsContinuously retrieve facts and context throughout the reasoning chain
Dominant Query TypesSQL, aggregation, filtering, drill-downSQL + Vector + Full-text + Graph + Stream
Latency RequirementsMinutes to secondsSeconds to sub-second
System RoleAnalytics and decision supportFact entry point for understanding, reasoning, memory, and action

Agent queries are analytics queries first

At the query level, the pattern is clearer. Take the incident question from the top:

Find incidents from the past two weeks related to GPU failures that caused over $1M in revenue loss, and include similar historical cases.

Break it down by the capability each fragment needs:

Query fragmentUnderlying capability required
GPU failure relatedFull-text search, keyword matching
Past two weeksTime filtering, window constraint
Revenue loss over $1MAggregation, metric filtering
IncidentsStructured data access
Similar historical casesVector retrieval, semantic similarity search

In practice, the query the agent generates against the data layer looks like this:

SELECT *
FROM incidents
WHERE l2_distance(description_embedding, query_embedding) < 0.1
  AND MATCH(log_text, 'GPU overheating')
  AND severity >= 4
  AND revenue_impact > 1000000
ORDER BY timestamp DESC
LIMIT 10; 

The structured filters and the aggregation run first. Vector similarity is one of several predicates. Result quality depends on complex filtering and aggregation at high concurrency over fresh data, with semantic search built into the same engine.

Standalone vector retrieval covers part of this and leaves the rest to other systems:

Agent key requirementWhere standalone vector retrieval falls shortWhere a real-time analytics engine fits better
Complex filtering and aggregationRelies on external analytics systems to fill the gapCore capability of an analytics engine
Real-time business factsLonger sync path, harder to guarantee freshnessNatively close to real-time data consumption
High-concurrency short queriesBetter suited for retrieval, not optimized for complex analytics loadsBetter suited to handle large volumes of analytics-style tool calls
Result interpretabilityOften requires stitching in structured evidence separatelyReturns verifiable business facts directly

How Apache Doris bridges traditional and agentic analytics

We started building Apache Doris a decade ago as a real-time search and analytics database, built for high-concurrency, low-latency analytics at scale. We were not building for AI agents back then, but the same architectural choices we made for real-time analytics now match what agent workloads demand.

To serve agent workloads directly, Doris added hybrid search to its real-time analytics engine, combining native vector search and full-text search in a single system. Agents get the real-time performance Doris is known for, plus the hybrid search their queries require from a single engine.

The same core capabilities carry from analytics to agents:

Apache Doris core capabilityValue in traditional analyticsExtended value in agent workloads
Real-time ingestion and updatesMakes the latest orders, transactions, and metrics immediately availableKeeps agents reasoning on the most current business facts
Low-latency OLAPPowers reports, dashboards, and ad-hoc queriesSupports frequent tool calls throughout the agent reasoning chain
High-concurrency queriesServes large numbers of analysts and business applicationsServes hundreds or thousands of agents and automated workflows
Semi-structured processingHandles JSON, Variant, and other flexible data formatsIngests tool outputs, event payloads, and AI-generated structures
Lakehouse and multi-source unified accessConsolidates data from different sourcesMakes cold knowledge and hot data easier to consume together
Ongoing fusion of full-text and vector capabilitiesExpands the analytics boundaryBrings hybrid search closer to a single unified entry point

Multimodal context: building a unified context layer

Zoom out from the single query, and we see a second need. Teams often file multimodal data under a separate category from analytics, as if vectors and knowledge graphs belong in a different tier from OLAP. The value of multimodal data becomes apparent when it is used alongside structured data, as this combination brings analytics closer to live business operations.

pic1.png

Structured data provides agents with a factual foundation, while semi-structured data modality provides models with information to understand, explain, and act, which is also known as context. An ops agent needs to know whether revenue loss crossed a threshold, which is the fact, and it needs the related fault logs, similar past incidents, and runbooks, which are the context. Both the fact and context are needed to construct a coherent and accurate output or action.

Multimodal context is about more than supporting more data types. It is a unified context layer that agents can reliably consume, holding facts, explanations, behaviors, memory, and semantics within a single system. That role pushes a real-time analytics engine like Doris to grow from a search-and-analytics system into a context system.

Here is how the context layers break down:

Data layerTypical contentsRole for the agentWhy combine with analytics
Fact layerOrders, transactions, metrics, inventory, incidentsAnswers “what happened”Requires filtering, aggregation, joins, and real-time queries
Explanation layerDocuments, tickets, emails, comments, knowledge basesAnswers “why it happened”Needs to be returned alongside fact results
Behavior layerLogs, event streams, tool call tracesAnswers “how the sequence unfolded”Requires time-based and entity-based joins
Memory layerUser profiles, conversation history, task stateAnswers “what happened before and what comes next”Requires continuous updates integrated with current queries
Semantic layerEmbeddings, entity relationships, knowledge graphsAnswers “what’s related”Needs to work alongside structured filtering and analytics

pic2.png

Why fragmented multi-database systems break down for agent workloads

Most enterprise stacks assemble that context from separate systems: a vector store for embeddings, a search engine for full-text, an OLAP system for aggregations, and a separate store for semi-structured data. A human operator bridges the gaps between them by hand. An agent has no such bridge.

Agents need the shortest data path possible. When one task hops across multiple backends, three problems compound:

  • Context fragmentation: the data exists, but the agent sees pieces instead of the whole picture.

  • Consistency drift: each system runs its own sync cadence, index refresh, and permission model, and every gap degrades the reasoning.

  • Latency and cost: one logical query fans out into multiple network calls and result-merging rounds, which slows or breaks the chain.

pic3.png

That is why we added native full-text search and vector search to Doris, giving it one engine for full-text search, vector search, and semi-structured data. The result is a shorter, more stable data path for agents.

Inside that unified engine, Doris takes on context retrieval, hybrid query planning, and agent memory alongside its analytics work. Expanding outward from a mature real-time analytics engine is more practical than stitching specialist systems together from the outside.

Here is what one unified engine replaces:

Capability modulePreviously provided byUnified real-time engine
OLAPData Warehouse / Analytical DBReal-time fact retrieval and aggregation analytics
Full-text SearchSearch EngineKeyword recall and evidence retrieval
Vector SearchVector DBSemantic similarity and relevance retrieval
StreamingKafka / Apache FlinkReal-time events and incremental updates
Semi-structured ProcessingJSON / Variant EngineFlexible inputs and tool data
Memory StoreSession / Agent StoreLong-term memory and task state
Semantic LayerMetadata / Governance SystemMaking data stably interpretable by machines

Summary

Production AI agents are analytics consumers first. The queries they generate span structured data, full-text search, and vector retrieval in a single step, and they need answers in real time, not from batch sync.

Apache Doris combines real-time analytics with native hybrid search in one engine, giving production agents a unified data path across structured, semi-structured, and vector data.

Explore Apache Doris or join the community on Slack to learn more.

Try VeloDB Cloud for Free

SaaS warehouse free trial 14 days,
BYOC warehouse free computing service fee 90 days.

Subscribe to Our Newsletter

Stay ahead on Apache Doris releases, product roadmap, and best practices for real-time analytics and AI-ready data infra.

Need help? Contact us!