Skip to content

Add colored console output for agent logs #330

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
bhouston opened this issue Mar 20, 2025 · 2 comments · Fixed by #331
Closed

Add colored console output for agent logs #330

bhouston opened this issue Mar 20, 2025 · 2 comments · Fixed by #331
Labels

Comments

@bhouston
Copy link
Member

Add colored console output for agent logs

Description

Currently, console output for agents and their tools is colored based on log level (error, warn, info, debug), but there's no way to visually distinguish between different agents and their tools. This makes it difficult to follow the execution flow when multiple agents are running in parallel.

Proposed Solution

Modify the consoleOutputLogger function to assign a unique color to each agent, and have tools inherit their parent agent's color. This will make it easier to follow the execution flow of each agent and its tools in the console.

  • Each agent should be assigned a random color when created
  • Tools should inherit their parent agent's color
  • Error and warning messages should still be red and yellow respectively, as these colors should be reserved for indicating severity
  • The color should be stored in the Logger class and used when outputting messages to the console

Benefits

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

Implementation Details

  • Add a color property to the Logger class
  • Modify the consoleOutputLogger function to use the agent's color for output
  • Generate random colors for agents in the agentStart tool
  • Have tools inherit their parent's color
Copy link

🎉 This issue has been resolved in version mycoder-agent-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version mycoder-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

1 participant