Skip to main content
We’ll build a self-learning agent that can save insights to a knowledge base. The key concept: any function can become a tool.
custom_tool_for_self_learning.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Google API key

4

Run the example

Save the code above as custom_tool_for_self_learning.py, then run:
Full source: cookbook/00_quickstart/custom_tool_for_self_learning.py