Thalos.NET
0.1.1
See the version list below for details.
dotnet add package Thalos.NET --version 0.1.1
NuGet\Install-Package Thalos.NET -Version 0.1.1
<PackageReference Include="Thalos.NET" Version="0.1.1" />
<PackageVersion Include="Thalos.NET" Version="0.1.1" />
<PackageReference Include="Thalos.NET" />
paket add Thalos.NET --version 0.1.1
#r "nuget: Thalos.NET, 0.1.1"
#:package Thalos.NET@0.1.1
#addin nuget:?package=Thalos.NET&version=0.1.1
#tool nuget:?package=Thalos.NET&version=0.1.1
Thalos.NET
Named after Talos, the bronze guardian of Crete. Spelled Thalos because
Talos.*is taken on nuget.org.
A Hermes-style, ZeroAlloc-native agent framework for .NET, built on Microsoft Agent Framework with first-class AI.Sentinel security and Model Context Protocol tools.
| Package | Purpose | Depends on |
|---|---|---|
Thalos.NET.Abstractions |
Ports (IAgentRuntime, IAgentSessionStore, IToolSource, IChatClientProvider, …), models, typed ids, AgentError |
ZeroAlloc.*, Microsoft.Extensions.AI.Abstractions |
Thalos.NET |
Runtime: agent factory, tool catalog + authorization, session state machine, in-memory store, AddThalos(...) |
Abstractions, Microsoft.Agents.AI |
Thalos.NET.Testing |
ScriptedChatClient, RecordingNotificationPublisher, reusable IAgentSessionStore contract tests (ships xunit + AwesomeAssertions references by design) |
Thalos.NET |
Thalos.NET.Mcp |
MCP servers (stdio / http / sse, Claude Code-style .mcp.json) as tool sources |
Thalos.NET, ModelContextProtocol |
Thalos.NET.Anthropic |
Anthropic Claude chat-client provider | Thalos.NET, Anthropic |
Thalos.NET.Sentinel |
AI.Sentinel scanning at the model boundary, quarantine → AgentError |
Thalos.NET, AI.Sentinel |
Targets net8.0 and net10.0.
Quick start
services.AddThalos(thalos => thalos
.UseAnthropic(configuration) // Thalos:Anthropic section; ApiKey falls back to ANTHROPIC_API_KEY
.UseAISentinel(o => o.EmbeddingGenerator = myEmbeddings) // see the security note below
.UseInMemorySessionStore()
.AddMcpServersFromFile(Path.Combine(AppContext.BaseDirectory, ".mcp.json"))
.RequireToolPolicy("roslyn__apply_*", "developer")
.AddPolicy<DeveloperPolicy>() // any ZeroAlloc.Authorization [Policy("developer")]
.AddAgent(new AgentDefinition
{
Id = AgentId.Parse("01ARZ3NDEKTSV4RRFFQ69G5FAV", null),
Name = "Architect",
Instructions = "You are a senior .NET architect. Use the roslyn tools to answer precisely.",
Tools = ["roslyn__*"],
}));
var runtime = provider.GetRequiredService<IAgentRuntime>();
var session = await runtime.CreateSessionAsync(agentId, caller, ct); // caller: ISecurityContext supplied by the channel
var turn = await runtime.RunTurnAsync(new AgentTurnRequest(session.Value, "Who calls TaskRepository.UpdateAsync?", caller), ct);
await foreach (var evt in runtime.RunTurnStreamingAsync(new AgentTurnRequest(session.Value, "…", caller), ct))
{
// TextDeltaEvent, ToolCallStartedEvent, ToolCallFinishedEvent, UsageEvent, TurnCompletedEvent | TurnFailedEvent
}
Tool names exposed to the model are {source}__{tool} (e.g. roslyn__find_callers); AgentDefinition.Tools and
RequireToolPolicy take globs over that qualified name. Authorization is enforced by Thalos at the function boundary —
before the tool runs — not by inspecting the chat stream afterwards.
A runnable REPL lives in samples/Thalos.Sample.Console.
Security: AI.Sentinel needs an embedding generator
AI.Sentinel 2.0.1's security detectors (prompt injection, jailbreak, exfiltration, …) are semantic. Without
SentinelOptions.EmbeddingGenerator they return Clean and only the lexical/operational detectors run — UseAISentinel()
with no embedding generator is not prompt-injection protection. Wire a real IEmbeddingGenerator (Ollama, OpenAI, …):
.UseAISentinel(o =>
{
o.EmbeddingGenerator = embeddingGenerator; // IEmbeddingGenerator<string, Embedding<float>>
o.OnCritical = SentinelAction.Quarantine; // surfaces as AgentError.Quarantined ("<Severity>: <DetectorId>")
o.OnHigh = SentinelAction.Alert;
})
Local development against Daedalus
Until the packages are on nuget.org, consumers (Daedalus, phase 1.1) build from a local folder feed:
pwsh scripts/pack-local.ps1 # → C:\Projects\Prive\.nuget-local\Thalos.NET*.0.1.0-local.<timestamp>.nupkg
The script prints the exact version. In the consuming repo:
nuget.config (next to the solution):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="thalos-local" value="C:\Projects\Prive\.nuget-local" />
</packageSources>
</configuration>
Directory.Packages.props (central package management):
<ItemGroup>
<PackageVersion Include="Thalos.NET.Abstractions" Version="0.1.0-local.20260816120000" />
<PackageVersion Include="Thalos.NET" Version="0.1.0-local.20260816120000" />
<PackageVersion Include="Thalos.NET.Testing" Version="0.1.0-local.20260816120000" />
<PackageVersion Include="Thalos.NET.Mcp" Version="0.1.0-local.20260816120000" />
<PackageVersion Include="Thalos.NET.Anthropic" Version="0.1.0-local.20260816120000" />
<PackageVersion Include="Thalos.NET.Sentinel" Version="0.1.0-local.20260816120000" />
</ItemGroup>
Re-run the script and bump the pin after every change to Thalos.NET (NuGet caches by exact version, so never re-pack the
same version — the timestamp suffix guarantees a fresh one). If a stale package is still picked up, clear
%USERPROFILE%\.nuget\packages\thalos.net*.
Building
dotnet build # 0 warnings — TreatWarningsAsErrors with Meziantou, Roslynator and ZeroAlloc analyzers
dotnet test # unit, MCP (launches tests/Thalos.NET.Tests.McpServer over stdio), Sentinel, architecture
Versioning and releases
Same setup as Rag.NET; the runbook is docs/release.md.
- Versions come from git history via GitVersion (
dotnet tool restore && dotnet dotnet-gitversion); nothing is hand-edited. Stable versions only — no prereleases are published. - Releases are cut by release-please from conventional commits (enforced on
PRs by commitlint): dispatch → review/merge the release PR → dispatch →
vX.Y.Ztag + GitHub release. - CI (
.github/workflows/ci.yml) builds and tests on Ubuntu and Windows on every push/PR, packs and validates the six packages, and rehearses the nuget.org push against a local feed. Publishing to nuget.org is a manual dispatch withpublish_to_nuget=trueon the tagged release commit, using nuget.org Trusted Publishing (no stored API key).
Status: 0.1.0 — API is unstable until 1.0.
| 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 is compatible. 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. |
-
net10.0
- Microsoft.Agents.AI (>= 1.17.0)
- Microsoft.Extensions.AI (>= 10.9.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Thalos.NET.Abstractions (>= 0.1.1)
- ZeroAlloc.AsyncEvents (>= 1.1.2)
- ZeroAlloc.Inject (>= 1.7.3)
- ZeroAlloc.StateMachine (>= 1.5.2)
-
net8.0
- Microsoft.Agents.AI (>= 1.17.0)
- Microsoft.Extensions.AI (>= 10.9.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Thalos.NET.Abstractions (>= 0.1.1)
- ZeroAlloc.AsyncEvents (>= 1.1.2)
- ZeroAlloc.Inject (>= 1.7.3)
- ZeroAlloc.StateMachine (>= 1.5.2)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Thalos.NET:
| Package | Downloads |
|---|---|
|
Thalos.NET.Anthropic
Anthropic Claude chat-client provider for Thalos.NET. |
|
|
Thalos.NET.Mcp
Model Context Protocol servers (stdio, http) as Thalos.NET tool sources. Loads Claude Code-style .mcp.json. |
|
|
Thalos.NET.Sentinel
AI.Sentinel security middleware at the model boundary for Thalos.NET agents. |
|
|
Thalos.NET.Testing
Test doubles and contract tests for Thalos.NET: ScriptedChatClient (scripted IChatClient), RecordingNotificationPublisher (in-memory IAgentNotificationPublisher), reusable IAgentSessionStore contract tests, memory store/index contract tests, skill store/index contract tests, deterministic embedding generator (xUnit + AwesomeAssertions). |
|
|
Thalos.NET.Memory
Curated long-term memory for Thalos.NET agents: MemoryRecord model, IMemoryStore/IMemoryIndex/IMemoryService ports, auto-recall AIContextProvider, memory tools, in-memory implementations. |
GitHub repositories
This package is not used by any popular GitHub repositories.