A .NET library for building voice and chat agents. The agent is a configuration document; the host is two calls.
config/helper.yaml:
apiVersion: agentcore/v1
name: helper
agents:
defaults:
model: { ref: reply }
instructions: |
You are a helpful assistant. Answer plainly and briefly.
items:
- id: helper
instructions: |
Answer whatever the person asks.
tools: []
policy:
initial: talk
stages:
- id: talk
agent: helper
terminal: true
providers:
llm:
- { kind: openai, model: gpt-5.6-luna, as: reply }
conversation: { kind: telnyx-relay }
speech:
stt: { kind: telnyx-relay }
tts: { kind: telnyx-relay }agents holds the instructions, policy holds the stages, providers binds the vendors. No C# changes to add a stage, a tool, or a model.
config/example.yaml
is the annotated tour of every key.
using AgentCore.Hosting;
var builder = WebApplication.CreateBuilder(args);
builder.AddAgentCoreHost();
var app = builder.Build();
app.MapAgentCoreHost();
app.Run();AddAgentCoreHost loads the document (config/example.yaml unless AgentCore__ConfigurationPath names another) and binds every vendor seam. MapAgentCoreHost serves the health check, the OpenAI-compatible Responses endpoint, the conversation socket, and the AG-UI endpoint.
Every entry under entries: answers on POST /v1/{entry}/responses, on the conversation socket at /v1/{entry}/call, and on AG-UI at POST /agui/{entry}.
An OpenAI SDK reaches one entry through its base URL alone: base_url = https://host/v1/phone.
A document it cannot find is a startup failure, never a silent default.
dotnet add package AgentCore.Hosting
AgentCore.Hosting brings the rest of the set with it.
Over the OpenAI-compatible endpoint (/v1/responses), the document above holds this conversation:
User: Hello
Assistant: How can I help you today!
| Package | Holds |
|---|---|
AgentCore.Domain |
Pure domain records. Zero dependencies. |
AgentCore.Application |
Orchestration, configuration compilation, and every port interface. |
AgentCore.Infrastructure |
Outbound adapters: OpenAI, Zilliz, Telnyx call control, Postgres, B2, Git. |
AgentCore.AspNetCore |
Inbound adapters as Map* extensions: Telnyx Conversation Relay, Telnyx webhooks, Responses, AG-UI. |
AgentCore.Hosting |
The batteries-included host: every vendor seam bound and every route mapped, in two calls. |
They share one version and ship as a set. Mixing versions across them is unsupported.
MIT