Test agents before deploying
You can test your agents as you build them with th run
. This command helps you test and validate the output of your agents before deploying them to production.
Using th run
th run
The command syntax is as follows:
If there is only one configuration file in the current working directory, you can simply run:
The command will automatically detect and execute the single configuration file.
If there are multiple configuration files in the directory, you'll need to specify the file to run:
When you run th run
, Toolhouse's CLI sends a request to our agent streaming service with the configuration specified in the YAML file. The agent is executed with the specified configuration, and the results are streamed back to your terminal.
Output and Streaming
The th run
command streams the output as it comes from the agent. This output includes:
Calls to MCP servers
Responses from the agent
Example Use Case
Let's consider an example agent configuration file:
To test this agent, navigate to the directory containing the configuration file and run:
The th run
command will execute the agent and stream the output, allowing you to verify that it generates the expected product description.
Important Notes
th run
does not deploy your agent to production. To deploy your agent, use theth deploy
command.Make sure to test your agent thoroughly using
th run
before deploying it to ensure it behaves as expected.
Last updated