ElevenAgents.Net
0.1.0
dotnet add package ElevenAgents.Net --version 0.1.0
NuGet\Install-Package ElevenAgents.Net -Version 0.1.0
<PackageReference Include="ElevenAgents.Net" Version="0.1.0" />
<PackageVersion Include="ElevenAgents.Net" Version="0.1.0" />
<PackageReference Include="ElevenAgents.Net" />
paket add ElevenAgents.Net --version 0.1.0
#r "nuget: ElevenAgents.Net, 0.1.0"
#:package ElevenAgents.Net@0.1.0
#addin nuget:?package=ElevenAgents.Net&version=0.1.0
#tool nuget:?package=ElevenAgents.Net&version=0.1.0
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
JsonElementaccess for everything else - net8.0, zero dependencies, async-first with
CancellationTokeneverywhere, 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 | Versions 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. |
-
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 |