Skip to content

Conversation

bhouston
Copy link
Member

Add colored console output for agent logs

Description

This PR adds colored console output for agent logs, making it easier to distinguish between different agents and their tools in the console. Each agent is assigned a unique color, and their tools inherit that color, providing a clearer visual hierarchy.

Changes

  • Added a color property to the Logger class
  • Modified the consoleOutputLogger function to use the agent's color for output
  • Added a function to generate random colors for agents
  • Updated the agentStart tool to assign a random color to each new agent
  • Tools now inherit their parent agent's color

Benefits

  • Improved readability of console output
  • Easier to track the execution flow of multiple agents and their tools
  • Better visual distinction between different agents

Testing

  • All tests are passing
  • Manually verified that agents and their tools use consistent colors
  • Verified that error and warning messages still use red and yellow respectively

Fixes #330

@bhouston bhouston merged commit 7535f0f into main Mar 20, 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 📦🚀

Copy link

🎉 This PR is included in version mycoder-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.

Add colored console output for agent logs
1 participant