the agent core · .NET 10

dmon-core

A .NET-native coding agent inspired by Pi. The agent core runs as a separate process over JSONL/stdio; console/TUI and Avalonia desktop hosts are planned.

GitHub stars License

Self-extensible via NuGet

Extensions ship as NuGet packages tagged dmon-extension. The agent can search, analyse, and load them at runtime.

🛡

Source-gated security

Before loading, dmon fetches an extension's source at the published commit and runs an LLM security analysis. No source, no load.

Curated tool output

Tools return a ranked shortlist, not a raw API dump — every token a tool returns is consumed by the model's reasoning step.

🔌

Provider-agnostic

LLM access goes through Microsoft.Extensions.AI (IChatClient) — Anthropic, OpenAI, Gemini, or a local model.

JSONL over stdio

A clean RPC protocol between the core and its host surfaces, with append-only JSONL session storage.

🔐

Conservative by default

A tiered permission model prompts before consequential actions rather than asking forgiveness.

Quick start

make build       # build all projects
dotnet test      # run all tests

Set at least one provider key before running:

export ANTHROPIC_API_KEY=sk-ant-...
# or OPENAI_API_KEY / GEMINI_API_KEY

Extensions

dmon is self-extensible. Extensions are distributed as NuGet packages tagged dmon-extension, and the agent works with them at runtime:

extension.search  <query>    # find extensions on NuGet
extension.readme  <id>       # read a package README excerpt
extension.analyze <id>       # security-analyse source before loading
extension.load    <id>       # load a confirmed extension

Extensions implement IDaemonExtension (from Dmon.Extensions) and expose tools as AIFunction instances. dmon-websearch is the reference out-of-tree extension.

Architecture

  • RPC protocol — JSONL over stdio
  • LLM abstractionMicrosoft.Extensions.AI (IChatClient)
  • Extension modelIDaemonExtension + AIFunction
  • Session storage — relocatable directory, append-only JSONL
  • Permission model — tiered prompts, conservative by default

The architecture decisions are recorded as ADRs in the repo. See the README for the full picture.