Glytos 0.5.0

dotnet add package Glytos --version 0.5.0
                    
NuGet\Install-Package Glytos -Version 0.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Glytos" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Glytos" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Glytos" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Glytos --version 0.5.0
                    
#r "nuget: Glytos, 0.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Glytos@0.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Glytos&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Glytos&version=0.5.0
                    
Install as a Cake Tool

Glytos

CI NuGet License

The official Glytos server SDK for .NET.

Call the Glytos API from your backend with an API key. Build agents once and run them as text or as voice: hold a threaded conversation, stream a reply as it is written, place phone calls, mint browser web-call tokens, manage numbers, and verify webhooks. Targets net8.0 and netstandard2.0.

Never ship an API key to the browser. For in-browser voice, use the @glytos/web package with a short-lived token you mint here.

Install

dotnet add package Glytos

Quickstart

using Glytos;

using var glytos = new GlytosClient("gly_...");

// List your agents
var agents = await glytos.Agents.ListAsync();

// Talk to one as text
var thread = await glytos.Threads.CreateAsync(agents[0].Uuid);
var run = await glytos.Threads.Runs.CreateAsync(thread, "What are your opening hours?");
Console.WriteLine(run.GetProperty("messages")[0].GetProperty("content").GetString());

// Or mint a web-call token and talk to the same agent in the browser
var token = await glytos.Calls.WebTokenAsync(workflowUuid: agents[0].Uuid);
Console.WriteLine($"{token.Token} {token.WsUrl}");

Streaming

A long answer should not arrive as one silent wait:

await foreach (var e in glytos.Threads.Runs.StreamAsync(thread, "Summarise the policy"))
{
    if (e.Type == "token") Console.Write(e.Delta);
    if (e.Type == "done") Console.WriteLine();
}

Per-turn instructions

Extra context for one turn only, applied below the agent's own instructions and never saved to it:

await glytos.Threads.Runs.CreateAsync(
    thread,
    "Rate this transcript",
    instructions: "Score 1-5 and reply as JSON.");

Scope the client to an environment or a regional stack, or hand it an HttpClient (e.g. from IHttpClientFactory) via options:

using var glytos = new GlytosClient("gly_...", new GlytosClientOptions
{
    Environment = "prod",
});

var overview = await glytos.RequestAsync<JsonElement>("GET", "/analytics/overview");

Resources

Property Methods
glytos.Agents (alias Workflows) ListAsync, RetrieveAsync, CreateAsync, RenameAsync, PublishAsync, PromoteAsync, DuplicateAsync, ArchiveAsync, DeleteAsync, TemplatesAsync, ExportAsync, MoveToFolderAsync, RemoveFromFolderAsync, VersionsAsync, StartSessionAsync, SendMessageAsync, StreamMessageAsync, RunTextAsync
glytos.Threads CreateAsync, RetrieveAsync, Messages.CreateAsync, Messages.ListAsync, Runs.CreateAsync, Runs.StreamAsync
glytos.Folders ListAsync, CreateAsync, RenameAsync, DeleteAsync
glytos.Imports SourcesAsync, CreateAsync, ConnectAsync, PullAsync, AssistantAsync
glytos.Chat TokenAsync, MessagesAsync, StreamAsync, UploadFileAsync
glytos.Calls CreateAsync, ListAsync, RetrieveAsync, WebTokenAsync, ControlAsync, SayAsync, TransferAsync, EndAsync
glytos.PhoneNumbers SearchAsync, ListAsync, ProvisionAsync, ImportNumberAsync, InstantAsync, AssignAsync, ReleaseAsync, ProvidersAsync
glytos.SipTrunks PresetsAsync, ListAsync, CreateAsync, UpdateAsync, DeleteAsync, TestAsync
glytos.KnowledgeBase ListDocumentsAsync, CreateDocumentAsync, UploadDocumentAsync, RetrieveDocumentAsync, DeleteDocumentAsync, SearchAsync
glytos.VectorStores ListAsync, CreateAsync, RetrieveAsync, DeleteAsync, UploadDocumentAsync
glytos.Tools ListAsync, CreateAsync, UpdateAsync, DeleteAsync, DiscoverMcpAsync
glytos.Campaigns ListAsync, CreateAsync, RetrieveAsync, UpdateAsync, UnscheduleAsync, DuplicateAsync, ExportAsync, StartAsync, StopAsync, DeleteAsync, AddContactsAsync, SyncContactsAsync, PreviewSuppressionAsync
glytos.Dnc ListAsync, AddAsync, ImportAsync, SetScopeAsync, RemoveAsync
glytos.Integrations ListAsync, RunAsync, Connections.ListAsync, Connections.CreateAsync, Connections.UpdateAsync, Connections.DeleteAsync, Connections.RunAsync
glytos.Automations ListAsync, CreateAsync, UpdateAsync, DeleteAsync, RunsAsync, TestAsync
glytos.TestSuites ListAsync, CreateAsync, DeleteAsync, RunAsync
glytos.Sessions ListAsync
glytos.Analytics OverviewAsync
glytos.Billing CreditsAsync, TransactionsAsync, UsageAsync
glytos.Environments ListAsync
glytos.Providers ListAsync, ResourcesAsync
glytos.ApiKeys ListAsync, CreateAsync, DeleteAsync
glytos.Organizations RetrieveAsync, UpdateAsync, RegionsAsync
glytos.Webhooks ListAsync, CreateAsync, UpdateAsync, DeleteAsync, EventsAsync, DeliveriesAsync, RedeliverAsync, Verify

Agents and Workflows are the same resource under two names: the product calls them agents, the API path is /workflows. Either works.

Text and voice are separate

An agent is one definition. Nothing forces it to do both:

  • A text agent needs only Threads (or Chat for a browser widget).
  • A voice agent adds Calls, PhoneNumbers and Campaigns.
  • The same agent can do both, if you want it to.

Any endpoint without a dedicated helper is one call away with glytos.RequestAsync<T>(method, path, body, query), or glytos.StreamAsync(method, path, body) for a Server-Sent Events one.

Outbound calling

A campaign dials a list of contacts with one agent. Upload the list as CSV text: the phone column is found by its header or by which column holds phone numbers, and every other column travels with that contact, so {{name}} in the agent's prompt means the person being called.

var campaign = await glytos.Campaigns.CreateAsync(
    "March outreach",
    agent.Uuid,
    "+15551230000", // must be a number you have connected
    contactsCsv: File.ReadAllText("leads.csv"),
    scheduledAt: new DateTimeOffset(2026, 3, 1, 9, 0, 0, TimeSpan.Zero),
    callWindowStart: "09:00",
    callWindowEnd: "20:00",
    timezone: "Europe/Istanbul");

Left unscheduled, a campaign stays a draft until StartAsync. StopAsync ends it at the next contact, leaving the undialed ones ready to resume. RetrieveAsync returns each contact's outcome and, where one answered, the session it produced.

Every outbound call is checked against your do-not-call list first, whether it comes from a campaign or from Calls.CreateAsync. Agents add to that list themselves when someone asks not to be contacted again:

await glytos.Dnc.AddAsync("+15551230000", "asked on a call");

A campaign chooses how much of the list applies. The default, strict, honours all of it. transactional still calls people who only refused marketing, which is what you want for a call about someone's own order. ignore skips entries your organization added for itself, but requests people made on a call still apply unless you also set overrideCallerRequests. Measure before you choose:

var preview = await glytos.Campaigns.PreviewSuppressionAsync(
    contactsCsv: File.ReadAllText("leads.csv"));
Console.WriteLine(
    $"{preview.ReachedIfStrict} of {preview.Contacts} reachable; " +
    $"{preview.CallerRequested} asked us not to call");

ASP.NET Core

Install the DI integration and register the client against IHttpClientFactory:

dotnet add package Glytos.Extensions.DependencyInjection
builder.Services.AddGlytos(builder.Configuration["Glytos:ApiKey"]!, options =>
{
    options.Environment = "prod";
});

Then inject GlytosClient into your controllers, minimal-API handlers, or services:

app.MapGet("/agents", async (GlytosClient glytos) => await glytos.Workflows.ListAsync());

Errors

Non-2xx responses (and transport failures, with Status 0) throw a GlytosException carrying the API error code, HTTP status, and the request id:

try
{
    await glytos.Workflows.RetrieveAsync("missing");
}
catch (GlytosException ex)
{
    Console.WriteLine($"{ex.Status} {ex.ErrorCode} {ex.Message} {ex.RequestId}");
}

Webhooks

Verify a delivery came from Glytos before trusting it. Pass the raw request body, the X-Glytos-Signature header, and your endpoint secret:

using Glytos;

var ok = Webhook.Verify(rawBody, Request.Headers["X-Glytos-Signature"], webhookSecret);
if (!ok)
{
    return BadRequest();
}

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Glytos:

Package Downloads
Glytos.Extensions.DependencyInjection

ASP.NET Core dependency-injection integration for the Glytos SDK: services.AddGlytos(...).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 145 8/19/2026
0.4.0 138 8/17/2026
0.3.0 142 8/9/2026
0.2.0 158 8/2/2026
0.1.0 156 7/19/2026