-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
Description
Refactor agentStart.ts and agentMessage.ts to remove global agentStates
Description
The agent package currently uses a globally declared agentStates
Map in agentStart.ts
which is redundant since we already have the agentTracker
that's passed into the execute
function as part of the context. This refactor will remove the global agentStates
and update both agentStart.ts
and agentMessage.ts
to use the agentTracker
exclusively.
Why
- Removes redundant state management
- Simplifies the code
- Makes the agent state management more consistent
- Reduces potential for bugs from having state in two places
Implementation Details
- Remove the global
agentStates
Map fromagentStart.ts
- Update
agentStart.ts
to useagentTracker
exclusively - Update
agentMessage.ts
to useagentTracker
instead of importingagentStates
- Update any tests that rely on the global
agentStates
Acceptance Criteria
- All functionality remains the same
- All tests pass
- Build completes successfully
- No global state is used for agent tracking