Wednesday, February 4, 2026

Migrate Your Current Brokers to Couchbase AI Companies


A typical AI agent utility in 2025 often includes:

  • A cloud-hosted LLM
  • A vector database for retrieval
  • A separate operational database
  • Immediate administration and gear administration instruments
  • Observability and tracing frameworks
  • Guardrails

Every software solves an issue. Collectively, nonetheless, they’ll probably create architectural sprawl with unpredictable latency, rising operational prices, and governance blind spots. In consequence, plenty of AI brokers by no means transfer past demos or inner prototypes as a result of the complexity escalates too quick.

This put up walks by way of how we migrated an current AI agent utility to Couchbase AI Companies and the Agent Catalog, transferring to a single production-ready AI platform. 

The Core Downside: Fragmentation Kills Manufacturing AI

It’s essential to grasp why agentic methods wrestle in manufacturing. Most AI brokers at this time are constructed from too many loosely coupled components: prompts reside in a single system, vectors in one other, conversations are logged inconsistently, instruments are invoked with out clear traceability making agent conduct tough to debug. On the similar time, sending enterprise information to third-party LLM endpoints introduces compliance and safety dangers. Lastly, governance is often handled as an afterthought; many frameworks emphasize what an agent can do, however fail to clarify why it decided, which immediate or software influenced it, or whether or not that call ought to have been allowed in any respect. That is an unacceptable hole for actual enterprise workflows.

What Are Couchbase AI Companies?

Constructing AI purposes usually includes juggling a number of providers: a vector database for reminiscence, an inference supplier for LLMs (like OpenAI or Anthropic), and separate infrastructure for embedding fashions.

Couchbase AI Companies streamlines this by offering a unified platform the place your operational information, vector search, and AI fashions reside collectively. It affords:

  • LLM inference and embeddings API: Entry well-liked LLMs (like Llama 3) and embedding fashions instantly inside Couchbase Capella, with no exterior API keys, no further infrastructure, and no information egress. Your utility information stays inside Capella. Queries, vectors, and mannequin inference all occur the place the info lives. This permits safe, low-latency AI experiences whereas assembly privateness and compliance necessities. The important thing worth: information and AI collectively, with delicate data saved inside your system.
  • Unified platform: Preserve your database, vectorization, search, and mannequin in a central location.
  • Built-in Vector Search: Carry out semantic search instantly in your JSON information with millisecond latency.

Why Is This Wanted?

As we transfer from easy chatbots to agentic workflows the place AI fashions autonomously use instruments latency and setup complexity grow to be main bottlenecks. Couchbase AI Companies takes a platform-first method. By co-locating your information and AI providers, it reduces operational overhead and latency. As well as, instruments just like the Agent Catalog assist handle lots of of agent prompts and instruments, whereas offering built-in logging and telemetry for brokers. 

At this level, the query shifts from why a platform-first method issues to the way it works in observe.

So let’s discover how one can migrate an current agentic utility, and enhance its efficiency, governance, and reliability alongside the best way.

What the Present App Appears to be like Like

The present utility is an HR Sourcing Agent designed to automate the preliminary screening of candidates. The principle job of the agent utility is to ingest uncooked resume information (PDFs), perceive the content material of the resumes utilizing an LLM, and construction the unstructured information right into a queryable format enriched with semantic embeddings in Couchbase. It permits HR professionals to add a brand new job description and get outcomes for the best-suited candidates utilizing Couchbase vector search. 

In its present state, the HR Sourcing App is a Python-based microservice that wraps an LLM with the Google ADK. It manually wires collectively mannequin definitions, agent prompts, and execution pipelines. Whereas purposeful, the structure requires the developer to handle session state in reminiscence, deal with retry logic, clear uncooked mannequin outputs, and preserve the mixing between the LLM and the database manually. Additionally, there isn’t any built-in telemetry for our agent. 

​​The app manually instantiates a mannequin supplier. On this particular case, it connects to a hosted open supply mannequin (Qwen 2.5-72B by way of Nebius) utilizing the LiteLLM wrapper. The app has to manually spin up a runtime atmosphere for the agent. It initializes an InMemorySessionService to trace the state of the dialog (even when short-lived) and a Runner to execute the consumer’s enter (the resume textual content) in opposition to the agent pipeline.

Migrating the Agent Software to Couchbase AI Companies

Now let’s dive into the best way to migrate the core logic of our agent to make use of Couchbase AI Companies and the Agent Catalog. 

The brand new agent makes use of a LangChain ReAct agent to course of job descriptions, it performs clever candidate matching utilizing vector search and supplies ranked candidate suggestions with explanations. 

Conditions

Earlier than we start, guarantee you will have:

Set up Dependencies

We’ll begin by putting in the required packages. This consists of the agentc CLI for the catalog and the LangChain integration packages.

Centralized Mannequin Service (Couchbase AI Mannequin Companies Integration)

Within the unique adk_resume_agent.py, we needed to manually instantiate LiteLLM, handle particular supplier API keys (Nebius, OpenAI, and so on.), and deal with the connection logic inside our utility code. We are going to migrate the code to make use of Couchbase. 

Couchbase AI Companies supplies OpenAI-compatible endpoints which are utilized by the brokers. For the LLM and embeddings, we use the LangChain OpenAI package deal, which integrates instantly with the LangChain Couchbase connector.

Allow AI Companies

  1. Navigate to Capella’s AI Companies part on the UI.
  2. Deploy the Embeddings and LLM fashions.
    • It is advisable to launch an embedding and an LLM for this demo in the identical area because the Capella cluster the place the info shall be saved.
    • Deploy an LLM that has software calling capabilities comparable to mistralai/mistral-7b-instruct-v0.3. For embeddings, you may select a mannequin just like the nvidia/llama-3.2-nv-embedqa-1b-v2.
  3. Be aware the endpoint URL and generate API keys.

For extra particulars on launching AI fashions, you may test the official documentation.

Implementing the Code Logic for LLM and Embedding Fashions

We have to configure the endpoints for Capella Mannequin Companies. Capella Mannequin Companies are appropriate with the OpenAI API format, so we are able to use the usual langchain-openai library by pointing it to our Capella endpoint. We initialize the embedding mannequin with OpenAIEmbeddings and the LLM with ChatOpenAI, however level it to Capella.

 

As a substitute of hardcoding mannequin suppliers, the agent now connects to a unified Capella endpoint, which acts as an API gateway for each the LLM and the embedding mannequin. 

Decoupling Prompts and Instruments With Agent Catalog

The Agent Catalog is a strong software for managing the lifecycle of your agent’s capabilities. As a substitute of hardcoding prompts and gear definitions in your Python information, you handle them as versioned property. You possibly can centralize and reuse your instruments throughout your growth groups. You may as well study and monitor agent responses with the Agent Tracer. These options present visibility, management, and traceability for agent growth and deployment. Your groups can construct brokers with confidence, realizing they are often audited and managed successfully.  

With out the power to back-trace agent conduct, it turns into not possible to automate the continued belief, validation, and corroboration of the autonomous selections made by brokers. Within the Agent Catalog, that is carried out by evaluating each the agentic code and its dialog transcript with its LLM to evaluate the appropriateness of its pending choice or MCP software lookup.  

So let’s incorporate Agent Catalog within the venture. 

Including the Vector Search Device 

We are going to begin by including our software definition for the Agent Catalog. On this case now we have the vector search software. 

So as to add a brand new Python perform as a software on your agent, you should use the Agent Catalog command-line software’s add command:

agentc add 

In case you have an current Python software that you just wish to add to the Agent Catalog, add agentc to your imports and the @agentc.catalog.software decorator to your software definition. In our instance, we outline a Python perform for performing vector search as our software. 

Including the Prompts 

Within the unique structure, the agent’s directions have been buried contained in the Python code as giant string variables, making them tough to model or replace and not using a full deployment. With the Agent Catalog, we now outline our “HR Recruiter” persona as a standalone, managed asset utilizing prompts. Utilizing a structured YAML definition (record_kind: immediate), we create the hr_recruiter_assistant. This definition doesn’t simply maintain the textual content; it encapsulates all the conduct of the agent, strictly defining the ReAct sample (Thought → Motion → Commentary) that guides the LLM to make use of the vector search software successfully.

Index and Publishing the Native Information

We use agentc to index our native information and publish them to Couchbase. This shops the metadata within the database, making it searchable and discoverable by the agent at runtime.

In our code, we initialize the Catalog and use catalog.discover() to retrieve verified prompts and instruments. We now not hardcode prompts; as an alternative, we fetch them.

Standardized Reasoning Engine (LangChain Integration)

The earlier app used a customized SequentialAgent pipeline. Whereas versatile, it meant we needed to preserve our personal execution loops, error dealing with, and retry logic for the agent’s reasoning steps.

By leveraging the Agent Catalog’s compatibility with LangChain, we switched to a normal ReAct (Cause + Act) agent structure. We merely feed the instruments and prompts fetched from the catalog instantly into create_react_agent.

What’s the profit? We get industry-standard reasoning loops Thought -> Motion -> Commentary out of the field. The agent can now autonomously determine to seek for “React Builders,” analyze the outcomes, after which carry out a second seek for “Frontend Engineers” if the primary yields few outcomes. one thing the linear ADK pipeline struggled with.

Constructed-in Observability (Agent Tracing)

Within the earlier agent utility, observability was restricted to print() statements. There was no technique to “replay” an agent’s session to grasp why it rejected a particular candidate.

Agent Catalog supplies tracing. It permits customers to make use of SQL++ with traces, leverage the efficiency of Couchbase, and get perception into particulars of prompts and instruments in the identical platform.

We will add Transactional Observability utilizing catalog.Span(). We wrap the execution logic in a context supervisor that logs each thought, motion, and consequence again to Couchbase. We will now view a full “hint” of the recruitment session within the Capella UI, displaying precisely how the LLM processed a candidate’s resume. 

Conclusion

AI brokers fail in manufacturing not as a result of LLMs lack functionality, however as a result of agentic methods can grow to be too advanced. By adopting a platform-first method with Couchbase AI Companies and the Agent Catalog, we reworked a posh agent right into a ruled, scalable agentic system. 

In case you’re constructing AI brokers at this time, the true query isn’t which LLM to make use of it’s the way you’ll run brokers safely, observably, and at scale. Couchbase AI Companies are constructed for precisely that.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles