Home  /  Journal  /  AI on OCI  /  OCI Generative AI Agents
AI on OCI

OCI Generative AI Agents: Architecture and Setup

A chat model answers from its training data. An agent answers from yours, holds a conversation across turns, and shows its sources. The OCI Generative AI Agents service packages that pattern, retrieval, session memory, grounding, and citations, as a managed service, so the team ships an internal assistant without building a retrieval pipeline first. This article walks the architecture, the setup, and the line where the managed service stops and custom engineering begins.

Published Jun 7, 2026 · By Fredrik Filipsson · 10 min read · Independent OCI advisory
White humanoid robot head viewed in profile against a dark background

The distance between "we have a language model" and "employees can ask questions about our documents and trust the answers" is wider than most pilots assume. It contains a document pipeline, a vector store, a retrieval strategy, session handling, source citation, and a security review. The OCI Generative AI Agents service exists to collapse most of that distance: it is a managed retrieval augmented agent platform that connects hosted models from the OCI Generative AI service to your own data and exposes the result as an endpoint your applications can call.

This article is part of our complete guide to AI on OCI. Here we focus on what the agents service actually is, how its pieces fit, and how to stand one up properly.

The architecture in five objects

The service resolves into five resources, and understanding them is most of understanding the platform.

Knowledge base

The knowledge base is the retrieval target: an indexed representation of your content that the agent searches at question time. The service can manage the index for you from raw files, or attach to an index you already operate, including OCI Search with OpenSearch and vector tables in Oracle Database. The managed path is the fastest start; the bring your own index path is how the agent joins an existing data architecture, such as the in database vector layer described in Oracle 23ai Vector Search.

Data source

A data source feeds the knowledge base, most commonly a bucket of documents in Object Storage. Ingestion jobs parse, chunk, and embed the content into the index, and run again when documents change. The operational discipline that matters here is refresh: a knowledge base that quietly drifts behind its source documents produces answers that are confidently out of date, which is worse than no answer.

Agent

The agent is the reasoning configuration: which model to use, the instructions that shape its behavior, and which knowledge bases it may consult. The instructions are not decoration. A tightly scoped agent told what it covers, what it must not answer, and how to respond when retrieval comes back empty behaves measurably better than a general assistant pointed at the same index.

Agent endpoint

The endpoint is the callable surface, the thing applications integrate with. Endpoint settings control session behavior, content moderation, and tracing, and the endpoint is the natural seam for identity: the application authenticates the user, then calls the endpoint with OCI credentials under normal IAM policy.

Session

Sessions give the agent memory across turns, so a follow up question like "and how does that apply to contractors" lands in context. Session state is bounded and configurable, and deciding what the agent should remember, and for how long, is a privacy decision as much as a UX one.

Grounding and citations: the point of the whole exercise

The agents service answers from retrieved content and returns citations pointing at the source passages. That single behavior is what separates an enterprise assistant from a liability. Citations make answers auditable, they give users a path to the authoritative document, and they expose retrieval failures immediately, because an answer with weak sources looks weak. Treat citation coverage as a service level: measure the share of answers that carry usable citations, and investigate when it drops.

An assistant that cannot show its sources is asking the enterprise to take a language model's word for it. Citations are not a feature, they are the product.

Build your own agent or use the service

The alternative to the managed service is assembling the same pattern yourself: vector store, ingestion pipeline, orchestration code, session store, and an application layer, the full shape of which is laid out in our reference RAG architecture on OCI. The honest comparison looks like this.

DimensionManaged agents serviceCustom built RAG stack
Time to first answerDays, console driven setupWeeks to months of engineering
Retrieval controlService defaults, limited tuningFull control of chunking, ranking, reranking
Model choiceCatalogue models in the serviceAny model you can host or call
Sessions and citationsBuilt inYou build and maintain them
Operations burdenOracle runs the platformYour team runs every component
Best fitInternal knowledge assistants, standard corporaProduct features, exotic retrieval, hard latency targets

The pattern we recommend to most clients is sequential rather than either or: prove the use case on the managed service, measure where its defaults fall short on your corpus, and only then decide whether those gaps justify a custom build. Many never do.

Setting one up properly

  1. Curate the corpus before the console. Remove obsolete documents, resolve contradictory versions, and name an owner. The agent will faithfully retrieve whatever you feed it, including the wrong answer from 2021.
  2. Create the knowledge base and data source. Start with the managed index over an Object Storage bucket unless you already run a vector layer worth attaching to.
  3. Run ingestion and inspect the result. Spot check parsed chunks for mangled tables and broken structure. Parsing quality silently caps answer quality.
  4. Write the agent instructions as policy. Scope, tone, refusal behavior, and what to do when retrieval is empty. Review the instructions like a published document, because functionally they are one.
  5. Create the endpoint with moderation and tracing on. Tracing gives you the retrieval evidence behind each answer, which is the debugging surface for everything that follows.
  6. Evaluate against a golden set. Fifty real questions with known correct sources, scored for answer accuracy and citation quality, before any user sees the endpoint.
  7. Wire identity and audit. IAM policies on the endpoint, application level user context, and logging into your observability stack.
  8. Schedule refresh and re evaluation. Ingestion on a cadence matched to document churn, and the golden set rerun after every model or corpus change.

Beyond retrieval: tools and actions

Retrieval answers questions; tools take actions. The agents platform extends past document grounding into function calling, where the agent can invoke operations you define, look up an order, open a ticket, query a live system, and weave the results into its answer. This is where an assistant starts becoming a workflow, and it is also where the risk profile changes character. A retrieval only agent can at worst say something wrong; an agent with tools can do something wrong. The design disciplines that keep this safe are old ones wearing new clothes: tools should be narrow, idempotent where possible, and scoped to the requesting user's actual permissions, and any action with consequences, payments, deletions, communications to customers, belongs behind explicit human confirmation rather than agent discretion. Start with read only tools, log every invocation with its arguments, and expand the action surface only as the audit trail earns trust. The teams that get this right treat the tool list like an API surface published to a slightly overconfident new hire, because functionally that is what it is.

Operating the agent in production

An agent that launches well and is never looked at again degrades on three independent clocks. The corpus clock: documents change, and the ingestion cadence either keeps up or the agent becomes a confident historian. The model clock: the underlying catalogue evolves, and each model change shifts tone, accuracy, and failure modes enough to warrant a golden set rerun before it reaches users. And the usage clock: the questions people actually ask drift away from the questions the pilot anticipated, which is why the single most valuable operational artifact is the log of unanswered and poorly cited questions, reviewed monthly, feeding both corpus curation and instruction tuning. Treat the agent like a product with a release process, evaluation before promotion, staged rollout, and a rollback path, rather than a configuration that was finished once. Estates we run under Managed Monthly retainers get this loop as routine: ingestion health, citation coverage, token consumption, and golden set scores on one dashboard, reviewed with the corpus owner on a fixed cadence.

Security posture

The agent inherits the OCI control plane: knowledge bases, data sources, and endpoints are compartment scoped resources under IAM policy, traffic stays within the tenancy's network model, and your content is not used to train shared models. The residual risks are architectural rather than platform level. The corpus is the blast radius: an agent grounded on a bucket that contains documents some users should not see will surface them, because retrieval does not re check document level entitlements by default. Either curate corpora to a single sensitivity level per agent, or enforce entitlement filtering in the application layer in front of the endpoint. Prompt injection through retrieved documents is the second standing risk, and moderation plus instruction discipline reduces it without eliminating it. Govern accordingly.

Cost behavior

Agent pricing follows the underlying generative service: token consumption for inference, plus the indexing and storage costs of the knowledge base. The cost surprises in practice come from chattiness, long sessions with large retrieved contexts inflate input tokens quickly, and from re ingestion of large corpora on aggressive schedules. Both are visible early if consumption is tagged and watched from the first week, the discipline we describe in controlling AI workload costs on OCI.

The independent view

Managed agent platforms are where enterprise generative AI is quietly consolidating, because they package the parts everyone rebuilds badly: retrieval, grounding, sessions, and citations. The OCI service is a strong implementation of the pattern with one decisive advantage for Oracle estates, proximity to the data and the IAM model that already governs it. The decisions that deserve outside scrutiny are corpus governance, the build versus consume line, and the evaluation harness, and they are exactly the work of our OCI implementation practice, delivered on a fixed Project fee with the option of a Managed Monthly retainer for the operation that follows.

Free white paper

Go deeper on this topic with The OCI Landing Zone and Architecture Guide, a reference architecture for security, networking, and governance on OCI. An independent analyst style report with comparison tables and recommendations, free with a work email. Prefer a monthly summary instead? The OCI Brief delivers one practical OCI briefing a month.

Part of a series
This guide is part of Data & AI on OCI — our complete pillar guide on the topic.

About the author

Fredrik Filipsson, Co-founder of OCI Specialists — 20 years of enterprise IT experience in Oracle Database, OCI cost optimization, licensing, and data platforms. Full profile · LinkedIn

Moving Oracle workloads to OCI, or already running on OCI and not sure the architecture or the spend is right? Most teams bring in a specialist before they commit to a region, a shape, or a Universal Credits number. OCISpecialists.com plans the landing zone, runs the migration, and manages the estate after go live, on a fixed project fee, a managed monthly retainer, or a cost optimization fee paid only on verified savings.