Tools
any_agent.tools
a2a_tool(url, toolname=None, http_kwargs=None)
async
Perform a query using A2A to another agent.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The url in which the A2A agent is located. |
required |
toolname
|
str
|
The name for the created tool. Defaults to |
None
|
http_kwargs
|
dict
|
Additional kwargs to pass to the httpx client. |
None
|
Returns:
Type | Description |
---|---|
Callable[[str], Coroutine[Any, Any, str]]
|
An async |
Source code in src/any_agent/tools/a2a.py
ask_user_verification(query)
Asks user to verify the given query
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The question that requires verification. |
required |
search_tavily(query, include_images=False)
Perform a Tavily web search based on your query and return the top search results.
See https://blog.tavily.com/getting-started-with-the-tavily-search-api for more information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The search query to perform. |
required |
include_images
|
bool
|
Whether to include images in the results. |
False
|
Returns:
Type | Description |
---|---|
str
|
The top search results as a formatted string. |
Source code in src/any_agent/tools/web_browsing.py
search_web(query)
Perform a duckduckgo web search based on your query (think a Google search) then returns the top search results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The search query to perform. |
required |
Returns:
Type | Description |
---|---|
str
|
The top search results. |
Source code in src/any_agent/tools/web_browsing.py
send_console_message(user, query)
Send the specified user a message via console and returns their response.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The question to ask the user. |
required |
user
|
str
|
The user to ask the question to. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The user's response. |
Source code in src/any_agent/tools/user_interaction.py
show_final_output(answer)
Show the final answer to the user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
answer
|
str
|
The final answer. |
required |
show_plan(plan)
Show the current plan to the user.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
plan
|
str
|
The current plan. |
required |
visit_webpage(url)
Visits a webpage at the given url and reads its content as a markdown string. Use this to browse webpages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The url of the webpage to visit. |
required |