api_calls | array[dict] | Any Writer API calls that the agent made at this block, including the request and the response. For example, API calls from a Text generation block to the Writer chat completions endpoint. | [{'request': {'method': 'POST', ...}, 'response': {'status_code': 200, ...}}] |
call_stack | dict | The call stack of the agent. The key is the index of the block in the call stack and the value is the block ID. | {0: "123abc", 1: "456def"} |
context | dict | The ID of the block that triggered the blueprint execution and the event that triggered it. | {'target': '123abc', 'event': 'wf-click'} |
httpx_requests | array[dict] | Any HTTP requests that the agent made at this block, including the request and the response. | [{'request': {'method': 'POST', ...}, 'response': {'status_code': 200, ...}}] |
item | Any | An individual item in a For-each block loop. The type of the item varies based on the values provided to the For-each block. For a dictionary, this is the value of the item. For a list, this is the item itself. | file123 |
itemId | str | The ID of the individual item in a For-each block loop. For a list, this is its index in the loop, starting at 0. For a dictionary, this is the key of the item. | 0 |
message | str | The error message if a block failed with an error. | "Invalid input: age must be a number" |
result | varies | The result of the preceding block. The type of the result varies based on the block. | Thank you so much for your wonderful review! We're thrilled to hear that you've found the perfect tailored blazer with us. |
results | dict | The full list of results from all blocks in the blueprint. It’s a dictionary where the key is the block ID and the value is the result of the block. If the block hasn’t run yet, the value is null. | {'123abc': 'Thank you so much...', '456def': '%Generating response...', '789ghi': null} |
session | dict | Session information, such as the session ID, cookies, headers, and user information. | {'id': '123', 'cookies': {...}, 'headers': {...}, 'userInfo': {}} |
state | dict | The agent’s state variables. | {'user_name': 'John', 'persona': 'sales'} |
target | str | The ID of the next block to run. | '123abc' |
ui | object | The UI of the agent as a WriterUIManager object. This is a Python object that allows you to interact with the UI of the agent via custom code. | |