Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this recipe when one .NET service should classify or summarize incoming support tickets.

1. Install the SDKs

dotnet add package AI.Stats.Sdk
dotnet add package AI.Stats.AgentSdk

2. Define one internal lookup tool

var loadTicket = AgentSdk.DefineTool(new Tool(
    Id: "load-ticket",
    Description: "Load one support ticket by id.",
    Parameters: new Dictionary<string, object?>
    {
        ["type"] = "object",
        ["properties"] = new Dictionary<string, object?>
        {
            ["ticketId"] = new Dictionary<string, object?> { ["type"] = "string" },
        },
        ["required"] = new[] { "ticketId" },
    },
    Execute: (input, ctx) => Task.FromResult<object?>(new Dictionary<string, object?>
    {
        ["ticketId"] = "T-1042",
        ["severity"] = "medium",
        ["summary"] = "Customer cannot find preset routing settings.",
    })
));

3. Create and run the agent

var agent = AgentSdk.CreateAgent(new AgentDefinition
{
    Id = "ticket-triage-agent",
    Model = "openai/gpt-5.4-nano",
    Instructions = "Use tools when helpful and answer with a short triage summary.",
    Tools = new[] { loadTicket },
});

var result = await agent.Run(new RunOptions
{
    Input = "Review ticket T-1042 and summarize the next action.",
    Client = AgentSdk.CreateGatewayAgentClient(),
});

Console.WriteLine(result.Output);

When this recipe fits

  • the workflow sits inside one ASP.NET or worker service
  • your local runtime already knows how to fetch internal ticket state
  • you want a narrow agent loop before adding queues or approvals
Last modified on May 19, 2026