Skip to main content

Builtin Tools

Ailoy provides several builtin tools that can be used out-of-the-box without having to define tool descriptions or functions.

See Tutorials > Using Tools > Using Builtin Tools for how to use builtin tools in detail.

terminal

Executes a command on the current system using the default shell. (bash for UNIX-based OS and powershell for Windows).

info

This tool is not available on web environments.

Arguments

NameTypeDescriptionRequired
commandstringThe command to execute.
cwdstringOptional working directory.
envobjectOptional environment variables as key-value pairs.
stdinstringOptional string to send to STDIN.

Returns

NameTypeDescription
stdoutstringstdout of the executed command.
stderrstringstderr of the executed command.
exit_codenumberExit code of the executed command.

web_search_duckduckgo

Search webpages using DuckDuckGo and return formatted results.

info

This tool may not work in web environments due to CORS restrictions. To avoid this issue, configure your requests to pass through a proxy server that forwards the call to the original DuckDuckGo endpoint. See the example proxy server implementation in our test codes.

Configuration

NameTypeDescriptionDefault
base_urlstringBase URL to send the requesthttps://html.duckduckgo.com/html
requests_per_minutenumberMaximum number of requests per minute60

Arguments

NameTypeDescriptionRequired
querystringThe search query string
max_resultsnumberMaximum number of results to return (default: 10)

Returns

NameTypeDescription
resultsstringFormatted results in a single string

web_fetch

Fetch and parse content from a webpage URL.

info

Most of the public webpages may not be accessible directly from web environments due to CORS restrictions. To avoid this issue, configure your requests to pass through a proxy server that forwards the call to the original URL provided via url query parameter. See the example proxy server implementation in our test codes.

Configuration

NameTypeDescriptionDefault
proxy_urlstringProxy URL to send the request. The proxy server should proxy the requests to original url in query parameter.None
requests_per_minutenumberMaximum number of requests per minute60

Arguments

NameTypeDescriptionRequired
urlstringThe webpage URL to fetch content from

Returns

NameTypeDescription
resultsstringParsed web contents