Skip to content

Conversation

@cape2333
Copy link

@cape2333 cape2333 commented Dec 23, 2025

Description

PR for issue3401
Add a shell_exec_use_toolkit_via_code in terminal_toolkit.py to support agent write and execute code use toolkit. Reduce token usage by updating shell_exec_use_toolkit_via_code docstrings to facilitate prompt-driven toolkit code execution.

Status: Prompt-based multi-toolkit orchestration with Claude Sonnet 4.5 is currently ineffective.

Reason: The docstring-generated tool schema fails to include necessary context for toolkit imports.

Plan:

  1. Add dynamic context to shell_exec_use_toolkit_via_code for better agent guidance.
  2. Use tool list search to minimize tool definition context usage.

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed:
  • I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 23, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cape2333 cape2333 marked this pull request as draft December 23, 2025 16:09
@lightaime
Copy link
Member

Thanks @cape2333 for pull request. We do hava a plan to implement programmatic tool calling. It seems there is a problem in the current implementation. How does the agent actually get the context of camel toolkit and write correct code? It seems there are some hallucinations in the example code.

@cape2333
Copy link
Author

@lightaime Thank you for your reply. There were indeed hallucinations in the previous implementation. I push a new commit. This commit have significantly reduced them by having the terminaltoolkit inject the imports and method information of the camel toolkit during the register_agent phase. I tested about 3 examples, and all of them solve the problem with just a single shell_exec_use_toolkit_via_code tool call.

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.

2 participants