> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# नतीजों और आइटम के साथ काम करना

> मैसेज, स्टेप, टूल और streamed items से Python रन टाइमलाइन बनाएँ।

`AgentRunResult` में स्थायी रन स्थिति, मैसेज, स्टेप, usage और लागत, चेतावनियाँ, समाप्ति के कारण और अंतिम आउटपुट शामिल हैं।

जवाब के टेक्स्ट के लिए `text_stream()` और provider तथा runtime items के लिए `item_stream()` उपयोग करें। Python items अभी dictionary के रूप में होते हैं, TypeScript के discriminated union `AgentItem` के रूप में नहीं।

```python theme={null}
for item in stream.item_stream():
    item_type = item.get("type")
    render_timeline_item(item_type, item)
```

provider-विशिष्ट dictionary access को एक application adapter के पीछे रखें, फिर बाद में दोबारा बनाने के लिए पूरा परिणाम सहेजें।

## संबंधित विषय

* [स्ट्रीमिंग](./agent-sdk-streaming.mdx)
* [लाइफ़साइकल हुक](./agent-sdk-lifecycle-hooks.mdx)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.