Skip to main content
Wrap a Parallel-powered research agent in AgentOS to get a production API and the AgentOS control plane in a few lines. Run this file and open http://localhost:7777 to chat with the agent or call its REST API.
agent_os_app.py
"""
AgentOS Research App - Deploy Your Parallel Agent
=================================================

Wrap a Parallel-powered research agent in AgentOS to get a production API
and the AgentOS control plane in a few lines. Run this file and open
http://localhost:7777 to chat with the agent or call its REST API.

Because this filename starts with a number, we pass the FastAPI app object to
serve() directly (live reload would need an importable "module:app" string).

Prerequisites:
- pip install parallel-web
- export PARALLEL_API_KEY=<your-api-key>
"""

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.tools.parallel import ParallelTools

# ---------------------------------------------------------------------------
# Create the Agent and AgentOS app
# ---------------------------------------------------------------------------
db = SqliteDb(db_file="tmp/parallel_os.db")

research_agent = Agent(
    name="Parallel Research Agent",
    model=OpenAIResponses(id="gpt-5.4"),
    tools=[ParallelTools(enable_search=True, enable_extract=True, enable_task=True)],
    db=db,
    add_history_to_context=True,
    markdown=True,
    instructions=[
        "You are a web research agent powered by Parallel.",
        "Use Search and Extract for fast lookups and the Task API for deep, "
        "cited research.",
    ],
)

agent_os = AgentOS(
    description="Parallel-powered research app",
    agents=[research_agent],
)
app = agent_os.get_app()

# ---------------------------------------------------------------------------
# Run the App
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    # Open http://localhost:7777 (API docs at /docs, config at /config).
    agent_os.serve(app=app)

Run the Example

1

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
2

Install dependencies

uv pip install -U "agno[os]" fastmcp openai parallel-web starlette
3

Export your API keys

export JWT_VERIFICATION_KEY="your_jwt_verification_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"
export PARALLEL_API_KEY="your_parallel_api_key_here"
$Env:JWT_VERIFICATION_KEY="your_jwt_verification_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
$Env:PARALLEL_API_KEY="your_parallel_api_key_here"
4

Run the example

Save the code above as agent_os_app.py, then run:
python agent_os_app.py
Full source: cookbook/integrations/parallel/09_agent_os_app.py