Skip to main content
Agentor simplifies the tool use process by automatically generating the tool schema from the function definition, parsing the function signature, and calling the function when required. To create an Agent with access to external tools or APIs, you need to define a function and decorate it with the @function_tool decorator.
agent.run(...) returns a RunResult, and printing it prints the answer:
The result also carries the evidence — result.status, result.usage, and result.tool_calls show how the agent got there. See Monitoring agents. In the next section, we will learn about how to build and use MCP Servers with Agentor.
Last modified on July 29, 2026