Penguin: A modular, extensible AI coding agent and software engineer with its own execution environment.
Project description
ooooooooo. o8o
`888 `Y88. `"'
888 .d88' .ooooo. ooo. .oo. .oooooooo oooo oooo oooo ooo. .oo.
888ooo88P' d88' `88b `888P"Y88b 888' `88b `888 `888 `888 `888P"Y88b
888 888ooo888 888 888 888 888 888 888 888 888 888
888 888 .o 888 888 `88bod8P' 888 888 888 888 888
o888o `Y8bod8P' o888o o888o `8oooooo. `V88V"V8P' o888o o888o o888o
d" YD
"Y88888P'
Penguin is an open-source coding agent built on a scalable cognitive architecture runtime.
It is designed for long-running, tool-using, multi-agent software workflows: from interactive coding in the TUI to persistent sessions, subagent delegation, and API-driven automation. Penguin combines a coding-focused agent runtime with durable state, workspace-aware tools, and multiple interfaces on top of the same core.
Why Penguin
- Purpose-built for software engineering workflows, with coding tools, sessions, and subagents.
- Stateful runtime: sessions, checkpoints, tool history, and replayable transcripts.
- Context Window Manager: long sessions stay coherent through category-aware token budgeting, truncation, and replay, preserving recency and message-category priorities across long-running sessions.
- Multi-agent orchestration: planner/implementer/QA patterns, subagents, and scoped delegation.
- Multiple surfaces: TUI, CLI, web API, and Python client on the same backend.
- OpenCode-compatible TUI path: Penguin web/core now powers an OpenCode-style terminal UX.
Quick Start
# Recommended install
pip install "penguin-ai[tui]"
# Set a model provider key (OpenRouter is the easiest starting point)
export OPENROUTER_API_KEY="your_api_key"
# Launch Penguin TUI
penguin
Other entrypoints:
penguin- interactive Penguin TUI launcherptui- direct TUI aliaspenguin-cli- headless CLI for automation and scriptspenguin-web- FastAPI server for web/API usage
What You Get
- Coding workflow tools: file reads/writes/diffs, shell commands, test execution, search, code analysis, and background process management.
- Context Window Manager: category-based token budgets, multimodal truncation, and live usage reporting to keep histories within model limits. This supports theoretically infinite sessions.
- Persistent memory and file-backed context: declarative notes, summary notes,
context/artifacts, docs cache, and daily journal continuity. - Multi-agent execution: isolated or shared-context subagents, delegation, planner/ implementer/QA patterns, and background task execution.
- Browser and research support: web search plus browser automation for documentation, web workflows, and UI testing.
- Session durability: checkpoints, rollback, branching, transcript replay, and long-running task continuity.
- Project and task orchestration backed by SQLite, including todo tracking and Run Mode.
- Native and gateway model support across OpenAI, Anthropic, OpenRouter, and LiteLLM-compatible providers.
Interfaces
Penguin exposes the same runtime through several surfaces:
penguin/ptui- terminal-first coding workflow with streaming, tools, and session navigation.penguin-cli- scriptable CLI interface for prompts, tasks, config, and automation.penguin-web- REST + WebSocket/SSE backend for the TUI and custom integrations.- Python API -
PenguinAgent,PenguinClient, andPenguinAPIfor embedding Penguin in code.
Quick Python Example
from penguin import PenguinAgent
with PenguinAgent() as agent:
response = agent.chat("Summarize the current task charter")
print(response["assistant_response"])
Installation
Recommended
# Core CLI install
pip install penguin-ai
# Web/API runtime
pip install penguin-ai[web]
# TUI launcher + local web dependencies
pip install "penguin-ai[tui]"
# Full feature set
pip install penguin-ai[all]
Development
git clone https://github.com/Maximooch/penguin.git
cd penguin/penguin
pip install -e .[dev,test]
Extras
| Extra | Description |
|---|---|
[tui] |
Penguin TUI launcher runtime + local web dependencies |
[web] |
FastAPI server + WebSocket support |
[memory_faiss] |
FAISS vector search + embeddings |
[memory_lance] |
LanceDB vector database |
[memory_chroma] |
ChromaDB integration |
[browser] |
Browser automation (Python 3.11+ only) |
[all] |
Everything above |
TUI Runtime
The Penguin TUI launcher supports both development and packaged installs.
- In a source checkout,
penguinprefers localpenguin-tui/packages/opencodesources. - Outside a source checkout, it bootstraps a cached sidecar binary under
~/.cache/penguin/tui. - Stable installs prefer a sidecar that matches the installed Penguin version.
- You can override the source or binary path when needed:
# Force local source mode
export PENGUIN_OPENCODE_DIR="/path/to/penguin/penguin-tui/packages/opencode"
# Force a specific sidecar binary
export PENGUIN_TUI_BIN_PATH="/path/to/opencode"
You can also override the release endpoint for staging/testing with PENGUIN_TUI_RELEASE_URL.
Common Commands
/models # interactive model selector
/model set <MODEL_ID> # set a specific model
/stream on|off # toggle streaming
/checkpoint [name] # save a checkpoint
/checkpoints [limit] # list checkpoints
/rollback <checkpoint> # restore a checkpoint
/tokens # token usage summary
/run task "Name" # start a specific task
Architecture
Penguin is structured as a runtime for long-lived agent workflows.
PenguinCorecoordinates configuration, interfaces, events, and runtime state.Engineruns the reasoning loop, model calls, and tool orchestration.ConversationManagerpersists sessions, checkpoints, and conversation state.ContextWindowManagermanages long-session token budgets with category-aware truncation, multimodal handling, and replay-friendly context continuity.ToolManagerandActionExecutorrun workspace-aware tools and action pipelines.- CLI, TUI, web, and Python APIs all sit on top of the same backend services.
Penguin's long-term direction is a scalable cognitive architecture runtime: a persistent agent kernel with userland surfaces for sessions, tools, orchestration, and observability.
Read more:
architecture.mdcontext/architecture/Penguin_SCAR_80_20_Roadmap.mdcontext/architecture/tui-opencode-implementation.md
Version Highlights
v0.6.1
- Canonical file editing now centers on
read_file,write_file,patch_file, andpatch_files. - JSON-first edit payloads, generated prompt docs, and centralized compatibility aliases keep parser, tools, and UI metadata aligned.
- File edit validation, multifile permissions/rollback, overwrite behavior, and diff output consistency are materially more reliable.
- OpenCode-compatible Penguin TUI flow remains backed by Penguin web/core.
Documentation
- Official Documentation
- Release Notes
architecture.mdcontext/architecture/Penguin_SCAR_80_20_Roadmap.md
Contributing
git clone https://github.com/Maximooch/penguin.git
cd penguin/penguin
pip install -e .[dev,test]
pytest -q
- Open issues: GitHub Issues
- Discuss ideas: GitHub Discussions
Support
License
Licensing in this repository is split by component:
penguin/and the main Penguin runtime are licensed under the GNU Affero General Public License v3.0 or later.penguin-tui/contains OpenCode-derived TUI code that remains MIT-licensed; seepenguin-tui/LICENSE.- Read the official GNU AGPL v3 text
Enterprise licensing without AGPL copyleft requirements is under consideration. If you are interested, contact MaximusPutnam@gmail.com.
Acknowledgments
Built upon insights from:
- CodeAct
- OpenCode for the upstream TUI and UX foundation used in
penguin-tui/ - Claude-Engineer
- Aider
- RawDog
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 penguin_ai-0.6.1.tar.gz.
File metadata
- Download URL: penguin_ai-0.6.1.tar.gz
- Upload date:
- Size: 961.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 |
a4f94ca3d0283f13b327a1955264d83419e4bb9a73beb9efeb3f56f5d8207a62
|
|
| MD5 |
d7a1b9230d7bc6c92e78a7bc9577ccdb
|
|
| BLAKE2b-256 |
1c5d34af02460ab7830583064641363749df3346470b0bfe0f69bc231d398c8d
|
Provenance
The following attestation bundles were made for penguin_ai-0.6.1.tar.gz:
Publisher:
publish.yml on Maximooch/penguin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_ai-0.6.1.tar.gz -
Subject digest:
a4f94ca3d0283f13b327a1955264d83419e4bb9a73beb9efeb3f56f5d8207a62 - Sigstore transparency entry: 1171098433
- Sigstore integration time:
-
Permalink:
Maximooch/penguin@3420712921e6295d69826579005c2e453630ac9f -
Branch / Tag:
refs/tags/v0.6.1.1 - Owner: https://github.com/Maximooch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3420712921e6295d69826579005c2e453630ac9f -
Trigger Event:
push
-
Statement type:
File details
Details for the file penguin_ai-0.6.1-py3-none-any.whl.
File metadata
- Download URL: penguin_ai-0.6.1-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e4b30ca1b4219da3b67952919480bd2871142bf401ed345a5678734bbc59f4
|
|
| MD5 |
5e5c89cdcd43206a5025415ac0d4ef7b
|
|
| BLAKE2b-256 |
e6b4cf9c9d1ddcb214d1cee8e7401db316420529e227df6f0c8ce8e825265c54
|
Provenance
The following attestation bundles were made for penguin_ai-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on Maximooch/penguin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
penguin_ai-0.6.1-py3-none-any.whl -
Subject digest:
70e4b30ca1b4219da3b67952919480bd2871142bf401ed345a5678734bbc59f4 - Sigstore transparency entry: 1171098533
- Sigstore integration time:
-
Permalink:
Maximooch/penguin@3420712921e6295d69826579005c2e453630ac9f -
Branch / Tag:
refs/tags/v0.6.1.1 - Owner: https://github.com/Maximooch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3420712921e6295d69826579005c2e453630ac9f -
Trigger Event:
push
-
Statement type: