

The text-to-image tool we have been using since the beginning is a remote tool that lives in 
huggingface-tools/text-to-image! We will
continue releasing such tools on this and other organizations, to further supercharge this implementation.
The agents have by default access to tools that reside on huggingface-tools.
We explain how to you can write and share your tools as well as leverage any custom tool that resides on the Hub in following guide.
Code generation
So far we have shown how to use the agents to perform actions for you. However, the agent is only generating code
that we then execute using a very restricted Python interpreter. In case you would like to use the code generated in 
a different setting, the agent can be prompted to return the code, along with tool definition and accurate imports.
For example, the following instruction
python
agent.run("Draw me a picture of rivers and lakes", return_code=True)
returns the following code
thon
from transformers import load_tool
image_generator = load_tool("huggingface-tools/text-to-image")
image = image_generator(prompt="rivers and lakes")