Quick start: deploy your first agent
This guide will show you how to creating and deploy a new agent using the th
command line interface.
Initial setup
The CLI will need a Toolhouse API key. Type th login
to automatically get one. This command will open your default browser and ask you to log into Toolhouse or create a new account, if you haven't done so already.
Note: you will only need to run this command once.
Your API Key will be stored in the ~/.toolhouse
file.
Step 0: Create your th file
You can now create a Toolhouse agent file, or th file for short. A th file is a YAML file containing the setup for your agent. Type th new
to create a new agent file:
The CLI will create a hello.yaml
file in your current folder.
Step 1: Test your agent
You can test your agent by running it via th run
.
Running the agent will show the configuration parameters and will stream any MCP server calls and the final output. You can change the th file and run th run
again to see new results.
Once you're happy with the results, you can deploy your agent.
Step 2: Deploy your agent
You can deploy your agent by typing th deploy
. You agent will be deployed as an API with its own unique URL:
You will receive a URL similar to this:
You can simply call your agent as an HTTP POST
request, and it will stream the response using the configuration from your th file.
Last updated