General AI Agent System
Project description
Ouro is derived from Ouroboros—the ancient symbol of a serpent consuming its own tail to form a perfect circle. It represents the ultimate cycle: a closed loop of self-consumption, constant renewal, and infinite iteration.
At Ouro AI Lab, this is our blueprint. We are building the next generation of AI agents capable of autonomous evolution—systems that learn from their own outputs, refine their own logic, and achieve a state of infinite self-improvement.
Installation
Prerequisites: Python 3.12+.
pip install ouro-ai
Or install from source (for development):
git clone https://github.com/ouro-ai-labs/ouro.git
cd ouro
./scripts/bootstrap.sh # requires uv
Quick Start
1. Configure Models
On first run, ~/.ouro/models.yaml is created with a template. Edit it to add your provider and API key:
models:
openai/gpt-4o:
api_key: sk-...
anthropic/claude-sonnet-4:
api_key: sk-ant-...
chatgpt/gpt-5.2-codex:
timeout: 600
ollama/llama2:
api_base: http://localhost:11434
default: openai/gpt-4o
current: openai/gpt-4o
For chatgpt/* subscription models, run ouro --login (or /login in interactive mode) and select provider before use.
OAuth models shown in /model are seeded from ouro's bundled catalog (synced from pi-ai openai-codex model list).
Maintainer note: refresh this catalog via python scripts/update_oauth_model_catalog.py.
Login uses a browser-based OAuth (PKCE) flow with a localhost callback server. If browser auto-open fails, ouro prints a URL you can open manually (for remote machines, SSH port-forwarding may be required).
Advanced OAuth overrides (rarely needed) are documented in docs/configuration.md.
See LiteLLM Providers for the full list.
2. Run
# Interactive mode
ouro
# Single task (returns raw result)
ouro --task "Calculate 123 * 456"
# Resume last session
ouro --resume
# Resume specific session (ID prefix)
ouro --resume a1b2c3d4
CLI Reference
| Flag | Short | Description |
|---|---|---|
--task TEXT |
-t |
Run a single task and exit |
--model ID |
-m |
LiteLLM model ID to use |
--resume [ID] |
-r |
Resume a session (latest if no ID given) |
--login |
- | Open OAuth provider selector and login |
--logout |
- | Open OAuth provider selector and logout |
--verify |
Enable self-verification (Ralph Loop) in --task mode |
|
--reasoning-effort LEVEL |
- | Set run-scoped reasoning effort (`default |
--verbose |
-v |
Enable verbose logging to ~/.ouro/logs/ |
Interactive Commands
Slash Commands
| Command | Description |
|---|---|
/help |
Show help |
/reset |
Clear conversation and start fresh |
/stats |
Show memory and token usage statistics |
/resume [id] |
List or resume a previous session |
/model |
Pick a model (arrow keys + Enter) |
/model edit |
Open ~/.ouro/models.yaml in editor (auto-reload on save) |
/login |
Open OAuth provider selector and login |
/logout |
Open OAuth provider selector and logout |
/theme |
Toggle dark/light theme |
/verbose |
Toggle thinking display |
/reasoning |
Open reasoning menu |
/compact |
Trigger memory compression and show token savings |
/exit |
Exit (also /quit) |
Keyboard Shortcuts
| Key | Action |
|---|---|
/ |
Command autocomplete |
Ctrl+C |
Graceful interrupt (cancels current operation, rolls back incomplete memory) |
Ctrl+L |
Clear screen |
Ctrl+T |
Toggle thinking display |
Ctrl+S |
Show quick stats |
| Up/Down | Navigate command history |
Bot Mode (IM Assistant)
Run ouro as a persistent IM bot — message it from Lark or Slack, get agent responses. No public URL needed; the bot uses outbound long connections (WebSocket / Socket Mode).
Bot data is isolated under ~/.ouro/bot/ (sessions, memory, skills) so it never conflicts with interactive or task mode.
Install
pip install ouro-ai[bot]
Quick Start
Add credentials to ~/.ouro/config:
# Lark
LARK_APP_ID=cli_xxx
LARK_APP_SECRET=xxx
# Slack
SLACK_BOT_TOKEN=xoxb-xxx
SLACK_APP_TOKEN=xapp-xxx
ouro --bot
Session Persistence
Bot conversations are automatically saved to disk and resumed across restarts. Each IM conversation gets its own session, mapped via ~/.ouro/bot/sessions/conversation_map.yaml.
Commands (send as a message to the bot):
| Command | Description |
|---|---|
/new or /reset |
Start a fresh session |
/sessions list |
List all saved sessions |
/sessions resume <id> |
Switch to a previous session |
/compact |
Compress conversation memory to save tokens |
/status |
Show session statistics (age, messages, tokens, compressions) |
/heartbeat |
Show heartbeat status (interval, last run, next run) |
/cron list |
List all scheduled cron jobs |
/cron add <schedule> <prompt> |
Create a new cron job |
/cron remove <id> |
Delete a cron job |
/help |
List all available commands |
Sessions untouched for 30 days are automatically cleaned up.
Proactive Mechanisms
The bot can act on its own between conversations:
- Heartbeat: Periodic self-checks — the agent runs through a checklist and broadcasts results to active IM sessions when action is needed.
- Cron: Schedule recurring or one-time tasks via cron expressions, second intervals, or one-time ISO timestamps.
See Bot Configuration for BOT_HEARTBEAT_INTERVAL, BOT_ACTIVE_HOURS_*, and other settings.
Personality
~/.ouro/bot/soul.md defines the bot's identity and tone. It is injected into the agent's system prompt for all bot sessions. A default template is created automatically on first launch — edit it to customize your bot's personality.
Platform Guides
Features
- Dual mode: Interactive CLI with rich TUI + persistent IM bot (Lark, Slack) — same agent core, two deployment modes
- Unified agent loop: Think-Act-Observe cycle — planning, sub-agents, and tool use all happen in one loop
- Self-verification: Ralph Loop verifies the agent's answer against the original task and re-enters if incomplete (
--verify) - Parallel execution: Concurrent readonly tool calls in a single turn, plus
multi_taskfor spawning parallel sub-agents with dependency ordering - Memory system: LLM-driven compression, long-term memory, and YAML session persistence resumable across restarts
- Proactive mechanisms: Heartbeat self-checks + cron-scheduled tasks, with results broadcast to active IM sessions
- Personality: Customizable soul file (
~/.ouro/bot/soul.md) defines bot identity and tone - Skills: Extensible skill registry — dynamically loaded per session
- OAuth login:
--login//loginto authenticate with ChatGPT Codex subscription models - Benchmarks: First-class Harbor integration for agent evaluation (see Evaluation)
Evaluation
Ouro can be evaluated on agent benchmarks using Harbor. A convenience script harbor-run.sh is provided at the repo root:
- Edit
harbor-run.shto set your model, dataset, and ouro version. - Run:
export OURO_API_KEY=<your-api-key>
./harbor-run.sh # run with defaults in the script
./harbor-run.sh -l 5 # limit to 5 tasks
./harbor-run.sh --n-concurrent 4 # 4 parallel workers
Extra flags are forwarded to harbor run, so any Harbor CLI option works. See ouro_harbor/README.md for full details.
Configuration
See Configuration Guide for all settings.
Documentation
- Configuration -- model setup, runtime settings, custom endpoints
- Examples -- usage patterns and programmatic API
- Memory Management -- compression, persistence, token tracking
- Extending -- adding tools, agents, LLM providers
- Packaging -- building, publishing, Docker
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
For development setup, see the Installation section (install from source).
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ouro_ai-0.3.0.tar.gz.
File metadata
- Download URL: ouro_ai-0.3.0.tar.gz
- Upload date:
- Size: 219.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ed0a5de95e433282c94e171a8893b703a4daf981bbeeeb7d9a6fb96cfa04ff2
|
|
| MD5 |
5c4ce061c62d8faf3342c58cd6f8023a
|
|
| BLAKE2b-256 |
919d120bcd417c0f1a3ab99f0b1441aa1dd339a38f60715435b95af6d2a71f50
|
Provenance
The following attestation bundles were made for ouro_ai-0.3.0.tar.gz:
Publisher:
release.yml on ouro-ai-labs/ouro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ouro_ai-0.3.0.tar.gz -
Subject digest:
6ed0a5de95e433282c94e171a8893b703a4daf981bbeeeb7d9a6fb96cfa04ff2 - Sigstore transparency entry: 986007943
- Sigstore integration time:
-
Permalink:
ouro-ai-labs/ouro@0046045cb89ec457fc67b7c6964f5f25571b15a7 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ouro-ai-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0046045cb89ec457fc67b7c6964f5f25571b15a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ouro_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ouro_ai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 196.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1cbb92c891449a5fcb6b579dc4c65aedd565c34b646d40c58d70ae26b115b34
|
|
| MD5 |
7689df8a25b0fa2836d6c22a2cbd7283
|
|
| BLAKE2b-256 |
990e5a790bbe2f26968e8e93e8ab9682e2cf2d3b5311f3b2b0ba0e2c42538841
|
Provenance
The following attestation bundles were made for ouro_ai-0.3.0-py3-none-any.whl:
Publisher:
release.yml on ouro-ai-labs/ouro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ouro_ai-0.3.0-py3-none-any.whl -
Subject digest:
a1cbb92c891449a5fcb6b579dc4c65aedd565c34b646d40c58d70ae26b115b34 - Sigstore transparency entry: 986007945
- Sigstore integration time:
-
Permalink:
ouro-ai-labs/ouro@0046045cb89ec457fc67b7c6964f5f25571b15a7 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/ouro-ai-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0046045cb89ec457fc67b7c6964f5f25571b15a7 -
Trigger Event:
push
-
Statement type: