Skip to content
NEW BLOG

Using Surrealism to build your own extensions

Read blog

1/2

High-performance customer service AI powered by RAG logo

High-performance customer service AI powered by RAG

Industry:

Artificial intelligence

Outcome:

Low-latency, customer-controlled knowledge base powering voice AI RAG integration

PolyAI is a leader in real-time conversational AI, helping enterprises deliver natural, high-quality voice and chat experiences at scale. As more businesses adopt AI for customer service automation, they increasingly want to maintain control over their internal knowledge bases rather than migrate sensitive content into a vendor-specific ecosystem.

In response to these needs, PolyAI’s engineering team wanted to enable integration of Agent Studio - their platform for building autonomous AI agents - with their customer’s knowledge bases while maintaining real-time responsiveness. SurrealDB was selected due to its multi-model design, fast vector search, and ability to operate entirely within a customer-controlled environment. The result was a smooth, low-latency integration allowing customers to bring all their data types (document, relational, graph relationships) into one system.

A growing number of PolyAI customers were asking if they could use their own knowledge bases inside Agent Studio. This requirement arose from three underlying pressures. First, enterprises wanted to avoid vendor lock-in and retain the freedom to choose the technologies that best suited their needs. Second, many organisations needed full ownership over where their knowledge was stored and how it was queried, particularly when dealing with sensitive or regulated information. Third, any integration had to preserve the real-time performance that PolyAI’s conversational agents are known for.

Even a small increase in latency can interrupt the natural flow of a spoken dialogue. While users tolerate delays of up to one to one and a half seconds in a phone conversation, the perceived quality of the interaction depends heavily on keeping response times well below that threshold. PolyAI needed to show that an external knowledge base could power retrieval and reasoning without compromising this standard.

Using Agent Studio’s function-calling runtime, PolyAI connected SurrealDB as an external RAG provider. Whenever an agent received a question, Agent Studio would generate or retrieve the relevant embedding, call out to SurrealDB for vector similarity search, and use the returned context to craft an accurate response. SurrealDB acted as the authoritative knowledge source, providing fast and reliable access to enterprise-specific information.

The integration required no changes to the underlying architecture, no specialised plugin development, and no data migration. SurrealDB simply slotted into the pipeline. Because SurrealDB can run entirely within an organisation’s own infrastructure, customers retain full control over their data while still benefiting from PolyAI’s real-time AI capabilities.

What made this experiment most compelling was the performance. SurrealDB’s vector lookup introduced only about 30 milliseconds of latency. For comparison, PolyAI’s internal stack, handling both embedding generation and vector search, averages around 31 milliseconds. Despite performing different tasks, the measured latency of the external call was essentially equivalent, and far below the threshold that would be perceptible to a caller.

The integration demonstrated that enterprises can bring their own knowledge base to Agent Studio without introducing any noticeable delay in agent responses. Conversations remained smooth and natural, with SurrealDB functioning as efficiently as an internal search system.

Just as importantly, the integration preserved complete data ownership. All knowledge stayed in SurrealDB, under enterprise control, with no need to migrate it into PolyAI’s environment. The platform remained fully extensible, allowing organisations to use their existing infrastructure and adapt their retrieval logic over time.

The integration also highlights the flexibility of SurrealDB’s multi-model architecture. As PolyAI considers expanding support for new data modalities such as graphs, SurrealDB provides a natural foundation due to its unified approach to relational, document, graph, and vector data. Future enhancements can be built without redesigning the retrieval layer.

“The SurrealDB integration was seamless and delivered performance on par with our internal stack. It proves that enterprises can bring their own knowledge base without sacrificing speed, quality, or control.” - Colman Yau, Vice President of Engineering, PolyAI

This partnership between SurrealDB and PolyAI demonstrates what an open, flexible AI platform can achieve. It showed that Agent Studio is not confined to a fixed ecosystem, but is capable of integrating directly with whichever data systems an enterprise chooses.

SurrealDB’s performance made it clear that real-time conversational AI does not require customers to give up control in exchange for speed. With the right database architecture and a clean integration point, external knowledge bases can function as first-class participants in an AI workflow.

As conversational AI continues to evolve, this model - openness paired with high performance - will become increasingly important. Whether enterprises want to use documents, structured data, vectors, or full knowledge graphs, SurrealDB offers a foundation that is ready to support these capabilities.

For more information, see Bring your own knowledge base: Agent Studio meets SurrealDB.

Solutions

External RAG integration

Connected SurrealDB as an external RAG provider via Agent Studio's function-calling runtime for fast, accurate context retrieval.

Zero-migration architecture

No changes to the underlying architecture, no specialised plugin development, and no data migration required to integrate.

Customer-controlled infrastructure

SurrealDB runs entirely within an organisation's own infrastructure, giving customers full control over their data.

Multi-model vector search

Leveraged SurrealDB's vector similarity search to power real-time retrieval and reasoning for conversational AI agents.

Results

On-par latency

~30ms

SurrealDB's vector lookup introduced only ~30ms of latency, matching PolyAI's internal stack performance.

Full data ownership

100%

All knowledge stays in SurrealDB under enterprise control, with no need to migrate into PolyAI's environment.

Seamless integration

0 CHANGES

No architectural changes, plugin development, or data migration required to integrate with Agent Studio.

Future-proof foundation

MULTI-MODEL

Unified approach to relational, document, graph, and vector data supports future expansion without redesigning the retrieval layer.

Why SurrealDB?

SurrealDB empowers teams to break data silos and build fast, flexible applications that scale with ease. From graphs to documents to vectors, SurrealDB handles it all.