Oraxes is a terminal-operated web research agent. Give it a question and it uses Gemini to plan a bounded sequence of web-search and Playwright browser actions, collects verbatim evidence, and prints a structured report with source citations.
- Custom async agent loop with bounded planning, ordered tool execution, and final synthesis.
- Gemini behind a small
LLMProviderinterface, making another provider straightforward to add. - Structured Gemini function calls and a Pydantic-constrained structured final result.
- Fast tools:
searchandfetch_pageretrieve static evidence without starting Chromium. - Rendered tools:
browser_open,browser_click, andbrowser_extract, plus interactive type, scroll, and back helpers. - Research tools: DuckDuckGo HTML search, direct evidence collection, source citations, and explicit completion.
- In-memory state only; no database, API server, telemetry platform, or persistence.
- Unit, integration, browser E2E, and agent-eval fixture coverage.
- Python 3.12+
- uv
- A Gemini API key
Install dependencies and Chromium:
uv sync --dev
uv run playwright install chromiumConfigure the provider:
cp .env.example .env
export GEMINI_API_KEY="your-key"
# optional: export ORAXES_MODEL="gemini-3.5-flash-lite"Oraxes loads .env automatically. You can also export GEMINI_API_KEY in the shell; an exported value takes precedence.
uv run oraxes "What are the latest official accessibility requirements for public websites?"Useful options:
uv run oraxes "Compare two primary sources" --max-steps 16
uv run oraxes "Inspect this interactive site" --headedThe terminal output contains the answer, supported findings, evidence IDs, direct source quotes, URLs, and limitations. A model cannot create a citation by itself: collect_evidence validates its quote against the latest fetched or rendered page before the source enters state.
Typer CLI
-> ResearchAgent (per-run dependency boundary)
-> ResearchLoop (application-owned async control flow)
-> decide -> execute tool batch -> repeat up to max_steps
-> no tools / completion / step limit -> synthesize
-> LLMProvider -> GeminiProvider (function calls + JSON final output)
-> ToolRegistry (Pydantic argument validation)
-> SearchTool + PageFetcher (fast static path)
-> BrowserSession (lazy async Playwright fallback)
-> Evidence and citation state (memory only)
ResearchLoop owns the control flow directly in Python, with fresh in-memory state for each run. Each turn asks the provider for a decision and executes its tool calls serially (one browser tab is intentionally stateful). The loop stops when the provider returns no tools, a completed tool batch requests completion, or max_steps planning turns have run. It then synthesizes once, attaches only collected citations, and removes unsupported findings. Reaching the step limit without explicit completion adds a limitation to the report. Application code validates arguments and evidence; the LLM provider makes decisions. No orchestration framework is required.
The default fast path is search → fetch_page → collect_evidence. Chromium is launched lazily only for the fallback path: browser_open → browser_click → browser_extract. This avoids browser startup and JavaScript rendering for ordinary static sources.
uv run ruff format --check .
uv run ruff check .
uv run ty check src
uv run pytestTest layers:
tests/unit: Pydantic validation and search-result parsing.tests/integration: scripted provider + deterministic browser, exercising the research loop and evidence gate.tests/e2e: real async Playwright against a local HTTP server; no external website dependency.evals/cases.json: lightweight behavioral cases that protect the evidence-first contract.
src/oraxes/
cli.py terminal entry point and Rich rendering
agent/ in-memory state, custom async loop, and public facade
llm/ provider protocol and Gemini adapter
browser/ async Playwright session
tools/ search, schemas, and validated dispatcher
research/ Pydantic output models
tests/ unit, integration, and browser E2E tests
evals/ agent evaluation cases