Skip to content

[Question]: When to use FunctionTool vs a regular Python function #20392

@kpb

Description

@kpb

Question Validation

  • I have searched both the documentation and discord for an answer.

Question

I couldn't find this in the docs. In the latest version of the docs, the multi-agent report generation using agents as tools example (https://developers.llamaindex.ai/python/examples/agent/agents_as_tools/) uses plain old Python functions instead of wrapping them in a FunctionTool. What is the use-case for using a FunctionTool versus a Python function, and are there any gotchas with using one versus the other?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions