Downcity
Integration Patterns

Multiple Agents in One Repo

Use multiple agentIds to isolate different SDK Agents in the same project directory

Multiple Agents in One Repo

If you create several local SDK Agents inside the same project directory, the most important rule is:

  • give each agent a stable and different id

For example:

new Agent({ id: "planner", path: repoPath, tools: {} });
new Agent({ id: "reviewer", path: repoPath, tools: {} });

That keeps their sessions in different directories instead of mixing them together.

This is especially useful when one repository needs several agents with different roles.