Tools
What are tools?
Tools are a way to extend the capabilities of your AI agent.
Real-life use cases for tools:
- Search the web to gather the latest news about a company or topic.
- Browse a specific web page to extract information for a report.
- Execute a SQL query to fetch monthly sales data from a company database.
- Search in a vector database to find similar documents or images based on content.
- Send an email to a prospect after identifying information about their company online.
Tools have two forms:
| Type | Description |
|---|---|
| Hosted Tools | WorkflowAI-built tools (web search, browser). Hosted tools do not require any code or engineering effort. |
| Custom Tools | Developer-defined tools. Custom tools will require you to write code to handle the tool calls. |
Here is a comparison of hosted tools and custom tools to help you decide which is best for your use case:
| Hosted Tools | Custom Tools |
|---|---|
| ✅ Works out of the box with no setup or code required. ✅ Billing is integrated. ❌ Limited to the tools available. ❌ No customization possible. | ✅ Fully customizable to your needs. ✅ Can integrate with any system. ✅ Billing can be integrated for your custom tool. ❌ Need to manage API keys and billing for each tool (when relevant). ❌ Requires engineering effort. |
What hosted tools are available?
WorkflowAI currently supports tools for:
- Web search: using Google and Perplexity
- Browser: using a text-based browser
How to use hosted tools?
From code
To add a hosted tool to your agent, find the tool name (@tool) and add it to your agent prompt.
For example, to use the @google-search tool, you can add the following to your agent prompt:
messages = [
{
"role": "system",
"content": "Use @google-search to find the weather in {{location}}."
},
]WorkflowAI will automatically add the tool mentioned in the tools parameter sent to the LLM.
From the Playground
[TODO: adjust when the proxy playground is available with tools]
Tools can be added in the Playground by either:
- Describing the use case to the playground chat agent
- Under "Version" tap on the tools you want to enable.
[TODO: video how to add a tool from the playground]
Web search
WorkflowAI supports two web search tools:
@google-searchmakes a web search using Google@perplexity-sonar-promakes a web search using Perplexity's Sonar Pro model
messages = [
{
"role": "system",
"content": "Use @google-search to find the weather in {{location}}."
}
]messages = [
{
"role": "system",
"content": "Use @perplexity-sonar-pro to summarize the latest news about {{topic}}."
}
]TODO: clarify that tools are used for web search
Looking into prompt details for a run it seems there is some observability on the google search Do you have some doc about it ? What is generating the sweb search query ?
Browser (text-only)
Use the tool @browser-text to extract text from a web page.
messages = [
{
"role": "system",
"content": "Use @browser-text to extract the company name, number of employees, and email address from {{company_url}}."
}
]All tools
TODO: make a table with all the tools using the /v1/tools/hosted endpoint
List hosted tools programmatically
You can list all the hosted tools programmatically:
- by calling the
list_hosted_toolstool from the MCP server - by calling the
/v1/tools/hostedendpoint (no authentication required)
curl -X GET "https://api.workflowai.com/v1/tools/hosted" \
-H "accept: application/json" \Custom tools
From code
WorkflowAI is fully compatible with the tools parameter from the OpenAI chat.completions API, so you can use your existing code without modification.
For more details, refer to OpenAI's documentation on tools and function calling.
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current temperature for a given location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and country e.g. Bogotá, Colombia"
}
},
"required": [
"location"
],
"additionalProperties": False
},
"strict": True
}
}]
completion = client.chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "What is the weather like in Paris today?"}],
tools=tools
)
print(completion.choices[0].message.tool_calls)Supported parameters
[TODO: @guillaq]
strict
How is this guide?