[FEATURE] Enable writable agent state and properties within hooks #1604
Unanswered
nagabharann
asked this question in
Q&A
Replies: 1 comment
-
|
@nagabharann what properties are you looking to update? All hooks get access to the Agent and thus any writable properties on the agent are writable from hooks. What properties are missing that you'd like to write. Any properties encompassed in a snapshot I think would be achievable via #1138 but I want to ensure that there's not something that's missing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
Agent state can only be modified outside of hooks (before agent.prompt()). Properties are also read-only within hooks. This prevents us from implementing pause/resume functionality and dynamic agent behavior modification from within hook handlers.
Proposed Solution
Provide a mechanism to modify agent state and properties from within hook handlers. This could be through:
Use Case
We are building pause/resume functionality for long-running agents. When resuming a paused agent, we need to:
Without writable state in hooks, we cannot implement this pattern cleanly.
Alternatives Solutions
We currently recreate agents from scratch when resuming, which is inefficient and loses runtime context that isn't serialized.
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions