How openjiuwen-ai/icode works
iCode is a terminal application for configuring and orchestrating AI agents and workflows; it does not provide its own model. The main path is user input through the TUI or ACP interface, into session and turn orchestration, then configured model/tool execution, with results rendered in chat and file changes available for review or rollback. The graph also preserves documented capabilities for agent/model configuration, workflows, shell access, and trajectory inspection. Some service implementations were not sampled; their directory-level nodes and README-supported links reflect that evidence limit.
Main entry points: engine.py Agent engine · tui/app.py Terminal UI · cli/app.py CLI · panel.py Chat surface
Components 24
User interfaces
- CLI
src/chrys/app/cli/app.py - Terminal UI
src/chrys/app/tui/app.py - Chat surface
src/chrys/app/tui/widgets/chat/panel.py - ACP server
src/chrys/app/acp/server.py
Session orchestration
- Session manager
src/chrys/app/acp/session_manager.py - Event bus
src/chrys/foundation/events/bus.py - Agent engine
src/chrys/orchestration/engine/engine.py - Model client
src/chrys/kernel/client.py - Session persistence
src/chrys/service/state - Settings
src/chrys/foundation/config/settings_store.py
Agent services
- Agent and model profiles
src/chrys/service/profiles - Context management
src/chrys/service/context/manager.py - Hooks
src/chrys/service/hooks/manager.py - File mutation tracking
src/chrys/service/mutations/tracker.py - Workflow execution
src/chrys/service/workflows
User capabilities
- Rendered answers
src/chrys/app/tui/widgets/chat - Agent configuration
src/chrys/app/tui/screens/agents - Model profiles
src/chrys/app/tui/screens/models - Workflow monitor
src/chrys/app/tui/widgets/workflow - Diff and rollback
src/chrys/app/tui/screens/diff - Trajectory viewer
src/chrys/app/tui/widgets/trajectory - Integrated shell
src/chrys/app/tui/terminal
Other components
- User
- Configured model provider
Connections 25
- User → CLI: launches
README.md - CLI → Terminal UI: starts
src/chrys/app/cli/app.py - User → Terminal UI: interacts
README.md - User → ACP server: sends requests
- ACP server → Session manager: manages sessions
src/chrys/app/acp/server.py - Session manager → Agent engine: hosts
src/chrys/app/acp/session_manager.py - Terminal UI → Event bus: communicates through
src/chrys/app/tui/app.py - Agent engine → Event bus: subscribes to
src/chrys/orchestration/engine/engine.py - Agent engine → Settings: reads settings
src/chrys/orchestration/engine/engine.py - Agent engine → Model client: runs model calls
- Model client → Configured model provider: calls
- Agent engine → Session persistence: persists sessions
src/chrys/orchestration/engine/engine.py - Agent engine → Context management: builds context
- Agent engine → Hooks: dispatches hooks
- Agent engine → File mutation tracking: tracks changes
src/chrys/orchestration/engine/engine.py - User → Agent configuration: configures agents
README.md - User → Model profiles: configures models
README.md - User → Workflow execution: runs workflows
README.md - Workflow execution → Workflow monitor: reports progress
- Terminal UI → Chat surface: shows conversation
README.md - Chat surface → Rendered answers: renders answers
README.md - User → Diff and rollback: reviews changes
README.md - File mutation tracking → Diff and rollback: supplies change data
- User → Trajectory viewer: opens timeline
README.md - User → Integrated shell: opens shell
README.md