Pegasus
Pegasus is a terminal-first agent runtime for long-running tasks. It combines a streaming CLI, tool calling, browser control, camera capture, MCP execution, subagents, and automatic context compression in one package.
It is designed for workflows that need more than simple code generation. Pegasus can keep working across multiple turns, use tools to interact with the local machine and external systems, and continue operating even as context grows.
Pegasus treats open source models as first class citizens. It has no support for closed source models and aims to be the best agentic runtime harness for using open source models.
Features
- terminal agent workflow with streaming responses and tool execution
- built-in file, shell, edit, web search, memory, and todo tools
- browser automation with annotated screenshots for grounded actions
- camera capture with image handoff into the next model turn
- MCP executor for listing and composing MCP tools as Python-style functions
- subagents for delegated task execution
- automatic context compression when conversation history approaches the model limit
- open source models treated as first class citizens
Model Support
Pegasus currently supports the following open source models:
kimi-k2.5glm5qwen3.5-122bminimax-m2.5olmo3.1-32b-instructnemotron-3-nano-30bdevstral2mercury2
Pegasus does not support closed source models.
Installation
Install from PyPI:
pip install pegasus-ai
Install from source:
git clone https://github.com/asuzukosi/pegasus.git
cd pegasus
pip install -e .
Requirements
- python 3.9 or newer
- an API key exposed as
API_KEY - optional local dependencies for advanced tools, such as a working browser environment for Playwright-based automation and a camera device for vision capture
Get an API key from OpenRouter.
Set your API key:
export API_KEY="sk-xxx"
Quick Start
Run the CLI:
pegasus-cli
Run a single prompt:
pegasus-cli --message "summarize the repository structure"
Run Pegasus from source without installing the console script:
python main.py
Basic Usage
Interactive session:
$ pegasus-cli
[user]> inspect this project and explain the main runtime flow
Single-shot invocation:
pegasus-cli --message "list the builtin tools and explain what each one is for"
Switch models from inside the CLI:
/model kimi-k2.5
List the supported models from inside the CLI:
/model list
Useful built-in commands:
/help/config/model list/model <name>/clear/exit
Configuration
Pegasus loads project configuration from .pegasus/config.toml in the current working directory.
Example MCP configuration:
[mcp_servers.hackathon_manager]
enabled = true
startup_timeout_sec = 10.0
command = "node"
args = [".pegasus/mcp_servers/hackathon_manager_server.js"]
cwd = "."
[mcp_servers.event_booking]
enabled = true
startup_timeout_sec = 10.0
command = "node"
args = [".pegasus/mcp_servers/event_booking_server.js"]
cwd = "."
Examples
Ask Pegasus to inspect a codebase:
pegasus-cli --message "inspect the current project and explain how session startup works"
Use browser-based task execution:
[user]> open a browser, go to the target site, and tell me which clickable options are visible
Use camera capture in a multimodal workflow:
[user]> capture the camera feed for 10 seconds and describe what changed across the frames
Use MCP composition:
[user]> list the available mcp functions, then fetch details for the sf hackathons
Packaging
The published distribution name is pegasus-ai.
Install command:
pip install pegasus-ai
Python import package:
import pegasus
Metadata
Release files for pegasus-ai 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pegasus_ai-0.1.7.tar.gz | 56.3 kB | Without provenance | Details for pegasus_ai-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pegasus_ai-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for pegasus_ai-0.1.7-py3-none-any.whl |
Total release size: 126.4 kB
Release files / pegasus_ai-0.1.7.tar.gz
| Download URL | pegasus_ai-0.1.7.tar.gz |
|---|---|
| Size | 56.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19999139587f123cd56a93257268aa8df1a69f952f617b84c7ba9f39e603a043
|
|
BLAKE2b-256 checksum How to use checksums |
82b1e0227b4b11cdc07aec4f712f30f5cfe2384bd909663f90dc639442109ad6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / pegasus_ai-0.1.7-py3-none-any.whl
| Download URL | pegasus_ai-0.1.7-py3-none-any.whl |
|---|---|
| Size | 70.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ff952b9cf91e25473c6309133e5756ebd91c325ff3f95fce71faff11649797a
|
|
BLAKE2b-256 checksum How to use checksums |
c34024fde17a6aac86296f843299c08a93ff7a6c0971301ca74a306d2e7a29a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for pegasus-ai 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.