Skip to content

Enhance Agent Tool Execution Logging and Debugging#397

Merged
MervinPraison merged 1 commit intomainfrom
develop
Feb 28, 2025
Merged

Enhance Agent Tool Execution Logging and Debugging#397
MervinPraison merged 1 commit intomainfrom
develop

Conversation

@MervinPraison
Copy link
Copy Markdown
Owner

  • Added comprehensive debug logging for tool execution in LLM and Agent components
  • Improved display of tool call messages with more detailed information
  • Added logging for empty content and tool execution scenarios
  • Enhanced error handling and logging in display functions
  • Added new Anthropic LLM example script in src/praisonai-agents
  • Bumped version to 2.0.78 and updated praisonaiagents dependency to 0.0.63

- Added comprehensive debug logging for tool execution in LLM and Agent components
- Improved display of tool call messages with more detailed information
- Added logging for empty content and tool execution scenarios
- Enhanced error handling and logging in display functions
- Added new Anthropic LLM example script in src/praisonai-agents
- Bumped version to 2.0.78 and updated praisonaiagents dependency to 0.0.63
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request focuses on enhancing the logging and debugging capabilities for agent tool execution within the PraisonAI framework. It introduces more detailed logging for tool calls, including scenarios with empty content and tool execution, and improves error handling in display functions. Additionally, it adds a new example script for Anthropic LLM and updates the version of both the main PraisonAI package and the praisonaiagents dependency.

Highlights

  • Enhanced Debug Logging: Comprehensive debug logging has been added for tool execution in LLM and Agent components, providing more insights into the tool execution process.
  • Improved Tool Call Display: The display of tool call messages has been enhanced with more detailed information, making it easier to understand what tools are being called and their results.
  • Version Updates: The PraisonAI package has been bumped to version 2.0.78, and the praisonaiagents dependency has been updated to version 0.0.63.
  • New Anthropic LLM Example: A new example script demonstrating the use of Anthropic LLM has been added to the src/praisonai-agents directory.

Changelog

Click here to see the changelog
  • docker/Dockerfile
    • Updated praisonai dependency version from 2.0.77 to 2.0.78 in the Dockerfile.
  • docs/api/praisonai/deploy.html
    • Updated praisonai dependency version from 2.0.77 to 2.0.78 in the documentation's Dockerfile example.
  • praisonai.rb
    • Updated Praisonai formula version from 2.0.77 to 2.0.78.
  • praisonai/deploy.py
    • Updated praisonai dependency version from 2.0.77 to 2.0.78 in the create_dockerfile function.
  • pyproject.toml
    • Updated the main PraisonAI package version from 2.0.77 to 2.0.78.
    • Updated praisonaiagents dependency version from 0.0.62 to 0.0.63.
  • src/praisonai-agents/llm-anthropic.py
    • Added a new example script demonstrating the use of Anthropic LLM with the PraisonAI agent.
  • src/praisonai-agents/praisonaiagents/llm/llm.py
    • Added debug logging before and after tool execution to capture arguments and results (lines 441-443).
    • Enhanced the display of tool call messages to include both the arguments and the results, or a 'no output' message if the tool returns nothing (lines 446-455).
    • Added debug logging when verbose mode is off to indicate that the tool call is not being displayed (line 463).
  • src/praisonai-agents/praisonaiagents/main.py
    • Added logging for empty content received in _clean_display_content function (line 89).
    • Added logging to display_tool_call to trace the message being displayed and handle empty messages (lines 178-185).
    • Added logging for empty content in display_generating function (line 209).
    • Added logging to adisplay_tool_call to trace the message being displayed and handle empty messages (lines 301-308).
    • Added logging for empty content in adisplay_generating function (line 332).
  • src/praisonai-agents/pyproject.toml
    • Updated praisonaiagents package version from 0.0.62 to 0.0.63.
  • uv.lock
    • Updated praisonai version from 2.0.77 to 2.0.78.
    • Updated praisonaiagents version from 0.0.62 to 0.0.63, including updated sdist and wheel URLs and hashes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


In agents' realm, where tools reside,
Debugging logs, our faithful guide.
With verbose calls and messages clear,
We banish bugs and quell all fear.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@MervinPraison MervinPraison merged commit 7906703 into main Feb 28, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request enhances agent tool execution logging and debugging, improves the display of tool call messages, adds logging for empty content and tool execution scenarios, enhances error handling and logging in display functions, and includes a new Anthropic LLM example script. The version has been bumped to 2.0.78, and the praisonaiagents dependency has been updated to 0.0.63. Overall, the changes seem beneficial for improving the framework's usability and debuggability.

Summary of Findings

Merge Readiness

The changes appear to be well-structured and contribute positively to the project by enhancing logging and debugging capabilities. Given the absence of any CRITICAL or HIGH severity issues, the pull request seems to be in good shape for merging. However, it's advisable to have another team member review the changes, particularly the new Anthropic LLM example script, to ensure it aligns with the project's standards and coding practices. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.

shaneholloman pushed a commit to shaneholloman/praisonai that referenced this pull request Feb 4, 2026
Enhance Agent Tool Execution Logging and Debugging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant