MonadicSharp.Templates
1.0.0
dotnet new install MonadicSharp.Templates@1.0.0
MonadicSharp.Framework
Enterprise-grade AI agent infrastructure for .NET 8 — failures, security violations, and persistence errors are first-class
Result<T>values, never unhandled exceptions.
What is MonadicSharp.Framework?
MonadicSharp.Framework is a monorepo of NuGet packages that extend the MonadicSharp Railway-Oriented Programming library with production-ready AI agent infrastructure.
Every module follows the same principle: typed errors as values, never exceptions.
// Instead of try/catch everywhere:
var result = await AgentPipeline
.Start("ProcessDocument", extractorAgent)
.Then(classifierAgent)
.Then(summaryAgent)
.RunAsync(input, context);
result.Match(
onSuccess: output => Console.WriteLine(output),
onFailure: error => logger.LogError(error.Code, error.Message));
Packages
| Package | Description | NuGet |
|---|---|---|
| MonadicSharp.Agents | Typed agent pipelines, orchestration, circuit breaker | |
| MonadicSharp.Security | Prompt injection guard, secret masking, audit trail | |
| MonadicSharp.Telemetry | OpenTelemetry tracing and metrics for agents | |
| MonadicSharp.Caching | Result-aware memory and distributed cache | |
| MonadicSharp.Http | Result-aware HTTP client with typed retry | |
| MonadicSharp.Persistence | Result-aware repository and Unit of Work (EF Core 8) |
Architecture
MonadicSharp (base library — Result<T>, Error, Unit)
│
├── MonadicSharp.Agents ← Core orchestration layer
│ ├── MonadicSharp.Security ← Wraps agents with security checks
│ ├── MonadicSharp.Telemetry ← Wraps agents with OTel spans
│ └── MonadicSharp.Caching ← Wraps agents with transparent caching
│
├── MonadicSharp.Http ← Result-aware HTTP client (used by agents)
└── MonadicSharp.Persistence ← Result-aware EF Core repositories
All packages depend on MonadicSharp 1.4.0 and MonadicSharp.Agents. They compose via the decorator pattern — you can stack Security + Telemetry + Caching on any IAgent<TIn, TOut>.
Quick Start
Install the packages you need:
dotnet add package MonadicSharp.Agents
dotnet add package MonadicSharp.Security # optional
dotnet add package MonadicSharp.Telemetry # optional
dotnet add package MonadicSharp.Caching # optional
dotnet add package MonadicSharp.Http # optional
dotnet add package MonadicSharp.Persistence # optional
Register in DI:
services
.AddMonadicSharpAgents()
.AddMonadicSharpSecurity()
.AddMonadicSharpTelemetry("MyApp")
.AddMonadicSharpMemoryCache()
.AddMonadicSharpHttp()
.AddMonadicSharpPersistence<AppDbContext>();
Repository Structure
MonadicSharp.Framework/
├── src/
│ ├── MonadicSharp.Agents/
│ ├── MonadicSharp.Security/
│ ├── MonadicSharp.Telemetry/
│ ├── MonadicSharp.Caching/
│ ├── MonadicSharp.Http/
│ └── MonadicSharp.Persistence/
├── tests/
│ ├── MonadicSharp.Agents.Tests/
│ ├── MonadicSharp.Security.Tests/
│ ├── MonadicSharp.Telemetry.Tests/
│ ├── MonadicSharp.Caching.Tests/
│ ├── MonadicSharp.Http.Tests/
│ └── MonadicSharp.Persistence.Tests/
├── Directory.Build.props
├── global.json ← pins SDK to 8.0.418
└── MonadicSharp.Framework.sln
Contributing
This project is maintained by Danny4897. Issues and PRs are welcome.
License
MIT — see LICENSE.
-
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.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 406 | 3/4/2026 |