Quick start (Python)
Last updated
Last updated
In this guide you'll learn how to implement and use Toolhouse with just a few lines of code. For the purpose of this example, we'll build an assistant that can run the code it generates. We'll do so by using the Code interpreter tool from the Tool Store.
You can sign up for free by going to the . You can skip this step if you already signed up for Toolhouse.
You will need to generate an API Key in order to use Toolhouse with your code.
Go to the section in Toolhouse.
You'll find a field that says API Key Name. Give your API Key a name, then click Generate
Copy the API Key and save it where you save your secrets.
In this guide, we'll assume you have a .env
file. Save the API Key as TOOLHOUSE_API_KEY
in your environment file. This allows Toolhouse to pick up its value directly in your code.
In Toolhouse, tools are function definitions. In Toolhouse, tools can be local (meaning they run on your infrastructure, such as your cloud environment or just your laptop) or cloud (meaning they are executed in the Toolhouse Cloud, like one of the tools you can find in the Tool Store).
Go to the .
That's it! You just enabled a fully sandboxed Code Interpreter that can work on any LLM you wish to use.
Import the Toolhouse SDK in your project:
Then, simply instantiate the SDK and pass the tool definitions in your LLM call. Toolhouse will encapsulate the logic you usually need to pass the tool output back to the LLM, so you won't have to worry about writing boilerplate logic.
If you're not a Python developer but you want to use Toolhouse you
👋