Skip to content

Conversation

samhita-alla
Copy link
Contributor

No description provided.

@samhita-alla
Copy link
Contributor Author

@kumare3 here’s a simple agent example with just tool calls, and it uses the openai agent sdk. this is an extension to your pb & j example. :)

return await spread_peanut_butter(bread, peanut_butter)


@function_tool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have to do this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean create a shadow function, what do we need to do to make it seamless?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cosmicBboy and i were talking about this. flyte.trace would work seamlessly here, but a task wouldn’t, mainly because both the task and the OpenAI tool decorators materialize the function into a dataclass, so stacking them in either order breaks things.

so we can propose two approaches: one using a task and the other using a trace. ultimately, it’ll be up to the user to choose, depending on whether the tool needs to run in a separate runtime. i know this puts the decision on the user, but i think it’s the most flexible option, unless we want to enforce the use of traces only.

Copy link
Contributor

@cosmicBboy cosmicBboy Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider creating light-weight utility functions in the flyte.ai namespace that serve as drop-in replacements for popular frameworks, e.g.

from flyte.ai.openai.agents import function_tool

@function_tool
@env.task
def my_tool(...): ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a follow up?

@kumare3 kumare3 merged commit 974fa5f into main Aug 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants