How jetbrains/thinkrail works
ThinkRail is an agentic IDE built around the pi coding agent. The primary workflow is to open a project, work in an isolated workspace, chat with an agent that can use project tools, then inspect and review the resulting changes. The README also describes specs, skills, terminals, MCP, notifications, and native/browser delivery as important product capabilities. Several backend connections are documented rather than visible in the sampled source, so those edges cite the README; unsampled implementation details are not inferred.
Main entry points: ChatView.tsx Agent chat · panels Workspaces · server.ts Host server · agentSessionManager.ts Session manager
Components 20
IDE workbench
- Workbench shell
apps/web/src/shell/Shell.tsx - Workspaces
apps/web/src/panels - Agent chat
apps/web/src/chat/ChatView.tsx - Changes review
apps/web/src/panels/ChangesPanel.tsx - Resource renderers
packages/resource-renderers/src/host.tsx - Client state
apps/web/src/store/appStore.ts - Host transport
apps/web/src/transport/wireTransport.ts
Agent runtime
- Session manager
packages/server/src/agent/agentSessionManager.ts - Host server
packages/server/src/host/server.ts - Project persistence
packages/server/src/persistence/persistence.ts
Project capabilities
- Workspace terminals
packages/server/src/terminal/terminalManager.ts - Living specs
packages/spec-graph/core/query.ts - Subagent delegation
packages/pi-delegation/src/service.ts - MCP tools
packages/server/src/agent/mcp/engine.ts - Skills and workflows
packages/pi-thinkrail-workflow/index.ts - Attention notifications
apps/web/src/notifications/attentionNotificationEngine.ts
App delivery
- Native desktop
apps/desktop/src/index.ts - Browser CLI
apps/cli/src/index.ts
Other components
- Engineer
- Model provider
Connections 21
- Engineer → Workbench shell: opens IDE
README.md - Workbench shell → Workspaces: selects workspace
README.md - Workspaces → Agent chat: starts session
README.md - Agent chat → Host transport: sends requests
README.md - Host transport → Host server: calls host
README.md - Host server → Session manager: routes sessions
README.md - Session manager → Model provider: runs agent
README.md - Session manager → Project persistence: stores session data
packages/server/src/agent/agentSessionManager.ts - Workspaces → Workspace terminals: provides terminals
README.md - Workspaces → Changes review: shows changes
README.md - Changes review → Resource renderers: renders diffs
- Agent chat → Client state: reads session state
- Agent chat → Living specs: uses spec tools
README.md - Agent chat → Subagent delegation: delegates work
README.md - Agent chat → MCP tools: calls MCP tools
README.md - Agent chat → Skills and workflows: loads skills
README.md - Agent chat → Attention notifications: signals attention
README.md - Engineer → Native desktop: runs desktop app
README.md - Engineer → Browser CLI: launches browser app
README.md - Native desktop → Host server: embeds engine host
README.md - Browser CLI → Host server: opens same host
README.md