Skip to main content

Self-hosted AI workbench for code, architecture, and operations. Rich visualizations (Graphviz, Mermaid, Vega-Lite, DrawIO), diff application with per-hunk tracking, parallel AI agents, MCP tool integration, enterprise plugin system.

Project description

Ziya AI Technical Workbench

Self-hosted AI workbench for code, architecture, and operations.
Runs alongside your editor — not instead of it.

PyPI Python License Stars


What is Ziya?

Ziya is a self-hosted AI technical workbench. It's not an IDE, not a plugin, not a terminal-only CLI — it's a visual, persistent working environment where development, architecture analysis, and operational diagnostics converge with rich interactive output.

You keep your editor, your terminal, your monitoring tools. Ziya is where you think about your systems — ask questions, get visual answers, apply changes, switch between workstreams, and pick up where you left off.

Why This Exists

No existing AI tool covered the full surface of how senior engineers actually work — moving between code, architecture diagrams, operational analysis, and visual debugging across many parallel workstreams. IDE tools optimize for editing. CLI tools lack visual output. Chat interfaces are ephemeral. Ziya was built to fill the gap.

It started as an internal tool used in production across hundreds of engineers, and is now open source under the MIT license. The majority of the codebase is the work of a single developer over nearly two years of daily use.

What Makes This Different

🔧 Rendered Diffs with Apply/Undo

Code changes rendered as structured diffs with per-hunk Apply/Undo buttons and individual status tracking. The 4-stage patch pipeline handles imperfect model output gracefully — no more copy-pasting from ChatGPT.

🧭 User-Controlled Context Curation

Most AI tools auto-compact your conversation when context fills up — the machine decides what to keep and what to summarize away. Ziya takes a different approach: you decide what matters.

  • Mute any message — exclude it from model context without deleting it (unmute anytime)
  • Fork from any point — branch off to explore a tangent, optionally truncate to shed context weight
  • Edit or resubmit — revise any message in the history
  • Selective file removal — drop files from context when they've served their purpose

This keeps you in control of what the model retains. In 18+ months of daily use with very large contexts, deliberate curation has proven more reliable than automatic summarization, which risks discarding details that the user knows are important but the model doesn't recognize.

📊 Architecture & Operations Analysis

Paste a thread dump → get a Graphviz deadlock diagram. Ask about data flow → get a DrawIO architecture diagram built from the actual code. Drop in latency data → get a Vega-Lite trend chart. Drag and drop existing architecture diagrams, operational plots, or monitoring screenshots directly into the conversation for integrated visual analysis alongside your codebase.

This is the gap no other AI coding tool fills. Cursor, Aider, Claude Code optimize for writing code. Ziya also helps you understand and diagnose the systems running it.

🎨 Seven Visualization Renderers

Graphviz · Mermaid · Vega-Lite · DrawIO · KaTeX · HTML mockups · Packet frame diagrams

All renderers include a normalization layer that handles imperfect LLM output. Diagrams render inline in the conversation, not in a separate window.

🤖 Parallel Agent Swarms

Decompose complex tasks into parallel delegates that run simultaneously. Each delegate has its own context, 9 coordination tools, and produces a crystal (compressed memory summary) when complete. Delegates can spawn sub-swarms. Progressive checkpointing survives crashes.

🔌 MCP Tool Integration

Connect any MCP server (local or remote). Built-in security: tool poisoning detection, shadowing prevention, rug-pull detection, cryptographic result signing. Shell commands are allowlisted — configurable per-session or persistently.

🎯 Projects, Contexts, and Skills

Organize work by project with scoped conversations, file contexts, and reusable skill bundles. Each project maintains its own history and context selections. Switch between projects without losing state.

🖥️ Web + CLI, Same Codebase

Full web UI at localhost:6969 with rich rendering. Full CLI with ziya chat, ziya ask, ziya review, ziya explain. Same features, same codebase, your choice.


How People Use It

Development — Ask about code, get diffs with Apply buttons, see architecture diagrams generated from your actual code, run parallel agents for large refactors. Drag and drop screenshots of UI bugs for visual context alongside the source.

Operations — Paste thread dumps, log extracts, or error traces and get visual root cause analysis correlated with your codebase. Drag and drop existing monitoring dashboards, Grafana screenshots, or CloudWatch plots for AI-assisted interpretation alongside the code that produced the data.

Architecture — Point it at a codebase and get living architecture documentation built from what the code actually does — not from stale diagrams someone drew six months ago.


Quick Start

pip install ziya

For AWS Bedrock (default):

export AWS_ACCESS_KEY_ID=<your-key>
export AWS_SECRET_ACCESS_KEY=<your-secret>
ziya

For Google Gemini:

export GOOGLE_API_KEY=<your-key>
ziya --endpoint=google

For OpenAI:

export OPENAI_API_KEY=<your-key>
ziya --endpoint=openai

Then open http://localhost:6969.

CLI mode (no browser):

ziya chat                          # Interactive chat
ziya ask "what does this do?"      # One-shot question
ziya review --staged               # Review git staged changes
git diff | ziya ask "review this"  # Pipe anything in

Supported Models

Provider Models What You Need
AWS Bedrock Claude Sonnet 4.6/4.5/4.0/3.7, Opus 4.6/4.5/4.1/4.0, Haiku 4.5/3, Nova Premier/Pro/Lite/Micro, DeepSeek R1/V3, Qwen3, Kimi K2.5, and more AWS credentials with Bedrock access
Google Gemini 3.1 Pro, 3 Pro/Flash, 2.5 Pro/Flash, 2.0 Flash Google API key
OpenAI GPT-4.1/Mini/Nano, GPT-4o, o3, o3-mini, o4-mini OpenAI API key
Anthropic Claude (direct API) Anthropic API key

Switch models mid-conversation. Configure temperature, top-k, max tokens, and thinking mode from the UI.


How It Compares

IDE Forks (Cursor, Windsurf) CLI Tools (Aider, Claude Code) Extensions (Cline, Copilot) Ziya
Keep your editor
Rich visual UI Partial
Diff apply with per-hunk status Partial
Inline diagrams (6+ types)
Operational data → visual analysis
User-controlled context curation ✅ (mute/fork/truncate/prune)
Self-hosted / data stays local
Project & context management
Parallel agent swarms
Web + CLI modes Terminal only
Drag-and-drop images for analysis Partial
MCP with security controls Partial Partial Partial

Enterprise

Ziya includes a plugin system for enterprise deployment — pluggable auth providers, endpoint restrictions, data retention policies, encryption at rest, and custom tool configuration. Currently deployed at scale internally at a major technology company. See Docs/Enterprise.md for details.


Documentation

Author

Ziya is primarily built and maintained by Dan Cohn, with early contributions from Vishnu Kool.

Contributing

See CONTRIBUTING.md for guidelines.

Security

See SECURITY.md for reporting vulnerabilities.

License

MIT — see 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ziya-0.6.4.2-py3-none-any.whl (28.5 MB view details)

Uploaded Python 3

File details

Details for the file ziya-0.6.4.2-py3-none-any.whl.

File metadata

  • Download URL: ziya-0.6.4.2-py3-none-any.whl
  • Upload date:
  • Size: 28.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ziya-0.6.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a83ef534c60664e2752455d3110ba278de5ef22e601a99ec2ec8fabce5c39b7a
MD5 43313c3bb76b6a9dbbc7af11d6ee6510
BLAKE2b-256 82c8783ad533ef9c0e8353ea6f4f085452885e7fa0ff9080b85038b7432f7f09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page