ElevenAgents.Net 0.1.0

dotnet add package ElevenAgents.Net --version 0.1.0
                    
NuGet\Install-Package ElevenAgents.Net -Version 0.1.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="ElevenAgents.Net" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ElevenAgents.Net" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ElevenAgents.Net" />
                    
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 ElevenAgents.Net --version 0.1.0
                    
#r "nuget: ElevenAgents.Net, 0.1.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 ElevenAgents.Net@0.1.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=ElevenAgents.Net&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ElevenAgents.Net&version=0.1.0
                    
Install as a Cake Tool

ElevenAgents.Net: realtime ElevenLabs agents from .NET

unofficial .net client for the ElevenLabs Agents platform. official sdks exist for python, typescript, kotlin and swift. nothing for .net. this fills that gap.

not affiliated with ElevenLabs. complements the excellent community ElevenLabs-DotNet library, which covers tts, voices, dubbing and more; this library covers what it doesn't: realtime agent conversations.

what you get

  • realtime conversations over websocket: text chat, audio streaming, transcripts, interruptions
  • client tools: register a c# function, the agent calls it mid-conversation
  • signed-url auth flow for private agents
  • automatic ping/pong handling
  • typed events for the common protocol messages, raw JsonElement access for everything else
  • net8.0, zero dependencies, async-first with CancellationToken everywhere, testable transport abstraction

quickstart

dotnet add package ElevenAgents.Net

talk to a public agent:

using ElevenAgents.Net.Realtime;

await using var conversation = await AgentConversation.ConnectAsync(
    new ConversationOptions { AgentId = "your_agent_id" });

// give the agent a tool it can call
conversation.RegisterTool("get_local_time", (parameters, ct) =>
    Task.FromResult(DateTimeOffset.Now.ToString("HH:mm zzz")));

_ = Task.Run(async () =>
{
    await foreach (var evt in conversation.ReceiveEventsAsync())
        using (evt)
            if (evt is AgentResponseEvent r) Console.WriteLine($"agent: {r.Text}");
});

await conversation.SendUserMessageAsync("hi, what time is it?");

private agent? get a signed url server-side first:

using var client = new ElevenAgentsClient(apiKey);          // xi-api-key stays on the server
var signedUrl = await client.GetSignedUrlAsync("agent_id"); // valid 15 minutes
await using var conversation = await AgentConversation.ConnectAsync(
    new ConversationOptions { SignedUrl = signedUrl });

voice: send microphone chunks with SendAudioChunkAsync (format from conversation.AgentAudioFormat, typically pcm_16000) and play AudioEvent.GetAudioBytes() as they arrive.

project layout

path what
src/ElevenAgents.Net the library (realtime client + rest client)
tests/ElevenAgents.Net.SmokeTests offline protocol tests against a fake transport, no network needed
samples/ChatAgent console chat with an agent, including a client tool

run the tests

dotnet run --project tests/ElevenAgents.Net.SmokeTests

roadmap

  • webrtc transport for browser-parity voice latency
  • typed agent configuration models (create/update agents from c#)
  • Microsoft Agent Framework / Semantic Kernel bridge: expose kernel functions as client tools automatically
  • multi-context websocket support

license

MIT

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ElevenAgents.Net:

Package Downloads
ElevenAgents.Net.SemanticKernel

Bridge between Microsoft Semantic Kernel and the ElevenLabs Agents platform: expose your kernel's functions as ElevenLabs client tools so your voice agent can call your existing .NET code. Not affiliated with ElevenLabs.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 0 7/22/2026