Skip to content

Add is_enabled to FunctionTool #808

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged

Add is_enabled to FunctionTool #808

merged 1 commit into from
Jun 3, 2025

Conversation

rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Jun 3, 2025

Summary:

Allows a user to do function_tool(is_enabled=<some_callable>); the callable is called when the agent runs.

This allows you to dynamically enable/disable a tool based on the context/env.

The meta-goal is to allow Agent to be effectively immutable. That enables some nice things down the line, and this allows you to dynamically modify the tools list without mutating the agent.

Test Plan:

Unit tests

towards #767

### Summary:
Allows a user to do `function_tool(is_enabled=<some_callable>)`; the callable is called when the agent runs.

This allows you to dynamically enable/disable a tool based on the context/env.
### Test Plan:
Unit tests
@rm-openai rm-openai merged commit 4046fcb into main Jun 3, 2025
10 checks passed
@rm-openai rm-openai deleted the rm/pr808 branch June 3, 2025 17:44
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