A developer going by "artydev" has dropped Sovereign Dev Agent on DEV.to—a complete AI-powered coding assistant built entirely in .NET 10 and designed to run as a single-file executable with Native AOT compilation support. The project, published June 21st, implements the full agentic loop (tool calling, conversation history, streaming responses) without relying on reflection or external dependencies that would break AOT builds.

Built for the French Government's Albert API

The agent connects to France's sovereign AI infrastructure via the Albert API at albert.api.etalab.gouv.fr, using the openai/gpt-oss-120b model. Configuration is minimal: set the ALBERT_API_KEY environment variable and run with dotnet run Program.cs, or publish a native binary with dotnet publish -p:PublishAot=true. This makes it genuinely portable—drop the compiled executable anywhere with an API key and you're coding.

AOT-Safe Architecture

What sets this implementation apart is its commitment to ahead-of-time compilation compatibility. The code uses Utf8JsonWriter directly for JSON serialization instead of relying on System.Text.Json's reflection-based features, which would fail in trim-safe or AOT scenarios. File operations use async streams with explicit buffer management rather than loading entire files into memory. The developer also implemented a 120KB read limit per file to prevent the agent from getting stuck in latency loops when working with large codebases.

Five Local Tools for Full-Stack Work

The agent ships with five filesystem tools: listDirectory (with directory/file type detection from a single syscall), readProjectFile, writeProjectFile (creates parent directories recursively), changeDirectory, and executeTerminalCommand. Terminal commands get a 60-second timeout and proper stream handling for both stdout and stderr. The tool schemas are generated programmatically via Utf8JsonWriter to keep everything in the same code path—no external JSON files to maintain.

Fast-Track File Viewing

One clever optimization: common file viewing shortcuts (cat, type, gc) bypass the LLM entirely and stream files directly through a custom ANSI parser. This means developers can peek at source files without triggering an API call—a small but meaningful latency win when you're quickly inspecting code during a coding session.

Cross-Platform Shell Integration

The agent detects the operating system and routes commands to cmd.exe on Windows or /bin/bash on Unix systems automatically. Process spawning uses proper async patterns with data received events, ensuring non-blocking output capture regardless of command duration.

Key Takeaways

  • Single C# file (~600 lines) implements full AI coding agent architecture
  • Native AOT publishing produces a standalone binary with zero .NET runtime dependencies
  • Albert API integration enables sovereign French government AI infrastructure usage
  • AOT-safe serialization via Utf8JsonWriter avoids reflection that breaks trim scenarios
  • Direct file shortcuts (cat/type/gc) bypass LLM for sub-second file inspection

The Bottom Line

Sovereign Dev Agent isn't trying to compete with Cursor or Copilot—it proves something more interesting: a capable AI coding assistant can ship as a single portable binary you control end-to-end. For teams in regulated industries or anyone who wants their agent logic fully auditable, this is exactly the kind of approach that should be getting more attention.