Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-omnicoreagent.omnirexfloralabs.com/llms.txt

Use this file to discover all available pages before exploring further.

OmniCoreAgent Light

Open Python Agent Harness For Production AI Applications

OmniCoreAgent is the harness around the model: the loop, tools, memory, context control, workspace files, MCP tools, subagents, background tasks, and REST/SSE serving boundary that make an agent usable beyond a demo. Start small with one agent and one model. Add tools, memory, workspace files, background tasks, telemetry, and OmniServe only when the application needs them.
pip install omnicoreagent
export LLM_API_KEY=your_api_key_here

Run The Quickstart

Install OmniCoreAgent, create your first agent, add one tool, and learn the next paths.

Use Docs With AI Tools

Use Ask AI, Markdown export, llms.txt, hosted docs MCP, Cursor, VS Code, ChatGPT, Claude, and Perplexity.
Add only the production extras you need later:
pip install "omnicoreagent[redis]"
pip install "omnicoreagent[serve]"
pip install "omnicoreagent[all]"

Choose Your Path

Build Your First Agent

One model, one agent, one task.

Add Python Tools

Register application-owned functions with ToolRegistry.

Connect MCP Tools

Load tools from external MCP servers.

Keep Session Memory

Store conversation history in memory, Redis, MongoDB, or SQL.

Use Workspace Files

Give agents a file surface for notes, artifacts, and offloads.

Serve An Agent API

Run the same agent behind REST and SSE endpoints.

Run Background Work

Schedule durable agent work with run history, retries, and workspace output.

Build A Real Application

Start from production-shaped examples.

Why It Exists

OmniCoreAgent is built around real agent runtime problems:

Parallel tool batches

The runtime supports independent tool calls in one batch, executes them concurrently, and returns one structured observation.

Structured observations

Tool results are parsed, formatted, guardrail-checked, and offloaded when they cross the configured threshold before the model sees them.

Signature loop detection

The harness detects repeated tool signatures and repeated tool interaction patterns beyond max-step exhaustion.

Workspace-backed context

Agents, subagents, tool offloads, notes, scratchpads, and artifacts share one local, S3, or R2-backed workspace.

Automatic context control

When enabled, the runtime checks context before each model call and acts before the configured budget is exceeded.

Start Building

Quick Start

Build your first OmniCoreAgent and run a task.

Agent Harness

Understand what OmniCoreAgent adds around the model.

Installation

Install the core package or the extras your agent uses.

Local Tools

Register application-owned Python functions as tools.

MCP Tools

Connect external MCP servers over stdio, SSE, or Streamable HTTP.

Configuration

Environment variables, memory, workspace, task stores, telemetry, and OmniServe settings.

OmniServe

Production REST/SSE serving, auth, rate limits, events, and background APIs.

See It In Action

import asyncio
from omnicoreagent import OmniCoreAgent, ToolRegistry

tools = ToolRegistry()

@tools.register_tool("search_web")
def search_web(query: str) -> dict:
    """Search the web for information."""
    return {"results": [f"Result for: {query}"]}

@tools.register_tool("fetch_document")
def fetch_document(path: str) -> dict:
    """Fetch a domain document from an application-owned source."""
    return {"path": path, "content": f"Contents of {path}"}

async def main():
    agent = OmniCoreAgent(
        name="research_agent",
        system_instruction=(
            "Use tools in parallel when the calls are independent."
        ),
        model_config={"provider": "openai", "model": "gpt-4o"},
        local_tools=tools,
        agent_config={
            "context_management": {"enabled": True},
            "tool_offload": {"enabled": True},
        },
    )

    result = await agent.run(
        "Search for current agent papers and read notes.md. Do both at once "
        "if neither depends on the other."
    )
    print(result["response"])
    await agent.cleanup()

asyncio.run(main())

Core Documentation

OmniCoreAgent

The main agent harness API and runtime capabilities.

Agent Harness

The implementation-backed map of the runtime pieces around the model.

Architecture

How the loop, tools, observations, memory, workspace, and serving layers fit.

Memory

Session history across in-memory, Redis, MongoDB, and SQL database storage.

Context Engineering

Context strategies plus tool-output offloading for long-running tasks.

Workspace Files

Local, S3, or R2 files for notes, scratchpads, artifacts, and offloads.

Subagents

Dynamic focused workers that write outputs back into the workspace.

Guardrails

Prompt-injection screening inside the observation pipeline.

Events

Runtime events for runs, tool calls, and streaming integrations.

OmniServe

Run an OmniCoreAgent behind REST and SSE endpoints.