memorix icon indicating copy to clipboard operation
memorix copied to clipboard

Feature Request: Towards True Parallel Multi-Agent Development — Scheduling, Dashboard & File Locking

Open 1deaaa opened this issue 9 months ago • 5 comments

Hi developer!

I believe this project still has a lot of room for innovation when it comes to improving the productivity of multi-AI Agent parallel development.

  1. Parallel Scheduling Mechanism

I suggest supporting true parallel development across multiple AI IDEs. For example, a frontend Agent plans the interfaces, a backend Agent implements them simultaneously, and a testing Agent writes test cases in advance — all three coordinating through this tool.

To maximize parallel efficiency, I suggest introducing the following mechanisms:

1.1 Priority Scheduling — Automatically analyze dependencies between tasks and generate a DAG (Directed Acyclic Graph) to maximize the number of tasks that can run in parallel. This could be wrapped directly as an MCP tool, letting the Agent responsible for product planning generate it.

1.2 Contract-Based Collaboration — Agents first negotiate interface contracts (such as schemas, type definitions), then develop in parallel based on those contracts, achieving true decoupling.

1.3 Async Execution — For example, while the frontend Agent is waiting for the backend implementation, it can continue developing the next module based on the interface contract, and do validation and alignment once the real implementation is ready, avoiding idle waiting.

  1. Visual Progress Management Dashboard

A human-developer-friendly Dashboard is needed, which should at least include: each Agent's current task, progress, and blocking reasons; real-time visualization of task priorities or dependency graphs, so you can see at a glance what's running, what's blocked, and what's done; and real-time communication logs between Agents, making it easy for humans to understand the collaborative decision-making process.

  1. Edit Conflict Problem

When multiple Agents modify the same codebase in parallel, conflicts are inevitable. During the planning phase, each Agent must clearly specify which files it is allowed to work on, and explicitly show which files or folders are already occupied by other AIs, to prevent conflicting changes.

If these mechanisms can be implemented, they will greatly improve development efficiency in multi-AI IDE collaboration scenarios, truly achieving a multi-Agent pipeline-style parallel development experience.


你好,开发者!

我认为本项目在提升多 AI Agent 并行开发的生产力上,仍有很大的创新空间。

  1. 并行调度机制

建议支持多个 AI IDE真正并行开发。例如前端 Agent 规划接口,后端 Agent 同步实现,测试 Agent 提前编写用例,三者通过本工具进行协调通信。

为最大化并行效率,建议引入以下机制:

1.1 优先级调度 自动分析任务间的依赖关系,生成有向无环图,最大化可并行执行的任务数。这个可以直接包装成MCP工具,让负责产品规划的那个Agent生成。

1.2 契约协作 agent之间先协商接口契约(如 Schema、类型定义),再基于契约各自并行开发,实现真正的解耦。

1.3 异步 例如前端 Agent 在等待后端实现时,可基于接口契约继续开发下一模块,待真实实现就绪后再做校验对齐,避免空等。

  1. 可视化进度管理 Dashboard

需要一个对人类开发者友好的 Dashboard,至少应该包含这些信息:各 Agent 的当前任务、进度及阻塞原因;任务优先级,或者说依赖图的实时可视化,一眼看出哪些在跑、哪些被阻塞、哪些已完成;Agent 间的实时通信日志,便于人类理解 Agent 的协作决策过程。

  1. 编辑冲突问题

多 Agent 并行修改同一代码库时,冲突不可避免。在Agent的计划阶段,必须要明确标明每个Agent可以工作的文件范围是什么,明确地展示出已经被其他AI占用的文件或文件夹,防止冲突更改。

这些机制如果能落地,将极大提升多 AI IDE 协作场景下的开发效率,真正实现多 Agent 流水线式的并行开发体验。

Cheers ! --Mournight

1deaaa avatar Feb 25 '26 06:02 1deaaa

Thanks for the detailed writeup.

Some of these ideas overlap with what Memorix already does at a basic level:

  • Cross-agent session awareness: memorix_session_start / memorix_session_end already track which agent is working on what, and inject previous session context into new sessions. Any agent can see what other agents did via memorix_search.
  • Progress tracking: memorix_store supports a progress field with eature, status (in-progress/completed/blocked), and completion percentage. The Dashboard already visualizes this.
  • File-level awareness: observations track ilesModified, so agents can see which files were recently touched by other agents.

What Memorix does NOT do (and is outside its current scope as a memory layer):

  • DAG-based task scheduling / orchestration Memorix is a passive memory store, not an active scheduler. Task orchestration is better handled by a dedicated tool (e.g. Linear, custom DAG runner). Memorix can serve as the shared memory substrate that such a scheduler reads from / writes to.
  • File locking This is an OS/VCS-level concern. Git's merge conflict resolution already handles this for sequential edits. Real-time file locking across concurrent agents would need to live in the IDE layer, not in a memory MCP server.
  • Real-time inter-agent communication MCP is request/response, not pub/sub. For real-time agent-to-agent messaging, something like A2A protocol or a message queue would be more appropriate.

The Dashboard improvements (showing per-agent tasks, blocking reasons, dependency graphs) are interesting. The current Dashboard already has project switching and observation browsing, but a more task-oriented view could be added as a future iteration.

Keeping this open as a reference for future planning.

AVIDS2 avatar Mar 06 '26 14:03 AVIDS2

This is a real problem. Running multiple AI agents in parallel on the same codebase without coordination leads to constant merge conflicts and wasted work.

What works in practice: git worktrees. Each agent gets its own worktree (same repo, different working directory) so they can edit files independently without stepping on each other. A central scheduler assigns tasks based on a dependency graph - independent tasks go to different agents, dependent tasks get serialized.

For the file locking mechanism, lightweight advisory locks (like creating a .lock file) work better than mandatory OS-level locks. The lock file can contain the agent ID and task description, so when an agent encounters a lock it knows who has it and whether to wait or work on something else.

For the dashboard, the simplest approach that actually works is a shared log file or SQLite database that each agent writes status updates to - task started, file modified, task completed. A simple web UI reads from this to show real-time progress.

m13v avatar Mar 13 '26 01:03 m13v

We run parallel Claude agents with git worktrees daily for Fazm (https://fazm.ai/gh). The orchestration setup is documented here: https://github.com/m13v/tmux-background-agents/blob/main/SKILL.md

The coordination patterns (CLAUDE.md as shared config, advisory locking) have been battle-tested across several projects.

m13v avatar Mar 13 '26 01:03 m13v

Interesting patterns git worktrees + advisory locking is solid for parallel agent isolation.

Memorix already ships team coordination tools that overlap with some of what you described:

  • ** eam_file_lock** advisory file locks (lock/unlock/status), auto-release after 10min TTL. Lock metadata includes agent ID and context, so other agents can decide whether to wait or pick a different task.
  • ** eam_task** shared task board with dependency tracking. Agents can create/claim/complete tasks, and the board serializes dependent work automatically.
  • ** eam_message** cross-agent messaging (direct, broadcast, typed messages like request/response/error).
  • ** eam_manage** agent registry with roles and capabilities.

All backed by a single eam-state.json file, no external DB needed. The dashboard shows real-time team status too.

The git worktree orchestration layer is a different concern though Memorix is a memory/coordination bridge, not a task scheduler. Tools like yours handle the process-level orchestration, Memorix handles the knowledge-level coordination. They're complementary rather than competing.

AVIDS2 avatar Mar 13 '26 15:03 AVIDS2

Implemented in Phase 7 (v1.0.7) the orchestrator now supports parallel multi-agent scheduling with worktree isolation, capability-based routing, verify gates, fix loops, and agent fallback. Run memorix orchestrate --agents claude:2,codex:1,gemini:1 --parallel 4 --goal '...' to use it.

AVIDS2 avatar Apr 14 '26 14:04 AVIDS2