Creating your own tools
Write custom tool functions and use the `@tool` decorator to modify tool behavior.
In most production cases, you will need to write your own tools. Which is why we're focused on provide the best tool-use experience in Kern.
The rule is simple:
- Any Python function can be used as a tool by an Agent.
- Use the
@tooldecorator to modify what happens before and after this tool is called.
There are two main ways to create tools in Kern:
- Create a python function (optionally using the
@tooldecorator) - Create a Toolkit