Summary
Instead of adding a new field to the pydantic model for reasoner and constantly passing down the same data over and over (say, user_id, profile_url), it would be great if any type of data would be kept by the control plane and be accessed by any reasoner, skill or different agents without doing manual prop drilling.
Proposed solution
The ExecutionContext would allow to resolve any data that came to the /exec endpoint in the context payload part and store it. Calling get_current_context().some_custom_field would match any of the custom attached metadata and retrieve it. Similar to how memory works but static data that is available throughout the full execution.
Alternatives considered
Keep adding more fields to pydantic models and keep passing down at every app.call() callsite, manually enriching the payload to avoid repetition
Additional context
Sometimes you want to give information that won't be useful to AF but is when forwarding to another service (like Claude or OpenAI). Those extra fields can make or break a complex workflow
Summary
Instead of adding a new field to the pydantic model for reasoner and constantly passing down the same data over and over (say,
user_id,profile_url), it would be great if any type of data would be kept by the control plane and be accessed by any reasoner, skill or different agents without doing manual prop drilling.Proposed solution
The
ExecutionContextwould allow to resolve any data that came to the/execendpoint in thecontextpayload part and store it. Callingget_current_context().some_custom_fieldwould match any of the custom attached metadata and retrieve it. Similar to how memory works but static data that is available throughout the full execution.Alternatives considered
Keep adding more fields to pydantic models and keep passing down at every
app.call()callsite, manually enriching the payload to avoid repetitionAdditional context
Sometimes you want to give information that won't be useful to AF but is when forwarding to another service (like Claude or OpenAI). Those extra fields can make or break a complex workflow