When defining a custom AgentState, the additional fields are not accessible during streaming updates.
Minimal reproducible example:
class MyAgentState(AgentState):
cv_text: str = ""
cid: str = ""
jd_text: str = ""
jd_id: str = ""
During agent execution, when using streaming responses, only the default fields are included.
The custom fields (cv_text, cid, jd_text, jd_id) do not appear in the streamed state updates.
Expected Behavior
- All fields declared in the custom
AgentState should be included in the streaming payload.
- The streaming state should fully reflect the extended model.
Actual Behavior
Why This Matters
These custom fields are required for:
- Reference data through the agent lifecycle
- Debugging and introspection
- Downstream consumers relying on full state in streaming mode
Steps to Reproduce
- Create a custom
AgentState with extra fields.
- Run an agent with streaming enabled.
- Inspect streamed events → the extra fields are not included.
When defining a custom
AgentState, the additional fields are not accessible during streaming updates.Minimal reproducible example:
During agent execution, when using streaming responses, only the default fields are included.
The custom fields (
cv_text,cid,jd_text,jd_id) do not appear in the streamed state updates.Expected Behavior
AgentStateshould be included in the streaming payload.Actual Behavior
While running the agent with streaming enabled:
AgentStatefields are streamed.Why This Matters
These custom fields are required for:
Steps to Reproduce
AgentStatewith extra fields.