Skip to content

How to handle long running tools #181

Closed
@db0sch

Description

@db0sch

Hello 👋

First, again, thanks for this gem. It's really a very elegant piece of work.

I have this (possibly stupid) question:

How would you handle a tool taking a long time to execute?
Let's say a tool that will perform a long API call or even calling another agent (that might take time to do its thing).

I would instinctively have this logic in a background job.
But then, I would like either:

  • the tool to wait before sending back a response to the LLM
  • or have the tool return something that says "processing"... and the LLM would hang in there, until I replace the tool response message with the actual response once it gets there.

If anyone has implemented this, I would be glad to know how you did this?
(maybe there is something obvious I'm not seeing)

I know this is not an issue per se. Sorry about this. Feel free to close it if it's not relevant.
But maybe It could lead to improving the Tool documentation to handle these kind of use cases.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions