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

# Cookbook

> Runnable OmniCoreAgent examples for first agents, tools, memory, workspace files, background tasks, OmniServe, and real applications

# OmniCoreAgent Cookbook

Copy, paste, run. These examples show how to build with OmniCoreAgent from the
first local agent through production-shaped application harnesses.

## 🚀 Where to Start

**New to OmniCoreAgent?** Start with [getting\_started](./getting_started) — progressive examples from "Hello World" to production deployments.

**Know what you're building?** Find your use case below.

**Just want to see it work?**

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from omnicoreagent import OmniCoreAgent

agent = OmniCoreAgent(
    name="my_agent",
    system_instruction="You are a helpful assistant.",
    model_config={"provider": "openai", "model": "gpt-4o"}
)

result = await agent.run("Hello!")
print(result["response"])
```

***

## 📚 Build by Use Case

### 🤖 I want to build my first agent

→ **[getting\_started](./getting_started)** — Basic agents, tools, memory, events, and configuration.

### 🛠️ I want to use custom tools

→ **[getting\_started/agent\_with\_local\_tools.py](./getting_started/agent_with_local_tools.py)** — Register Python functions as tools.

### 🔌 I want to connect MCP servers

→ **[getting\_started/agent\_with\_mcp\_tools.py](./getting_started/agent_with_mcp_tools.py)** — Connect to external MCP servers.

### 👥 I want agents working together

→ **[workflows](./workflows)** — Sequential, Parallel, and Router agents.

### 🚁 I want agents running autonomously

→ **[background\_agents](./background_agents)** — Scheduled tasks and queue-based execution.

### 🧠 I want complex multi-step workflows

→ **[getting\_started/agent\_with\_sub\_agents.py](./getting_started/agent_with_sub_agents.py)** — OmniCoreAgent dynamic subagents, workspace files, and orchestration.

### 🏭 I want to build a real application

→ **[real\_applications](./real_applications)** — Production-shaped app harness examples that show domain tools, workspace files, offloading, telemetry, guardrails, and workspace command tools across different apps.

### 🧪 I want more domain demos

→ **[advanced\_agent](./advanced_agent)** — E-commerce, flight booking, customer support, due diligence.

### 🌐 I want to deploy as an API

→ **[omniserve](./omniserve)** — Deploy agents as REST/SSE APIs with one command.

### 🚀 I want to run in production

→ **[production](./production)** — Metrics and guardrails.

***

## 📂 Directory Structure

```
cookbook/
├── getting_started/     # Start here! Progressive learning path
├── workflows/           # Multi-agent orchestration patterns
├── background_agents/   # Scheduled and autonomous agents
├── omniserve/           # 🆕 Deploy agents as REST/SSE APIs
├── real_applications/   # End-to-end application harness examples
├── advanced_agent/      # Real-world application examples
└── production/          # Production-ready configurations
```

***

## 🎯 Featured Examples

| Example                                                                            | What You'll Build                                                                                                 |
| ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [Research Due Diligence](./real_applications/research_due_diligence_agent.py)      | Research agent with parallel tools, workspace reports, artifact readback, telemetry                               |
| [Support Operations](./real_applications/support_operations_agent.py)              | Support agent with customer/order tools, guardrails, escalation, workspace notes                                  |
| [Workspace Code Review](./real_applications/workspace_code_review_agent.py)        | Code review agent using built-in workspace file commands instead of unrestricted shell                            |
| [Support Background Task](./background_agents/real_application_background_task.py) | Real support operations app running through durable background task state, events, attempts, and workspace output |
| [E-commerce Shopper](./advanced_agent/e_commerce_personal_shopper_agent.py)        | Personal shopping assistant with cart, preferences, recommendations                                               |
| [Flight Booking](./advanced_agent/flightBooking_agent.py)                          | Travel agent with search, booking, and itinerary management                                                       |
| [Customer Support](./advanced_agent/real_time_customer_support_agent.py)           | Support agent with ticket handling and escalation                                                                 |
| [Due Diligence](./advanced_agent/ai_due_diligence_agent/)                          | Investment research with web search, analysis, and reporting                                                      |

***

## 🤝 Contributing

Want to add a cookbook example? See [CONTRIBUTING.mdx](./CONTRIBUTING.mdx) for guidelines.
