> ## 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

> Open Python agent harness and runtime for production AI agents

<img className="block dark:hidden" src="https://mintcdn.com/omnirexflora-labs-1d9a37d7/3hRLBnAaFOFn31rR/assets/IMG_5292.jpeg?fit=max&auto=format&n=3hRLBnAaFOFn31rR&q=85&s=446d4455395b1e6afc4301af7f34628b" alt="OmniCoreAgent Light" width="1458" height="1524" data-path="assets/IMG_5292.jpeg" />

<img className="hidden dark:block" src="https://mintcdn.com/omnirexflora-labs-1d9a37d7/3hRLBnAaFOFn31rR/assets/IMG_5292.jpeg?fit=max&auto=format&n=3hRLBnAaFOFn31rR&q=85&s=446d4455395b1e6afc4301af7f34628b" alt="OmniCoreAgent Dark" width="1458" height="1524" data-path="assets/IMG_5292.jpeg" />

## 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.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
pip install omnicoreagent
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export LLM_API_KEY=your_api_key_here
```

<CardGroup cols={2}>
  <Card title="Run The Quickstart" icon="bolt" href="/docs/getting-started/quickstart">
    Install OmniCoreAgent, create your first agent, add one tool, and learn the
    next paths.
  </Card>

  <Card title="Use Docs With AI Tools" icon="sparkles" href="/docs/getting-started/use-docs-with-ai-tools">
    Use Ask AI, Markdown export, `llms.txt`, hosted docs MCP, Cursor, VS Code,
    ChatGPT, Claude, and Perplexity.
  </Card>
</CardGroup>

Add only the production extras you need later:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
pip install "omnicoreagent[redis]"
pip install "omnicoreagent[serve]"
pip install "omnicoreagent[all]"
```

***

## Choose Your Path

<CardGroup cols={2}>
  <Card title="Build Your First Agent" icon="bolt" href="/docs/getting-started/quickstart">
    One model, one agent, one task.
  </Card>

  <Card title="Add Python Tools" icon="toolbox" href="/docs/core-concepts/local-tools">
    Register application-owned functions with `ToolRegistry`.
  </Card>

  <Card title="Connect MCP Tools" icon="plug" href="/docs/core-concepts/mcp">
    Load tools from external MCP servers.
  </Card>

  <Card title="Keep Session Memory" icon="database" href="/docs/core-concepts/memory">
    Store conversation history in memory, Redis, MongoDB, or SQL.
  </Card>

  <Card title="Use Workspace Files" icon="folder-tree" href="/docs/core-concepts/workspace-files">
    Give agents a file surface for notes, artifacts, and offloads.
  </Card>

  <Card title="Serve An Agent API" icon="server" href="/docs/how-to-guides/omniserve">
    Run the same agent behind REST and SSE endpoints.
  </Card>

  <Card title="Run Background Work" icon="clock" href="/docs/core-concepts/background-agents">
    Schedule durable agent work with run history, retries, and workspace output.
  </Card>

  <Card title="Build A Real Application" icon="rocket" href="/cookbook/real_applications">
    Start from production-shaped examples.
  </Card>
</CardGroup>

***

## Why It Exists

OmniCoreAgent is built around real agent runtime problems:

<CardGroup cols={2}>
  <Card title="Parallel tool batches" icon="bolt">
    The runtime supports independent tool calls in one batch, executes them
    concurrently, and returns one structured observation.
  </Card>

  <Card title="Structured observations" icon="filter">
    Tool results are parsed, formatted, guardrail-checked, and offloaded when
    they cross the configured threshold before the model sees them.
  </Card>

  <Card title="Signature loop detection" icon="rotate">
    The harness detects repeated tool signatures and repeated tool interaction
    patterns beyond max-step exhaustion.
  </Card>

  <Card title="Workspace-backed context" icon="folder-tree">
    Agents, subagents, tool offloads, notes, scratchpads, and artifacts share one
    local, S3, or R2-backed workspace.
  </Card>

  <Card title="Automatic context control" icon="brain-circuit">
    When enabled, the runtime checks context before each model call and acts
    before the configured budget is exceeded.
  </Card>
</CardGroup>

***

## Start Building

<CardGroup cols={2}>
  <Card title="Quick Start" icon="bolt" href="/docs/getting-started/quickstart">
    Build your first OmniCoreAgent and run a task.
  </Card>

  <Card title="Agent Harness" icon="layer-group" href="/docs/core-concepts/agent-harness">
    Understand what OmniCoreAgent adds around the model.
  </Card>

  <Card title="Installation" icon="download" href="/docs/getting-started/installation">
    Install the core package or the extras your agent uses.
  </Card>

  <Card title="Local Tools" icon="toolbox" href="/docs/core-concepts/local-tools">
    Register application-owned Python functions as tools.
  </Card>

  <Card title="MCP Tools" icon="plug" href="/docs/core-concepts/mcp">
    Connect external MCP servers over stdio, SSE, or Streamable HTTP.
  </Card>

  <Card title="Configuration" icon="gear" href="/docs/how-to-guides/configuration">
    Environment variables, memory, workspace, task stores, telemetry, and
    OmniServe settings.
  </Card>

  <Card title="OmniServe" icon="server" href="/docs/how-to-guides/omniserve">
    Production REST/SSE serving, auth, rate limits, events, and background APIs.
  </Card>
</CardGroup>

***

## See It In Action

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
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

<CardGroup cols={3}>
  <Card title="OmniCoreAgent" icon="robot" href="/docs/core-concepts/overview">
    The main agent harness API and runtime capabilities.
  </Card>

  <Card title="Agent Harness" icon="layer-group" href="/docs/core-concepts/agent-harness">
    The implementation-backed map of the runtime pieces around the model.
  </Card>

  <Card title="Architecture" icon="sitemap" href="/docs/core-concepts/architecture">
    How the loop, tools, observations, memory, workspace, and serving layers fit.
  </Card>

  <Card title="Memory" icon="database" href="/docs/core-concepts/memory">
    Session history across in-memory, Redis, MongoDB, and SQL database storage.
  </Card>

  <Card title="Context Engineering" icon="brain-circuit" href="/docs/core-concepts/context-engineering">
    Context strategies plus tool-output offloading for long-running tasks.
  </Card>

  <Card title="Workspace Files" icon="folder-tree" href="/docs/core-concepts/workspace-files">
    Local, S3, or R2 files for notes, scratchpads, artifacts, and offloads.
  </Card>

  <Card title="Subagents" icon="users" href="/docs/core-concepts/sub-agents">
    Dynamic focused workers that write outputs back into the workspace.
  </Card>

  <Card title="Guardrails" icon="shield" href="/docs/core-concepts/guardrails">
    Prompt-injection screening inside the observation pipeline.
  </Card>

  <Card title="Events" icon="signal-stream" href="/docs/core-concepts/events">
    Runtime events for runs, tool calls, and streaming integrations.
  </Card>

  <Card title="OmniServe" icon="server" href="/docs/how-to-guides/omniserve">
    Run an OmniCoreAgent behind REST and SSE endpoints.
  </Card>
</CardGroup>
