Skip to main content Switch to mobile version locus-sdk 6.8.3 Oracle Generative AI Multi-Agent Reasoning Orchestrator SDK: the agent framework where the model never holds the trigger — every consequential action clears your policy first, waits for a human when it matters, and lands on a record you can verify. Build on it, or put it around the agent you already have.
pip install locus-sdk==6.8.3 Copy PIP instructions
Oracle Generative AI Multi-Agent Reasoning Orchestrator SDK · the locus-sdk package Oracle Generative AI – Multi-Agent Locus SDK · Multi-agent workflows built for production · Built inside Oracle · Open source (UPL-1.0)
One Agent class, eight ways to combine agents, Oracle Cloud underneath. Around the model, the agentic harness; around the code an agent writes, an OCI GenAI Sandbox in your tenancy. Tools, memory, RAG, observability, guardrails, admit() in front of every consequential action. Pipelines, fan-out, orchestrator, swarm, handoff, graphs, debate, A2A. OCI Generative AI on day 0, Dedicated AI Clusters, Oracle Database 26ai.
Documentation · Quickstart · Multi-agent shapes · OCI GenAI models · The admission gate · Notebooks
pip install "locus-sdk[oci,oracledb]" export OCI_PROFILE=DEFAULT # a profile in ~/.oci/config with Generative AI access 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 The SDK runs on Python 3.11 to 3.14. Swap oci:openai.gpt-5.5 for openai:gpt-5.5, anthropic:claude-sonnet-5-5 or openrouter:x-ai/grok-4.7, each reading its key from the environment; the call stays the same. With an OCI profile in ~/.oci/config, the notebooks in examples/ run against OCI Generative AI with no further setup.
→ Quickstart · Notebook 02 — Basic agent · Notebook 03 — Agent with tools
One Agent, every shape
Every shape runs the same Agent, emits the same events, and checkpoints to the same backends. Pick the shape; the agents do not change.
import asyncio from locus.agent import Agent from locus.agent.composition import SequentialPipeline model = "oci:openai.gpt-5.5" diagnose = Agent(model=model, tools=[query_metrics, search_logs], system_prompt="Find what changed.") mitigate = Agent(model=model, tools=[scale_up, rollback], system_prompt="Fix it, smallest step.") brief = Agent(model=model, system_prompt="Write the status update.") war_room = SequentialPipeline(agents=[diagnose, mitigate, brief]) result = asyncio.run(war_room.run("checkout p99 hit 4.2s: fix and brief")) print(result.final_output) The cognitive router picks the shape from the task: a Router extracts a typed GoalFrame, selects one of the eight registered protocols and compiles it onto real agents (Notebook 29 builds one):
result = await router.dispatch("Diagnose the checkout API slowdown.") print(result.protocol_id) # "specialist_fanout" → Multi-agent overview · Notebook 19 — Composition · Notebook 22 — Orchestrator · Notebook 29 — Cognitive router
Oracle Cloud, native
OCI Generative AI and Oracle Database are built into the runtime: same Agent, same events, same admission gate.
from locus.agent import Agent from locus.rag import OCIEmbeddings, OracleVectorStore, RAGRetriever Agent(model="oci:openai.gpt-5.5") # V1 transport Agent(model="oci:cohere.command-a-03-2025") # SDK transport, auto-routed Agent(model="oci:ocid1.generativeaiendpoint.oc1...") # your Dedicated AI Cluster retriever = RAGRetriever( # Oracle Database 26ai embedder=OCIEmbeddings(model_id="cohere.embed-v4.0"), store=OracleVectorStore(dsn="mydb_low", user="locus_app", password="…", wallet_location="~/.oci/wallets/mydb", dimension=1536), ) agent = Agent(model="oci:openai.gpt-5.5", tools=[retriever.as_tool()]) → OCI GenAI models · Dedicated AI Clusters · Oracle Database 26ai · OCI GenAI Sandboxes · Notebook 01 — OCI transports · Notebook 38 — Oracle 26ai RAG · Notebook 42 — Oracle 26ai checkpointer · Notebook 44 — Oracle agent memory
Every backend is an optional extra — install only what you use: pip install "locus-sdk[oci,oracledb]" for the Oracle stack, [oci-sandbox] for OCI GenAI Sandboxes, [openshell] for NVIDIA OpenShell, [server] for AgentServer, [mcp] for MCP, [qdrant,s3,rerank-local] and the other extras in pyproject.toml as needed. A coding agent in an OCI GenAI Sandbox is one backend away from the same harness that runs on your laptop:
A prompt rule is advisory; admit() is structural: the gate wraps the tool, so the side-effecting call runs only after it clears a ControlPolicy you wrote, whatever the model asks for.
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 pip install locus-sdk && python -m locus.rogue # an interactive challenge: talk the agent into wipe_database and watch the gate hold # 🛡️ wipe_database → deny: labels ['irreversible'] are denied by policy; … # FINAL SCORE · dangerous attempts: 1 · 💥 BREACHES: 0 · audit chain intact: ✓ Put the same gate around an agent loop you already have, whatever it is built on, or build on the full runtime.
→ How the admission gate works · First controlled action · Notebook 71 — Payment refund gate
Notebooks and deploy
The notebooks are numbered in reading order: start here (01–11), multi-agent shapes (12–32), Oracle Cloud and Database 26ai (33–45), the harness (46–59), observability, streaming and serving (60–67), control layer and security (68–76) and real-world workflows (77–80), all in examples/. They run against OCI Generative AI with an OCI profile, or the bundled mock model without one.
git clone https://github.com/oracle/locus.git cd locus && pip install -e ".[oci,oracledb]" python examples/notebook_01_oci_transports.py # the three OCI GenAI transports python examples/notebook_02_basic_agent.py # your first agent python examples/notebook_19_composition.py # pipelines python examples/notebook_29_cognitive_router.py # the cognitive router python examples/notebook_38_oracle_26ai_rag.py # RAG on Oracle Database 26ai To serve an agent, AgentServer wraps it as a FastAPI app (pip install "locus-sdk[server]") and the repo ships a multi-stage Dockerfile:
import os from locus.server import AgentServer AgentServer(agent=my_agent, api_key=os.environ["API_KEY"]).run(host="0.0.0.0", port=8080) → Notebooks · Deploy
OpenAI Codex builds on the SDK. The repository ships a Codex skill, .agents/skills/locus/, that teaches it the SDK: Agent and @tool, the admission gate, the multi-agent shapes, memory and RAG, the coding harness, the providers, and how to test an agent offline. locus codex puts the skill where Codex looks and starts Codex with the sandbox settings it needs:
pip install "locus-sdk[oci]" locus codex run "Build a support agent with an order lookup and a gated refund tool, with tests" In a clone, codex/PROMPT.md drives Codex through a first agent with a typed tool, an admission gate allowing, holding and denying, and the rogue-agent challenge, on OCI Generative AI, OpenAI, Anthropic or offline; codex/SPEC.md is written for a person to follow by hand as well:
codex/scenarios/ is a series of twelve tasks Codex builds from the skill alone, each with an automatic check, and the runner that executes them: the proof that the skill produces correct applications, and the way a change to the SDK or to the skill is tried before a release.
→ Build it with Codex
src/locus/ ├── agent/ Agent runtime, config, Sequential / Parallel / Loop pipelines ├── multiagent/ Orchestrator, Swarm, Handoff, StateGraph, Functional ├── router/ Cognitive router — GoalFrame, ProtocolRegistry, PolicyGate, CognitiveCompiler ├── a2a/ Cross-process Agent-to-Agent protocol ├── deepagent/ create_deepagent + create_research_workflow + node primitives ├── core/ AgentState, Message, events, termination algebra, Send ├── models/ Provider registry + OCI GenAI (V1 / SDK / Responses), OpenAI, Anthropic ├── memory/ BaseCheckpointer + backends (Oracle 26ai, OCI Object Storage, …), stores, memory managers ├── rag/ Embeddings + 12 vector stores (Oracle 26ai, …) + rerankers + loaders + chunkers ├── tools/ @tool decorator, registry, builtins, executors, OCI tools ├── harness/ Coding harness: workspace tools over LocalBackend, OCISandboxBackend, OpenShellBackend; build_harness(wrap=…) ├── reasoning/ Reflexion, Grounding, Causal, GSAR ├── control/ Admission gate, policy, audit trail, grounded findings, verification ├── decision/ Typed decisions (choice, yes/no, score) with probabilities ├── hooks/ Logging, telemetry, retry, guardrails, steering ├── observability/ EventBus, run_context, agent yield bridge, EV_* constants ├── skills/ AgentSkills.io filesystem-first capability disclosure ├── playbooks/ Declarative step plans + PlaybookEnforcer ├── providers/ Multi-modal: web search, web fetch, image, speech ├── server/ FastAPI AgentServer with thread persistence ├── evaluation/ EvalCase + EvalRunner + EvalReport ├── integrations/ MCP (client + server) ├── durable/ Durable execution for agent runs (Temporal, DBOS) ├── streaming/ Stream handlers: console, SSE, structured ├── voice/ Realtime speech-to-speech sessions; tool calls go through the gate ├── runner/ Box runner (`python -m locus.runner`): one agent's loop in an NVIDIA OpenShell sandbox ├── cli.py The `locus` command line: run, resume, approvals, audit verify, serve ├── testing.py Model doubles (ScriptedModel, FunctionModel) and AgentTestClient └── rogue/ The rogue-agent challenge (`python -m locus.rogue`) The docs site lives in docs/ (mkdocs.yml, theme in overrides/, build hooks in hooks/) and publishes to locusagents.ai.
The SDK's GSAR layer is based on the method described in F. A. Kamelhar, GSAR: Typed Grounding for Hallucination Detection and Recovery in Multi-Agent LLMs (PDF), arXiv:2604.23366, 2026. The paper is separate from this project; if you use the method, cite it directly:
@article{kamelhar2026gsar, author = {Kamelhar, Federico A.}, title = {GSAR: Typed Grounding for Hallucination Detection and Recovery in Multi-Agent LLMs}, journal = {arXiv preprint arXiv:2604.23366}, year = {2026}, url = {https://arxiv.org/abs/2604.23366}, } License
Released under the Universal Permissive License v1.0 — see LICENSE and THIRD_PARTY_LICENSES.txt. Releases 1.0.0 – 2.28.0 were published as tulip-agents under the Apache License 2.0 while the project was developed outside Oracle; that distribution is retired. See PROVENANCE.md.
Released: Nov 30, 2026
Author: Oracle and/or its affiliates
Both files in this release have provenance metadata.
View provenance details
UPL-1.0 View SPDX License List
a2a-grpc agentmemory anthropic audit browser checkpoints chroma cohere daytona dbos deploy dev docs e2b elasticsearch encryption functions gemini heatwave llm mcp mem0 milvus mongodb mysql oci oci-container oci-sandbox openai opensearch openshell oracledb pgvector pinecone postgresql qdrant rag redis redis-vector rerank rerank-local s3 sdk server ssh telemetry temporal weaviate
agent-approvals agent-framework agent-harness agent-security agentic agentic-harness agents ai ai-safety audit-trail cognitive-router grounding gsar guardrails hitl human-in-the-loop llm multi-agent oci-generative-ai oracle-database oracle-generative-ai orchestration policy-engine pydantic rag react reflexion safety tool-approval tool-authorization
Development Status 5 - Production/Stable
Intended Audience Developers
License OSI Approved :: Universal Permissive License (UPL)
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Application Frameworks
Release files for locus-sdk 6.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 5.3 MB
Release files / locus_sdk-6.8.3.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Release files / locus_sdk-6.8.3-py3-none-any.whl
Security for locus-sdk 6.8.3
Both files in this release have been uploaded with provenance metadata.
With provenance locus_sdk-6.8.3.tar.gz Nov 30, 2026
With provenance locus_sdk-6.8.3-py3-none-any.whl Nov 30, 2026
Attestation for locus_sdk-6.8.3.tar.gz
Attestation for locus_sdk-6.8.3-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
Nov 24, 2026 2 release files Full provenance
Nov 23, 2026 2 release files Full provenance
Nov 20, 2026 2 release files Full provenance
Nov 19, 2026 2 release files Full provenance
Nov 17, 2026 2 release files Full provenance
Nov 16, 2026 2 release files Full provenance
Nov 10, 2026 2 release files Full provenance
Nov 2, 2026 2 release files Full provenance
Oct 30, 2026 2 release files Full provenance
Oct 29, 2026 2 release files Full provenance
Oct 28, 2026 2 release files Full provenance
Oct 23, 2026 2 release files Full provenance
Oct 22, 2026 2 release files Full provenance
Jun 16, 2026 2 release files Full provenance
Jun 10, 2026 2 release files No provenance
May 30, 2026 2 release files No provenance
May 29, 2026 2 release files No provenance
May 28, 2026 2 release files No provenance
May 23, 2026 2 release files No provenance
May 20, 2026 2 release files No provenance
May 19, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 17, 2026 2 release files No provenance
May 16, 2026 2 release files No provenance
May 15, 2026 2 release files No provenance
May 14, 2026 2 release files No provenance
May 13, 2026 2 release files No provenance
May 11, 2026 2 release files No provenance
May 10, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from a8e35ed











