> ## 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.

# आउटपुट और पुनः प्रयास

> Final output validate करें, model calls दोबारा करें और पूरी हुई Ruby runs देखें।

जब आगे का Ruby कोड तयशुदा परिणाम संरचना की अपेक्षा करे, तो आउटपुट की जाँच करें। मॉडल के पुनः प्रयास अस्थायी अनुरोध विफलताओं को संभालते हैं। बाहरी प्रभाव वाले टूल में पुनः प्रयास स्पष्ट रूप से नियंत्रित और idempotent होने चाहिए।

## पुनः प्रयास कॉन्फ़िगर करें

```ruby theme={null}
agent = PhaseoAgentSdk.create_agent(
  id: "research-agent",
  model: "openai/gpt-5.4-nano",
  model_retry: PhaseoAgentSdk::ModelRetryConfig.new(
    max_retries: 3,
    base_delay_ms: 500,
    max_delay_ms: 4_000
  )
)
```

परिणाम में रन रिकॉर्ड, चरण, संदेश, सामान्यीकृत उपयोग, रुकने का कारण और अंतिम आउटपुट होते हैं।

```ruby theme={null}
result = agent.run(input: prompt, client: client)

puts result.output
puts result.run.status
puts result.usage[:total_tokens]
puts result.usage[:cost]
```

Budgets लागू करने के लिए [रोकने की शर्तें](./agent-sdk-stop-conditions.mdx) और recoverable failures का व्यवहार चुनने के लिए [त्रुटियाँ और समस्या-निवारण](./agent-sdk-observability.mdx) देखें।


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