Add flyte-native Agent construct#1121
Open
cosmicBboy wants to merge 17 commits into
Open
Conversation
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
kumare3
reviewed
May 29, 2026
|
|
||
|
|
||
| @dataclass | ||
| class MemoryStore: |
Contributor
There was a problem hiding this comment.
we will eventually replace this with volumes right?
Contributor
Author
There was a problem hiding this comment.
yep! consider the MemoryStore stuff (and most of this module, in fact) as experimental.
kumare3
reviewed
May 29, 2026
| # falls back to the default ``auth_type="Pkce"`` and a Passthrough-only | ||
| # caller (e.g. a FastAPI app using ``init_passthrough``) trips the PKCE | ||
| # browser flow as soon as the first cluster-routed dataproxy call runs. | ||
| auth_kwargs = dict(self._session_config.auth_kwargs or {}) |
Contributor
Author
There was a problem hiding this comment.
Yep, recent changes in these module broke the passthrough auth logic in app serving. This is needed to be able to forward the session config to downstream remote calls
Contributor
Author
There was a problem hiding this comment.
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
kumare3
reviewed
May 29, 2026
| different approach. | ||
| """ | ||
| try: | ||
| import flyteplugins.hitl as hitl |
Contributor
There was a problem hiding this comment.
we should wait for flyte events?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a comprehensive suite of examples demonstrating how to use the
flyte.ai.agents.Agentsystem with Flyte, covering basic usage, durable memory, HITL approval, chat UI integration, and more. It also updates dependencies and removes an outdated SDK installation command. The examples are well-annotated and showcase key patterns for agent authoring, tool integration, memory persistence, human-in-the-loop workflows, and deployment.New agent examples and documentation:
README.mdtoexamples/agents/flyte_agent/explaining theAgentabstraction, main use cases, and how to author and deploy agents with Flyte.basic_agent.pyshowing a minimal agent with math and weather tools, demonstrating local execution and tool registration.agent_with_memory.pyillustrating how to persist agent memory across runs usingMemoryStore, including robust handling of concurrent updates.hitl_approval_agent.pyshowing how to require human approval for sensitive tools using theflyteplugins-hitlplugin and the@tool(requires_approval=True)decorator.agent_chat_ui.pydemonstrating how to serve an agent behind the built-in chat UI, including durable tool tasks and custom theming.Dependency and configuration updates:
uv pip installcommand for the Flyte SDK fromcodemode_durable_agent_ui.py(the examples now use more recent or built-in SDK versions).