CodeInterpreterResult¶
Structure Class¶
CodeInterpreterResult
dataclass
¶
The output produced by executing code in a code interpreter session in Amazon Bedrock AgentCore. This structure contains the results of code execution, including textual output, structured data, and error information. Agents use these results to generate responses that incorporate computation, data analysis, and visualization.
Attributes¶
content
instance-attribute
¶
content: list[ContentBlock]
The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
is_error
class-attribute
instance-attribute
¶
is_error: bool | None = None
Indicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.
structured_content
class-attribute
instance-attribute
¶
structured_content: ToolResultStructuredContent | None = None
The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.