How xu123-bob/baize works
Baize is a local coding-agent CLI: a user submits a request, the agent coordinates model interaction and tools, and returns a response. The README documents multiple model backends, privacy and language controls, tools, skills, subagents, hooks, MCP, context compression, and sandboxing. The main implementation is concentrated in Baize.py; links to documented capabilities whose wiring was not shown are marked unverified. The repository also contains the Impeccable skill’s design-context and UI-detection tools, but its connection to Baize is not established by the excerpts.
Main entry points: Baize.py Baize Agent · main.mjs UI Detector · mcp_client.py MCP Client · design-system.mjs Design System Analysis
Components 24
CLI and Session
- Baize Agent
agent/Baize.py - Configuration
agent/config.py - Conversation History
agent/core/history.py - Terminal UI
agent/ui_theme.py
Agent Capabilities
- Tool Execution
agent/Baize.py - Web Search and Fetch
agent/Baize.py - Tasks and Todos
agent/Baize.py - Skill Loading
agent/Baize.py - Subagents
agent/Baize.py - Tool Hooks
agent/Baize.py - Context Compression
agent/Baize.py
Privacy and Safety
- Privacy Filter
agent/core/privacy.py - Command Sandbox
agent/Baize.py
Models and Integrations
- Model Backends
agent/Baize.py - MCP Client
agent/MCP/mcp_client.py
Impeccable Skill
- Design Context
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/context.mjs - UI Detector
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/cli/main.mjs - Design System Analysis
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/design-system.mjs - Text Detection
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/engines/regex/detect-text.mjs - Static HTML Detection
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/engines/static-html/detect-html.mjs - Live Edit Buffer
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/live/manual-edits-buffer.mjs
Other components
- CLI User
- LLM Providers
- MCP Servers
Connections 22
- CLI User → Baize Agent: submits request
- Baize Agent → Configuration: loads settings
agent/Baize.py - Baize Agent → Conversation History: uses history
agent/Baize.py - Baize Agent → Privacy Filter: sanitizes messages
agent/Baize.py - Baize Agent → Model Backends: calls model
agent/Baize.py - Model Backends → LLM Providers: sends prompts
- Baize Agent → Tool Execution: invokes tools
agent/Baize.py - Tool Execution → Web Search and Fetch: includes web tools
agent/Baize.py - Baize Agent → Tasks and Todos: manages tasks
agent/Baize.py - Baize Agent → Skill Loading: loads skills
agent/Baize.py - Baize Agent → Subagents: delegates tasks
agent/Baize.py - Baize Agent → Tool Hooks: runs hooks
agent/Baize.py - Baize Agent → Command Sandbox: constrains commands
agent/Baize.py - Baize Agent → Context Compression: compresses context
agent/Baize.py - Baize Agent → MCP Client: initializes MCP
agent/Baize.py - MCP Client → MCP Servers: connects servers
agent/MCP/mcp_client.py - Baize Agent → Terminal UI: renders response
agent/Baize.py - Baize Agent → CLI User: returns response
- Design Context → Design System Analysis: loads design context
- UI Detector → Design System Analysis: loads design system
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/cli/main.mjs - UI Detector → Text Detection: scans text
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/cli/main.mjs - UI Detector → Static HTML Detection: scans HTML
agent/skills/impeccable-skill-v3.9.1/impeccable/scripts/detector/cli/main.mjs