[Open-source] Local codebase-based reasoning cycle, tool invocation, session collaboration desktop workspace
![[Open-source] Local codebase-based reasoning cycle, tool invocation, session collaboration desktop workspace](https://yy123.ink/api/img/1796372373989-lyxdec.png)
1. Project Overview
Loopra
Pure Java AI coding proxyFacing local code library's reasoning cycle, tool call, session collaboration, and desktop workbench.
Reasoning Cycle · Tool Call · Sub-Agent Collaboration · Dual-End Workbench
Loopra organizes user tasks, model reasoning, and controlled tool calls into continuous execution cycles: reading project context, searching, editing, or building code, consuming execution results and continuing reasoning until task completion or user decision-making.
2. Open Source License
Licensed under MIT
3. Screenshots
4. Feature Overview
Overview
Loopra organizes user tasks, model reasoning, and controlled tool calls into continuous execution cycles: it reads project context, searches, edits, or builds code, consumes execution results and continues reasoning until task completion or user decision-making.
Providing Web and Electron Desktop workbenches, suitable for completing development, debugging, testing, document organization, and multi-step collaboration in local code libraries.
Task -> Model Reasoning -> Tool Call -> Result Feedback -> Model Reasoning -> ... -> Completion
| Targeted Work |
Loopra's Capabilities |
| Handling Code Library Tasks |
File reading and writing, code retrieval, command execution, and API calls within the workspace |
| Maintaining Task Continuity |
JSONL Sessions, Context Folding, Goal, Checklist, and Project Memory |
| Secure Collaboration |
Tool Permission Classification, HITL Approval, Path Boundary Protection, and Independent Verification Models |
| Using Suitable Interfaces |
Web Management Interface and Desktop Workbench containing local processes, files, Git, and browsers |
Core Capabilities
| Capabilities |
Description |
| Autonomous Reasoning Cycles |
Streaming Output Reasoning, Tool Calls, and Results, Continuously Processing Multi-Round Tasks |
| Context Management |
JSONL Session Persistence, Automatic Summary Folding, Message Self-Recovery, and Token Usage Statistics |
| Multi-Model Channels |
Supporting Multiple Channels, Chat Completions API, OpenAI Responses API, Reasoning Strength, and Model Capability Configuration |
| Extensible Tool System |
Through Solon
@ToolMapping
Declarative Registration, Supporting Built-in Tools, MCP, OpenAPI, Skills, and REST API |
| Code Library Operations |
Reading, searching, editing files within workspace boundaries, running one-time or interactive commands |
| Sub-Agent Collaboration |
Built-in
explore、implement、test、review、plan
Five Roles, Supporting Isolation of Context, Permission Constraints, and Timeout Control; Configuration can be edited and persisted on the desktop, supporting selection of channel models |
| Scheduled Mode |
Input box one-key entry into read-only exploration, exploration completion submission of plan for user review, approval, and execution according to plan |
| Persistent Collaboration State |
Checklist, Session-Level Goal, Project Memory, and Shared Workspace Supporting Long-Tasks and Parent-Child Agent Collaboration |
| Approval and Boundary |
Three-State HITL, Tool Whitelist, Path Boundary Protection, and Optional Independent Verification Models |
| Desktop Workbench |
Electron Desktop provides multiple chat labels, Git/file panels, element inspection, service process management, and AI browser. |
Tools and Extensions
Tools are automatically discovered by Solon, can be enabled, disabled, and assigned to read-only or write categories in the tool management interface.
| Category |
Scenarios |
| File and Code Search |
read、write、edit、glob、grep、ls、java_source、codesearch |
| Commands and Network |
bash, interactive command sessions, webfetch, call_api |
| Task Collaboration |
sub_agent、checklist_*、goal_*、workspace_* |
| Project status |
memory
Save cross-session facts to
.loopra/loopra-memory.md; save shared workspace to
.loopra/workspace/ |
| Multimodal and Browser |
read_image, and desktop-visible AI browser's
browser_*
Tools |
MCP, OpenAPI, and skills can inject additional tools into Agent. read_image supports workspace paths, absolute paths, Base64/data URI, and HTTP(S) URL, with a maximum single image size of 5 MiB; when the current model has not declared imageInput capability, the tool will explicitly indicate that it is unavailable. browser_screenshot will return visible viewport screenshots and structured page snapshots, and interactive operations must use the corresponding snapshotId. Browser tools only operate on visible Desktop browsers; when encountering login, CAPTCHA, or security verification, Agent will request user takeover, and will not fill in or read sensitive credentials.
Sub-agents and Long-term Collaboration
Sub-agents are derived through sub_agent. explore, review, and plan are read-only roles; implement and test can execute authorized write operations. Each sub-agent has an independent reasoning context and can pass structured results via shared workspace.
Project Memory only saves stable and reusable project facts, such as architecture conventions, known limitations, and user preferences. Complex tasks can use session-level Goal to record steps, evidence, blocking reasons, and verification results; Checklist is used to display ordered execution progress.
Approval and Access Boundaries
hitl supports three execution modes:
| Mode |
Behavior |
| free |
All tools are executed directly. |
| approval |
Non-read-only tools wait for user approval before execution. |
| auto |
Whitelisted tools are automatically allowed, and other calls wait for approval. |
Configurable validationModel and validationModelChannelId allow independent models to evaluate high-risk tool calls before human approval. Regardless of the current mode or validation result, paths outside the workspace boundary still require human confirmation.
5. Tech Stack
From Source Code Development
Preconditions
-
JDK 17 -
Maven 3.9+ -
Node.js 18+ -
pnpm 8+
Build and Test
# Build backend modulemvn clean package# Run all backend testsmvn test# Only verify Web module and its dependent modulesmvn -pl loopra-web -am test
Frontend & Desktop
cd loopra-frontpnpm install# Start frontend development servicepnpm dev# Run frontend tests and buildpnpm test -- --runpnpm build# Start Electron development modepnpm dev:electron
Project Structure
loopra/├── loopra-model/ # Pure kernel (can be independently packaged): ChatModel client/protocol, AgentLoop/SubAgent reasoning cycle, tool abstraction & SPI (AgentConfig/GoalGuard, etc.), excluding any orchestration facilities├── loopra-harness/ # Tools equipment + orchestration facilities (can be independently packaged, dependent on loopra-model): LoopraAgent facade, built-in tools, Goal/Checklist/Workspace/Command/Session persistence/config, MCP/LSP/OpenAPI/Skill skill bridging, scheduled tasks├── loopra-acp/ # ACP support (can be independently packaged, dependent on loopra-harness): Register Agent as ACP Agent (stdio/WebSocket)├── loopra-web/ # Solon Web service, REST/SSE interface and packaging configuration (aggregate the above modules)├── loopra-front/ # Vue frontend & Electron Desktop├── intro/ # Official website content├── docs/ Project Documentation├── .release/ # Installation and release scripts├── .workflow/ # Old CI pipeline configuration (already migrated to GitHub Actions)└── .github/ # GitHub Actions build and release pipeline
# Module dependency relationship
loopra-model ← loopra-harness(LoopraAgent/Built-in tools/Goal/Workspace/MCP/Skill)↑└────────← loopra-acp(ACPRegister, through loopra-harness)loopra-web ←Aggregate loopra-harness + loopra-acp (pass in loopra-model)
loopra-model, loopra-harness, loopra-acp are all independent Maven modules, can be independently published for external services/tools reuse:
-
Only need basic ChatModel / AgentLoop reasoning kernel → dependent on loopra-model (excluding Goal/Workspace/Session persistence, etc. orchestration facilities, through SPI self-assembly) -
Need to use LoopraAgent out of box, built-in tools and Goal/Workzone/MCP/Skill → add dependency loopra-harness -
Need to expose Agent as ACP Agent → add dependency loopra-acp
Tech Stack
| Not the 'scaffolding self-bundled': |
Technology |
| Core |
Java 17、Solon 4.0.4、Snack4、OkHttp |
| Web |
Solon Web、Jetty、SSE、Knife4j |
| Frontend |
Vue 3、Vite、Pinia、Ant Design Vue |
| Desktop |
Electron、electron-builder |
| Protocol |
MCP、OpenAPI、ACP、Chat Completions API、Responses API |
| Persistence |
JSONL sessions, local JSON workspace, project Markdown memory |
6. Source Code Repository
Open-source project address:
https://github.com/ezdemo/loopra
Next steps