-
Notifications
You must be signed in to change notification settings - Fork 77
Refactor: Auto-inject Agent State Schemas and simplify agent configuration API #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
Signed-off-by: Roberto Rodriguez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for your efforts on this! I love the idea of having the state implementation unified for agents and orchestrators and make things easier on us to maintain 🙌 🌟
few comments so far, but yeah I'm curious for your thoughts on. What are the benefits of the factory/coercer setup vs just having a static state class for agents and another for orchestrators that are slightly diff but use the same underlying storage base class? Would that be easier than this approach?
… import and clarify bundle override logic Signed-off-by: Roberto Rodriguez <[email protected]>
sicoyle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add the inline comment on the github comment above and then i am good with this one. Thank youuuu!!
Signed-off-by: Roberto Rodriguez <[email protected]>
Overview:
This PR eliminates unsafe user-facing schema customization by auto-injecting the correct state model bundle based on agent/orchestrator type. Users now provide only storage configuration, and the framework automatically selects the appropriate schemas (
AgentWorkflowStatefor agents,LLMWorkflowStatefor orchestrators), preventing runtimeAttributeErrorcrashes from incompatible custom schemas.Key Changes:
StateModelBundleabstraction to encapsulate state schemas and hook functions with validation guardsAgentStateConfigAPI by removing exposedstate_model_clsandmessage_model_clsfields that allowed unsafe customizationdefault_bundleparameter usingTYPE_CHECKINGto prevent circular importsdapr_agents.workflow.orchestrators→dapr_agents.agents.orchestrators)pubsub_config=,state_config=prefixes)