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

# उपयोग

> C# Agent SDK से tool loops, human review, retries और resumable agents चलाएँ।

## रनटाइम तैयार करें

Agent SDK package अभी NuGet पर उपलब्ध नहीं है। [Source से install करने के निर्देश](./agent-sdk-installation.mdx) देखें।

## त्वरित शुरुआत

```csharp theme={null}
using PhaseoAgentSdk;

var agent = AgentSdk.CreateAgent(new AgentDefinition
{
    Id = "quickstart-agent",
    Model = "openai/gpt-5.4-nano",
    Instructions = "Answer concisely and helpfully."
});

var result = await agent.Run(new RunOptions
{
    Input = "Give me one fun fact about cURL.",
    Client = AgentSdk.CreateGatewayAgentClient(),
});

Console.WriteLine(result.Output);
```

## इसमें शामिल सुविधाएँ

* `AgentSdk.CreateAgent(...)`
* `AgentSdk.DefineTool(...)`
* `AgentSdk.CreateGatewayAgentClient(...)`
* Phaseo `responses` API पर सीमित tool loop

## उन्नत runtime

C# में सत्यापन और अनुमोदन प्रतिनिधि, HITL और मैन्युअल टूल, प्रगति, फिर से संभाली जा सकने वाली त्रुटियाँ, दोबारा पढ़े जा सकने वाले async enumerables, स्टॉप हेल्पर, डायनामिक टर्न, संग्रहीत `NextTurnParams`, सामान्यीकृत उपयोग/लागत और `IStateAccessor` का समर्थन है।

## स्ट्रीमिंग और रद्द करना

`Agent.Stream(...)` और `Agent.ContinueStream(...)`, गेटवे के Responses SSE स्ट्रीम से `IAsyncEnumerable` के ज़रिए डेटा देते हैं। `TextStream()` या `FullStream()` पढ़ें और जुड़ा हुआ अनुरोध टोकन रद्द करने के लिए `Cancel()` कॉल करें। पूरे हुए चरणों में अनुरोध ID, प्रदाता मेटाडेटा, समाप्ति कारण, चेतावनियाँ, उपयोग और लागत सुरक्षित रहते हैं।

## संबंधित पेज

* [Agent SDK का परिचय](../agent-sdk/overview.mdx)
* [TypeScript Agent SDK](../typescript/agent-sdk.mdx)


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