How ryanstephen/lil-agents works
Lil Agents is a macOS menu-bar and Dock companion app: users click an animated character, chat in its themed terminal, and receive responses from a selected local agent CLI or OpenClaw gateway. The graph follows the documented interaction and the source-index references; several UI and controller implementation details are unsampled, so their links are limited to visible references or README statements.
Main entry points: AgentSession.swift Provider selection · WalkerCharacter.swift Walking characters · ShellEnvironment.swift Shell environment · LilAgentsApp.swift App and menus
Components 18
App and Dock
- App and menus
LilAgents/LilAgentsApp.swift - Character controller
LilAgents/LilAgentsController.swift - Dock visibility
LilAgents/DockVisibility.swift - Walking characters
LilAgents/WalkerCharacter.swift - Character view
LilAgents/CharacterContentView.swift
Chat Experience
- Popover terminal
LilAgents/TerminalView.swift - Visual themes
LilAgents/PopoverTheme.swift
Agent Sessions
- Provider selection
LilAgents/AgentSession.swift - Claude session
LilAgents/ClaudeSession.swift - Codex session
LilAgents/CodexSession.swift - Copilot session
LilAgents/CopilotSession.swift - Gemini session
LilAgents/GeminiSession.swift - OpenCode session
LilAgents/OpenCodeSession.swift - OpenClaw session
LilAgents/OpenClawSession.swift
Runtime Support
- Shell environment
LilAgents/ShellEnvironment.swift
Other components
- Mac user
- Installed agent CLI
- OpenClaw gateway
Connections 28
- Mac user → App and menus: uses
README.md - App and menus → Character controller: starts
LilAgents/LilAgentsApp.swift - App and menus → Visual themes: configures
LilAgents/LilAgentsApp.swift - App and menus → Walking characters: uses
LilAgents/LilAgentsApp.swift - Character controller → Walking characters: sets up
LilAgents/LilAgentsController.swift - Character controller → Dock visibility: checks visibility
LilAgents/LilAgentsController.swift - Walking characters → Popover terminal: opens chat
LilAgents/WalkerCharacter.swift - Walking characters → Provider selection: creates session
LilAgents/WalkerCharacter.swift - Walking characters → Visual themes: styles popover
LilAgents/WalkerCharacter.swift - Character view → Walking characters: renders
LilAgents/CharacterContentView.swift - Popover terminal → Visual themes: uses
LilAgents/TerminalView.swift - Provider selection → Claude session: creates
LilAgents/AgentSession.swift - Provider selection → Codex session: creates
LilAgents/AgentSession.swift - Provider selection → Copilot session: creates
LilAgents/AgentSession.swift - Provider selection → Gemini session: creates
LilAgents/AgentSession.swift - Provider selection → OpenCode session: creates
LilAgents/AgentSession.swift - Provider selection → OpenClaw session: creates
LilAgents/AgentSession.swift - Claude session → Shell environment: resolves environment
LilAgents/ClaudeSession.swift - Codex session → Shell environment: resolves environment
LilAgents/CodexSession.swift - Copilot session → Shell environment: finds CLI
LilAgents/CopilotSession.swift - Gemini session → Shell environment: sets environment
LilAgents/GeminiSession.swift - OpenCode session → Shell environment: finds CLI
LilAgents/OpenCodeSession.swift - Claude session → Installed agent CLI: runs locally
README.md - Codex session → Installed agent CLI: runs locally
README.md - Copilot session → Installed agent CLI: runs locally
README.md - Gemini session → Installed agent CLI: runs locally
README.md - OpenCode session → Installed agent CLI: runs locally
- OpenClaw session → OpenClaw gateway: connects by WebSocket
LilAgents/OpenClawSession.swift