How mammut001/pipi-shrimp-agent works
Pipi-Shrimp is a local-first AI desktop agent: users submit tasks in the React/Tauri app, the shared agent runtime streams provider responses and coordinates tool use, and results interact with local projects and persisted session state. Separate product branches support visual workflows, browser automation, AutoResearch, document skills, multi-agent collaboration, and Telegram access. README statements support the broad integration map; sampled source additionally shows the chat facade delegating turns to the session runtime and the workflow and AutoResearch entry points. Some internal wiring is unsampled, so those links are omitted.
Main entry points: App.tsx React app surfaces · queryLoop.ts Provider and tool loop · QueryEngine.ts Chat turn facade · registry.rs Tool execution
Components 22
Desktop application
- React app surfaces
src/App.tsx - Workflow surface
src/pages/Workflow.tsx - Browser workspace
src/components/CdpBrowserControllerPanel.tsx - AutoResearch page
src/pages/AutoResearch.tsx
Agent runtime
- Chat turn facade
src/core/QueryEngine.ts - Session runtime
src/core/runtime/SessionRuntime.ts - Provider and tool loop
src/core/runtime/queryLoop.ts - Provider configuration
src/services/agentConfig.ts
Product capabilities
- Project memory
src/services/contextAnalysis/engine.ts - Workflow engine
src/services/workflowEngine/engine.ts - Experiment loop
src/services/autoresearch/loopEngine.iterationPhase.ts - Document skills
src-tauri/skills/docx/scripts/document.py - Multi-agent collaboration
src/services/swarm/taskManager.ts
Native services
- Provider transport
src-tauri/src/claude/http/executor.rs - Tool execution
src-tauri/src/tools/registry.rs - SQLite persistence
src-tauri/src/database.rs - CDP browser runtime
src-tauri/src/browser/session/manager.rs - MCP integration
src-tauri/src/mcp/client.rs - Telegram access
src-tauri/src/commands/telegram.rs
Other components
- Desktop user
- Local environment
- LLM providers
Connections 25
- Desktop user → React app surfaces: submits tasks
README.md - React app surfaces → Chat turn facade: starts chat turns
README.md - Chat turn facade → Session runtime: delegates turns
src/core/QueryEngine.ts - Session runtime → Provider and tool loop: runs turn loop
- Provider and tool loop → Provider configuration: resolves configuration
src/core/runtime/queryLoop.ts - Provider and tool loop → LLM providers: streams requests
README.md - Provider and tool loop → Tool execution: dispatches tools
README.md - Provider and tool loop → Project memory: uses context
- React app surfaces → Workflow surface: opens workflow
src/App.tsx - Workflow surface → Workflow engine: starts workflow
- Workflow engine → Chat turn facade: runs agent turns
- React app surfaces → Browser workspace: opens browser workspace
src/App.tsx - Browser workspace → CDP browser runtime: controls browser
- Tool execution → CDP browser runtime: uses browser tools
- React app surfaces → AutoResearch page: opens research
src/App.tsx - AutoResearch page → Experiment loop: starts experiment run
- Experiment loop → Chat turn facade: uses agent runtime
- Tool execution → Document skills: invokes document skills
- React app surfaces → MCP integration: configures MCP
- Workflow engine → Multi-agent collaboration: coordinates agents
- Telegram access → Chat turn facade: provides remote access
- SQLite persistence → Local environment: persists project state
README.md - Tool execution → Local environment: operates on files and shell
README.md - CDP browser runtime → Local environment: controls desktop browser
README.md - Provider transport → LLM providers: sends provider requests