Praxo.Core
0.9.1
dotnet add package Praxo.Core --version 0.9.1
NuGet\Install-Package Praxo.Core -Version 0.9.1
<PackageReference Include="Praxo.Core" Version="0.9.1" />
<PackageVersion Include="Praxo.Core" Version="0.9.1" />
<PackageReference Include="Praxo.Core" />
paket add Praxo.Core --version 0.9.1
#r "nuget: Praxo.Core, 0.9.1"
#:package Praxo.Core@0.9.1
#addin nuget:?package=Praxo.Core&version=0.9.1
#tool nuget:?package=Praxo.Core&version=0.9.1
PRAXO-CORE C# Core
PRAXO-CORE is an embeddable, MIT-licensed agent framework. This package is its native .NET Core: an agent loop with tool registration and dispatch, policy hooks, typed events, memory, checkpoints, context budgets, middleware, JSON Schema validation, and plugin manifest parsing. It runs in-process and does not require a hosted service.
SPEC_VERSION:0.2.0- Source version:
0.9.0(latest source tagcsharp/v0.9.0) - License: MIT
- Dependencies: none beyond the .NET base class library
- The latest NuGet package is
Praxo.Core@0.8.0.
Registry and Coding-Agent Entry
- Registry introduction: REGISTRY.md
- Machine-readable entry: llms.txt and llms.md
- Examples: runnable language-specific examples.
- Coding-agent contract: docs/getting-started/coding-agents.md
- Registry: NuGet
- Community: (https://x.com/axisvela) · Weibo
Get started
Install the published package:
dotnet add package Praxo.Core --version 0.9.0
Then run the smallest deterministic example:
- Consumer starter: explicit tool scope and a deny check.
- Live model: connect an OpenAI-compatible endpoint and register
get_time.
See the C# documentation for the full API and the language matrix for current scope.
Examples
Runnable examples live under language/csharp/examples.
| Goal | Example |
|---|---|
| Install and deny one unsafe call | consumer |
| Connect a real model | live-model |
| Connect MCP tools | mcp |
| Validate structured output | structured-output |
| Stream a response | streaming |
| Add identity and policy | identity-policy |
| Persist checkpoints | checkpoint |
| Run behind HTTP | service |
| Approve or edit a tool call | hitl |
| Resume a multi-turn session | session-checkpoint |
| Retry transient failures | retry |
| Add provider fallback | provider-fallback |
| Observe agent events | event-sink |
Install
dotnet add package Praxo.Core --version 0.9.0
Scope
The Core implements all eleven vector groups: toolcall, jsonschema, plugin,
checkpoint, event, memory, policy, stream, context, middleware, and agent loop.
It also includes a synchronous OpenAiCompatibleModel and a streaming variant.
The agent loop supports RunStream, cooperative cancellation through
AgentOptions.CancellationToken, bounded parallel tool execution through
AgentOptions.MaxParallelTools, and human-in-the-loop interrupt decisions
through AgentOptions.InterruptOn and OnInterruptDecision. The public API is
idiomatic C#; wire shapes
keep the Go casing (image_url, runId, plugin_id).
Build and test
dotnet build language/csharp/Praxo.Core/Praxo.Core.csproj
dotnet run --project language/csharp/Praxo.Conformance
dotnet run --project language/csharp/Praxo.Tests
dotnet run --project language/csharp/Praxo.Conformance -- --check-api
dotnet run --project language/csharp/samples/VbSample
Local toolchain used by the repository maintainers lives at D:\dev\dotnet.
On CI, use the standard actions/setup-dotnet job.
Quickstart
using Praxo.Core;
var model = new StaticModel("hello");
var agent = new Agent(new AgentOptions(model));
var result = agent.Run(new Session("demo"), "hello");
Console.WriteLine(result.Output);
Tools are registered on AgentOptions.Tools:
var registry = new ToolRegistry();
registry.Register(new FuncTool("echo", "Echo arguments", args => args.DeepClone()));
var agent = new Agent(new AgentOptions(model)
{
Tools = registry,
MaxSteps = 8,
});
Model adapters
OpenAiCompatibleModelfor OpenAI, DeepSeek, Kimi/Moonshot, OpenRouter, Groq, and Together endpoints.AnthropicModelfor the Anthropic Messages API.GeminiModelfor the Gemini generateContent API.
Each adapter accepts an injected HttpClient so tests can use a fake transport.
Harmovela event sink
HarmovelaSink posts lifecycle events to {BaseUrl}/events as JSON envelopes
with spec_version, id, type, source, created_at, and a payload that
merges the event data with session_id and run_id when present.
using Praxo.Core;
var options = new AgentOptions(model)
{
Events = new HarmovelaSink(new HarmovelaSinkOptions
{
BaseUrl = "http://127.0.0.1:8790/aep/api",
}),
};
var agent = new Agent(options);
Pass a HarmovelaTransport to inject a fake for tests. Limits: the sink adds no
authentication, retries, buffering, acknowledgements, ordering, or exactly-once
delivery. Filter sensitive event data at the caller, and use HTTPS for remote
endpoints.
MCP stdio client
McpClient spawns a child process and speaks newline-delimited JSON-RPC 2.0.
It performs the initialize / notifications/initialized handshake, follows
tools/list cursors, rejects repeated cursors and duplicate names, preserves
inputSchema, and maps tools/call structured or text content.
using System.Text.Json.Nodes;
using Praxo.Core;
using var client = new McpClient(new McpServerOptions
{
Command = "my-mcp-server",
});
client.Connect();
var registry = new ToolRegistry();
client.RegisterTools(registry);
var result = client.CallTool("echo", new JsonObject { ["text"] = "hi" });
Registering MCP tools does not bypass policy: the agent still authorizes every
tool.invoke action and applies its allowlist and middleware. Limits: stdio
transport only, no remote transport or authentication, and MCP output remains
untrusted content. Operations are bounded by the client timeout (default 30
seconds), timeouts send notifications/cancelled, and Close terminates the
child process.
Layout
Praxo.Core/library.Praxo.Conformance/vector runner and API snapshot tool.Praxo.Tests/dependency-free core tests.samples/VbSample/VB.NET consumer sample.api-snapshot.txtchecked-in public API snapshot.
Release
Latest source tag: csharp/v0.9.0. It targets SPEC_VERSION 0.2.0. See
CHANGELOG.md for per-release changes and compatibility notes.
| 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
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.