By Federico Kamelhar, Distinguished Engineer, Agentic AI, Oracle

Why this matters
AI agents have crossed the line from answering to acting: they open tickets, change records, move money and change infrastructure, in loops that run for minutes across many model calls. Many agent frameworks give a developer the loop and leave the rest, durable state, retrieval, guardrails, a way to stop a consequential action before it runs, and a record afterwards, to be built in-house. Teams on Oracle also want all of that where their models and data already are.
Oracle has released the Oracle Generative AI Multi-Agent Reasoning Orchestrator SDK as open source. In the rest of this post it goes by its short name, the Oracle Generative AI – Multi-Agent Locus SDK. It is the runtime around the model: one Agent class, eight ways to combine agents, tools, memory, retrieval and observability, and an admission gate in front of consequential actions, built first-class for OCI Generative AI and Oracle AI Database 26ai and open to any other provider that speaks the OpenAI API. It installs from PyPI as locus-sdk, the code is at github.com/oracle/locus, and the documentation is at locusagents.ai.
What an agentic harness is. The model is the smallest part of an agent in production. Around it sits everything that turns a model call into a dependable worker: the loop that plans and calls tools, the tools themselves, memory of past conversations, retrieval over the company’s documents, guardrails on what goes in and out, observability of every step, a way to serve it, and the control that decides whether an action may run at all. That runtime is the harness. Many teams assemble it from a dozen libraries and their own glue; the Oracle Generative AI – Multi-Agent Locus SDK ships it as one piece, with Oracle Cloud as its native home, and the rest of this post walks through it: what a team gets, how one agent grows into a team, the models and the database it runs on, the control layer, and one complete example.
Try it in a minute. One install, one class, one call:
pip install “locus-sdk[oci,oracledb]”
from locus.agent import Agent
agent = Agent(model=”oci:openai.gpt-5.5″)
print(agent.run_sync(“What is the capital of France?”).text)
# → Paris
Swap oci:openai.gpt-5.5 for openai:gpt-4o, openrouter:x-ai/grok-4.7 or an OpenAI-compatible endpoint of your own behind vllm: or ollama:, and the call does not change. With an OCI profile configured, the examples in the repository run against OCI Generative AI with no further setup.

Figure 1. One Agent, eight shapes, Oracle Cloud underneath. The harness is the runtime around the model; the admission gate sits between the agent and the consequential actions routed through it.
Underneath the harness, four Oracle services each do one job. OCI Generative AI runs the models, the catalogue as OCI lists it and your own models on Dedicated AI Clusters. Oracle AI Database 26ai holds what the agent looks up, where each conversation is, and what it has learned, next to the business tables it acts on. Sandboxes in OCI Generative AI give an agent that writes and runs code a managed, temporary Linux workspace in your tenancy, with its own files, processes and network, created on demand and ending when its lifetime expires, so its shell commands and file edits run in the sandbox rather than on the host. OKE runs the agent as a service and OCI Object Storage keeps checkpoints and exported audit records. Any other model provider sits behind a prefix on the same Agent.
What the harness gives a team
One Agent, so one thing to learn. A bounded reasoning loop with tools, typed output, termination rules and one stream of events, the same whatever model, provider or shape it runs in. Code written for one agent carries over to a team of them.
A control layer, so an agent can be allowed to act under your policy. A consequential call routed through the gate runs only after a policy the team wrote allows it; it can be held for a person or denied; each gate decision lands on a hash-chained audit trail. That is the difference between an agent that advises and one that is allowed to refund, deploy or delete.
Your data and models where they already are. OCI Generative AI first, including your own models on a Dedicated AI Cluster; Oracle AI Database 26ai for what the agent looks up, where each conversation is, and what it has learned, under the access controls, auditing and backup the team already runs on that database; one authentication surface, OCI’s own, with no per-provider API keys to manage.
The harness around the model, built once for every agent. Tools with one decorator and MCP in both directions; memory with ten checkpoint backends; retrieval over six vector stores with embeddings and rerankers; guardrails on input, output and tool calls; grounding that checks answers against evidence; forty or more typed events for observability and streaming; a FastAPI server and a container image for OKE; skills, playbooks and an evaluation runner.
Eight ways to combine agents, so the shape fits the work. Start with one agent. When the work needs more, combine agents in the shape the work already has: a pipeline when steps follow each other or can run at once, an orchestrator when one coordinator should delegate to specialists, a swarm when peers should pick up work from a shared board, a handoff when a case escalates from tier to tier, a graph when the flow has branches and a point where a person decides, a debate when two views and a judge beat one answer, agents across processes when another team’s agent lives elsewhere, and a DeepAgent for long research. The agents never change, only the shape does, and a cognitive router can pick the shape from the task.
Built for builders. Dozens of runnable notebooks, a skill so OpenAI Codex can build on the SDK, locus-sdk on PyPI for Python 3.11 to 3.14, open source.
From one agent to a team
Most real work is not one question but a process with several roles, and a single agent runs out of room: it loses the thread, fills its context with tool output, or needs a second opinion. The usual fix is a team of agents, and the usual cost is that many frameworks make you rebuild the agents for each way of arranging them. In the Oracle Generative AI – Multi-Agent Locus SDK the arrangement is separate from the agents. Every shape below runs the same Agent, with the same tools, the same events, the same saved state and the same gate in front of consequential actions. You pick the shape; the agents do not change.

Figure 2. Eight shapes, one Agent. Each shape matches a way work is already organised; the agents inside are the same whichever one you pick.
ShapeWhat it doesReach for it whenPipelinesChain agents in sequence, fan the same task out to several at once, or loop one until a reviewer clears itSteps follow each other, or can run at the same timeOrchestrator and specialistsOne coordinator reads the task, delegates to typed specialists with their own tools, and merges what comes backOne accountable place should decide who does whatSwarmPeers claim tasks from a shared queue by capability and leave findings on a shared board; nobody is in chargeOpen-ended work for several specialists with no single bossHandoffA case passes from one tier to the next with its context intactSupport or operations escalation, L1 to L2 to L3StateGraphAn explicit graph of nodes and edges with checkpointed state, cycles, and interrupts that wait for a personThe flow has branches, loops, or a point where a human decidesDebate and critic loopsTwo agents argue and a judge decides, or a skeptical reviewer rejects claims the evidence does not supportOne answer is not trustworthy enough on its ownAgent-to-agent (A2A)Agents in other processes or runtimes call each other over HTTP as spec-compliant peersAnother team’s agent runs somewhere elseDeepAgentPlans, explores, validates and reports, with its findings grounded against evidenceLong research tasks
The support-team example at the end of this post is a pipeline: two specialists in parallel, then one agent that acts. The same three agents could be an orchestrator’s specialists or a swarm’s peers tomorrow, without a line of them changing.
A cognitive router can pick the shape for you. You describe the task in plain language. A model reads it and fills in a short, fixed form, the goal frame: what kind of task this is (answer a question, make a plan, diagnose a fault, fix something, write code), how risky it is, how complex, and which tools it needs. From that point no model is involved. Rules match the form to one of eight ready-made team shapes and build the agents to run it: a single agent for a plain answer, a plan-execute-check pipeline, a fan-out of specialists for a diagnosis, a loop for code that must pass its tests. A policy check sits in between, so a task the form marks as high risk can be held for a person or refused before any agent is built. In a live run on OCI Generative AI, “diagnose the spike in errors” became a specialist fan-out and ran; “drain a production node and restart the payments deployment” was held.

Figure 3. The cognitive router. A model fills in the goal frame and never picks the team shape; rules do, a policy check holds risky requests first, and the compiler builds the agents that run it.
Models: OCI Generative AI first, any provider after
The harness is model-agnostic by design, and OCI Generative AI is its first-class provider. The oci: model string reaches the models as OCI Generative AI lists them in your region, from OpenAI, Google, Meta, xAI, Mistral and Cohere among others, with one authentication surface: an OCI profile on a laptop, instance or resource principals on OCI Compute and OKE, and no per-provider API keys. A model newly listed on OCI Generative AI is, in most cases, a new model string rather than an SDK update.
Three transports, one prefix. A transport is the path a request takes to the service. OCI Generative AI serves models over three of them: its OpenAI-compatible chat API, which carries most of the catalogue in OpenAI’s exact wire format, so anything written for the OpenAI API points at OCI by changing a base URL; the OpenAI-compatible Responses API, for models that need it and for tenancies that want server-side conversation state; and the native OCI Python SDK, which Cohere models and Dedicated AI Clusters use. The SDK speaks all three, and the prefix picks the right one from the model id, so a developer never has to know which transport a model needs.

Figure 4. One prefix, three transports. The OpenAI-compatible API is the default path; Cohere and Dedicated AI Clusters go through the native SDK; the Responses API is there when you ask for it.
Your own models, on a Dedicated AI Cluster. OCI Generative AI serves models two ways. On demand, you share the service’s capacity and pay per token, which is what oci:openai.gpt-5.5 does. On a Dedicated AI Cluster, the capacity is yours: compute dedicated to your models and not shared with other tenancies, hosting a pretrained base model, a model you fine-tuned, or a model you imported. In the SDK a cluster is the same Agent with the cluster endpoint’s OCID as the model string; the prefix routes it to the native SDK with your compartment, and streaming and token accounting work as they do on demand. The SDK’s documentation records a run against an open-weight model on a Dedicated AI Cluster, with one practical note for such models: some return tool calls as text inside the message rather than as structured calls, and the fix is a deployment setting that makes the model emit them in the OpenAI format, which the harness then handles like any other call.
Other providers. Everything else that speaks the OpenAI API plugs in behind its own prefix: openai: natively, then gemini:, openrouter:, together:, groq:, ollama: for a local model, vllm: for a server of your own, and a generic openai-compatible: with a base URL. The Agent, the tools, the gate and the event stream are the same whatever the prefix; only the model string changes, and failover chains can mix providers.
agent = Agent(model=”oci:openai.gpt-5.5″) # OCI, OpenAI-compatible API
agent = Agent(model=”oci:cohere.command-a-03-2025″) # OCI, native SDK, routed by id
agent = Agent(model=”oci:ocid1.generativeaiendpoint.oc1…”) # your Dedicated AI Cluster
agent = Agent(model=”openrouter:x-ai/grok-4.7″) # another provider, same call
agent = Agent(model=”vllm:meta-llama/Llama-3.3-70B-Instruct”) # your own server
Your data stays in Oracle AI Database 26ai
An agent in production has three kinds of state, and each needs a durable home. Knowledge is what it looks up: policies, runbooks, product documents, stored as vectors, numeric fingerprints of text that let a database find the passages closest in meaning to a question. Threads are its conversations: every step of a run saved as a checkpoint, so a run that pauses for a person, or a process that restarts, picks up exactly where it stopped. Memory is what it has learned across conversations: a customer’s preference, a standing instruction from a manager. The Oracle Generative AI – Multi-Agent Locus SDK keeps all three in Oracle AI Database 26ai, in the same database as the business tables the agent acts on, under the access controls, auditing and backup the team already runs on that database. One Agent reaches them through three arguments, and where the text should stay in the database, chunking and embedding can run inside it.

Figure 5. One database, three jobs. Vectors, threads and memory are classes on the Oracle driver; the agent reaches them through tools, checkpointer= and memory_manager=.
from locus.agent import Agent
from locus.memory import LLMMemoryManager
from locus.memory.backends import oracle_checkpointer
from locus.memory.store_backends import OracleStore
agent = Agent(
model=”oci:openai.gpt-5.5″,
checkpointer=oracle_checkpointer(**DB, table_name=”support_threads”), # each thread
memory_manager=LLMMemoryManager(store=OracleStore(**DB)), # what it learned
)
agent.run_sync(“I’m the support lead. Standing instruction: always quote credits in EUR, ”
“never in USD.”, thread_id=”lead-setup”)
agent.run_sync(“Which currency do we quote credits in?”, thread_id=”ticket-9001″) # EUR
Knowledge is not memory: what the agent should look up, policies and runbooks, belongs in retrieval; what it should carry forward, preferences and standing instructions, belongs in memory. Both live in the one database, and in a run against Oracle AI Database 26ai an agent told on one thread to quote credits in euros did so on the next.
Control: the model never holds the trigger
A support agent reads a ticket and decides the customer is owed a $120 credit. It cannot credit anything itself; it asks, with a tool call to apply_credit(account, 120). Tool calls that only read are harmless. The ones that change something, a credit, a refund, a deployment, a deletion, are where trust is decided, and the whole question comes down to what happens between the model asking and the function running.
Many frameworks answer with instructions in the prompt: “never credit more than $50 without approval”. That is advice to the model. The model can misread it, be talked out of it by text in a ticket, or simply be wrong about the amount, and nothing in the system notices until the money has moved. The SDK answers differently: it puts a gate between the agent and each consequential function routed through it, in code that the model triggers but does not control.
How the gate works. When the model asks for a gated tool, three things happen before anything runs.
The call is described. The gate turns the request into an Action, a plain record of what is being proposed: the action, apply_credit; the asset it touches, account 4821; the environment, live; what it costs, $120; and labels you attach, such as reversible or irreversible. The policy reasons about this record, not about the model’s intentions.
Your policy decides. A ControlPolicy is a few lines of Python written by your team, not by the model: hold anything over $50 for a person, hold anything labelled irreversible, deny anything labelled prohibited, never act in production without a verified finding. It is reviewed like any other code.
One of three things follows. Allow: the function runs. Hold: the function does not run; the request is parked in an approval store, the agent’s run pauses, and a person decides. When they approve, the call is weighed against the policy again before it runs, so an approval cannot override a deny, and the approval is spent as the call runs, so a retry or a restart does not perform it a second time. Deny: the function does not run and the model receives a refusal it can read and act on.
Each of these gate decisions, including the holds and the denials, is appended to an AuditTrail. The trail is hash-chained: each record carries a fingerprint of the one before it, so a record removed or edited after the fact breaks the chain and verify() reports it. Think of it as a tamper-evident seal on the agent’s history: an auditor who holds the latest fingerprint, kept outside the system, can check that nothing before it has changed, and the trail can also be signed with a key the auditor trusts.

Figure 6. Allow, hold, or deny. The agent asks, the gate describes the request as an Action, the policy you wrote decides before anything runs, and each decision lands on a hash-chained audit trail.
In the $120 example, the policy says credits over $50 need a person. The call is held, nothing moves, the support lead approves from their own console, the credit is performed, and the trail shows the hold, the request for approval, the lead’s decision with their name, and the performed call. Had the model been talked into a $12,000 credit, the same gate would have held that too.
The quickest way to put this around an agent is one function:
from locus.control import governed_agent
agent = governed_agent(model=”oci:openai.gpt-5.5″, tools=[…])
print(agent.run_sync(“Refund order 8812 if the return was received.”).text)
assert agent.audit_trail.verify() # the chain is intact
governed_agent builds an agent with the gate, guardrails and audit trail already in place; gate_tool() does the same for a single tool you already have, with your own policy. Two honest limits, stated in the documentation and worth repeating: the gate protects only the calls routed through it, so every function that changes something must be wrapped, and the policy is only as good as the labels on the Action, so classifying actions is a design task, not an afterthought.
The same idea applies to what an agent says, not only what it does. Grounding checks each claim in an answer against the evidence that produced it, the tool results and documents the agent actually saw, and for high-stakes work a stricter mode rewrites or replans a conclusion the evidence does not support rather than letting it ship.
Example: a support team on Oracle Cloud
One team, shown as it might be deployed, with the Oracle pieces in place. Two specialists gather the facts in parallel: one retrieves the policy from the support handbook stored in Oracle AI Database 26ai, one looks the order up. Their findings feed the billing agent, the only one that moves money. Its credit tool is behind the gate: a credit up to $50 runs on its own, a larger one is held until a support lead decides, and the billing agent’s thread is checkpointed in the same database so the run resumes after the decision. Chat and embedding models are OCI Generative AI.
import asyncio
import os
from locus.agent import Agent
from locus.agent.composition import ParallelPipeline
from locus.control import Action, AuditTrail, ControlPolicy, FileApprovals, gate_tool
from locus.core.events import InterruptEvent
from locus.memory.backends import oracle_checkpointer
from locus.rag import OCIEmbeddings, OracleVectorStore, RAGRetriever
from locus.tools import tool
import billing # your billing system’s client
DB = dict(dsn=os.environ[“ORACLE_DSN”], user=”locus_app”,
password=os.environ[“ORACLE_PASSWORD”], wallet_location=os.environ[“ORACLE_WALLET”])
MODEL = “oci:openai.gpt-5.5″
# Knowledge: the handbook, embedded on OCI Generative AI, in a VECTOR column in Oracle AI
# Database 26ai.
handbook = RAGRetriever(
embedder=OCIEmbeddings(model_id=”cohere.embed-v4.0”,
compartment_id=os.environ[“OCI_COMPARTMENT”],
profile_name=os.environ.get(“OCI_PROFILE”, “DEFAULT”)),
store=OracleVectorStore(**DB, dimension=1536),
)
@tool
async def lookup_order(order_id: str) -> dict:
“””Return an order’s status, amount and return state.”””
return await billing.order(order_id)
@tool
async def apply_credit(account: str, usd: float) -> str:
“””Credit a customer account.”””
return await billing.credit(account, usd)
# The gate: over $50 is held for a person; the hold survives a restart in the approval store.
policy = ControlPolicy(require_human_over_usd=50, require_verification_score=0,
version=”support-v3″)
trail = AuditTrail()
approvals = FileApprovals(“approvals.json”)
credit = gate_tool(
apply_credit, policy=policy, trail=trail, approval=approvals, on_refusal=”interrupt”,
action=lambda name, a: Action(name, a[“account”], environment=”live”,
kind=”account_credit”, cost_usd=a[“usd”]))
# The team: two specialists in parallel, then the one agent that moves money.
facts = ParallelPipeline(agents=[
Agent(model=MODEL, tools=[handbook.as_tool(“search_handbook”)],
system_prompt=”Quote the handbook policy that applies to the ticket. Name it.”),
Agent(model=MODEL, tools=[lookup_order],
system_prompt=”Report the order facts exactly as returned.”),
])
billing_agent = Agent(
model=MODEL, tools=[credit], checkpointer=oracle_checkpointer(**DB),
system_prompt=”You apply account credits. Credit exactly what the policy and the order ”
“facts justify, then report in one sentence.”)
async def main() -> None:
ticket = “SUP-7782: order ORD-7842 arrived broken; the customer asks for a $120 credit.”
gathered = await facts.run(ticket) # both specialists at once
approval_id = None
prompt = f”{ticket}\n\nFacts gathered:\n{gathered.final_output}”
async for event in billing_agent.run(prompt, thread_id=”SUP-7782″):
if isinstance(event, InterruptEvent):
approval_id = event.metadata[“approval_id”] # over $50: held, the thread is parked
# Later, from the support lead’s console, in this process or another one:
approvals.decide(approval_id, “approved”, by=”lead@example.com”)
async for event in billing_agent.resume(“approved”, thread_id=”SUP-7782″,
perform_dangling=True):
pass # weighed again, then performed
assert trail.verify()
asyncio.run(main())

Figure 7. The support team. Two specialists in parallel, one agent that moves money, one gate, and every durable part on Oracle Cloud.
What a run did. This team ran against OCI Generative AI with GPT-5.5, with a stub billing client and handbook in place of the real ones. The model’s tool calls and wording are its own:
specialist 1: Applicable handbook policy: Policy 4.2: “An order that arrived damaged and
whose return has been received is credited in full to the customer’s account”
specialist 2: Order facts for ORD-7842: account acct:4821, status delivered,
amount_usd 120.0, return received
held for a support lead: appr-c3ba9a742d3aef7f-1 | cost $120.00 exceeds the limit $50.00
ledger after the hold: []
ledger after approval: [(‘acct:4821’, 120)]
billing agent: Credited $120.00 to acct:4821 for ORD-7842 under Policy 4.2.
trail: action-admission require_human
trail: approval-requested appr-c3ba9a742d3aef7f-1
trail: action-admission require_human
trail: approval-decision approved
trail: action-admission require_human approved_by=lead@example.com
chain valid: True
Four things to notice:
The handbook stays on Oracle services. In this configuration the text is embedded by OCI Generative AI and the vectors live in a native VECTOR column in the database that holds the orders; with in-database embedding, even that step can run inside the database.
Facts and action are separate agents. The specialists only read. The one agent with a consequential tool receives their findings as text, so the blast radius of a confused model is one gated call.
A hold outlives the process. The pending approval is in the approval store and the billing thread is checkpointed in Oracle AI Database 26ai, so the lead can decide tomorrow, from another process; the credit is then weighed against the policy again before it is performed, and the approval is spent as it runs.
The trail holds the whole sequence: the hold, the approval request, the lead’s decision and the performed call with the approver’s name, hash-chained so a later edit is detectable.
The same team ran against an Oracle AI Database 26ai instance with the real vector table, checkpoints and memory store, with the same outcome.
What customers can build
Support and operations agents that act within policy. Credits, refunds, account changes and infrastructure fixes where the small cases run on their own, the large ones wait for a person, and each gate decision is on a trail an auditor can verify.
Agents over enterprise data without a second data platform. Retrieval, conversation state and long-term memory in the Oracle AI Database that already holds the records, under the access controls, auditing and backup already in place on that database.
Agent teams that grow with the work. Start with one agent, move to a pipeline, an orchestrator or a swarm without rewriting the agents, or let the router pick the shape per request.
A control layer around agents you already have. admit() and governed_agent wrap an existing agent loop or tool, whatever it is built on, so teams can add the gate and the trail before they adopt the rest.
Build with Codex
OpenAI Codex can build on the Oracle Generative AI – Multi-Agent Locus SDK. The repository ships a skill that teaches Codex the SDK, from the Agent and its tools to the admission gate, the shapes and the database classes, and locus codex run places the skill where Codex looks and starts it with the sandbox settings it needs. A loopback gateway in the repository signs Codex’s own model calls with your OCI profile, so Codex itself runs on OCI Generative AI and needs no account outside Oracle Cloud. Twelve scenarios in the repository, each with an automatic check, prove that the skill produces correct applications. See the Codex guide.
pip install “locus-sdk[oci]”
locus codex run “Build a support agent with an order lookup and a gated refund tool, with tests”
Conclusion
An agent is a model plus a harness, and the harness is where production lives: the tools, the memory, the retrieval, the guardrails, the observability, and the gate that decides whether an action may run. The Oracle Generative AI – Multi-Agent Locus SDK ships that harness as one open-source piece, with OCI Generative AI and Oracle AI Database 26ai built in and any OpenAI-compatible provider a prefix away. One Agent class scales from a single assistant to a team, the shape can be picked per request, and the control layer lets the same agent read today and, under a policy your team wrote, act tomorrow, with a record of each gate decision in between.
Next steps
Install: pip install “locus-sdk[oci,oracledb]” and the quickstart. With an OCI profile, the examples run on OCI Generative AI; without one, a bundled mock model runs them offline.
Run the examples: the repository ships dozens of runnable notebooks, from a first agent through the eight shapes, Oracle AI Database 26ai, the harness and the control layer; each is a page on the documentation site. Start with OCI transports, the cognitive router, Oracle 26ai RAG and the payment refund gate.
Deploy: locus serve or AgentServer, a FastAPI app with bearer auth, a multi-stage Dockerfile and the ghcr.io/oracle/locus-runner image for OKE, in the deployment guide.
Read more: multi-agent shapes, the admission gate, Oracle AI Database 26ai, OCI Generative AI models, Dedicated AI Clusters, and the guarantees and boundaries.
Contribute: CONTRIBUTING.md. Contributions need the Oracle Contributor Agreement.
Check model ids, regions and availability in your tenancy before you run the examples. Live model output varies from run to run.
Federico Kamelhar is a Distinguished Engineer for Agentic AI at Oracle, building production agent systems on Oracle Cloud Infrastructure, and the maintainer of the Oracle Generative AI – Multi-Agent Locus SDK. Federico contributed the OCI Generative AI support in LiteLLM and in NVIDIA OpenShell.