Skip to content

Conversation

bhouston
Copy link
Member

AgentTracker Decoupling from backgroundTools

Description

This PR implements the decoupling of agent tracking from backgroundTools by creating a dedicated AgentTracker class. The implementation follows the technical details provided in issue #292.

Changes

  • Created new AgentTracker class in packages/agent/src/tools/interaction/agentTracker.ts
  • Implemented new listAgents tool in packages/agent/src/tools/system/listAgents.ts
  • Updated agentStart.ts to use the new AgentTracker
  • Modified backgroundTools.ts to delegate agent cleanup to AgentTracker
  • Updated tests to work with the new implementation

Implementation Notes

  • The implementation maintains backward compatibility by continuing to register agents with backgroundTools while also using the new AgentTracker
  • The AgentTracker provides a more focused API for tracking and managing agents
  • The listAgents tool provides similar filtering capabilities as listBackgroundTools but focused only on agents

Testing

  • All tests are passing
  • Manually verified that agent tracking works as expected

Resolves #292

Update the test to mock the new agentTracker module instead of agentStates.
This ensures the test correctly verifies that the backgroundTools.cleanupSubAgent
method properly delegates to agentTracker.terminateAgent.
@bhouston bhouston merged commit f037f14 into main Mar 18, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple Agent Tracking from backgroundTools
1 participant