# Admin.Net.AI
**Repository Path**: cyuefeng/admin.net.ai
## Basic Information
- **Project Name**: Admin.Net.AI
- **Description**: Admin.NET.Ai 是深度集成 MEAI 与 MAF 框架一个目前集合AI所有能力的合集,包括15+场景模板项能力,全部在控制台项目中
- **Primary Language**: C#
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 8
- **Created**: 2026-01-06
- **Last Updated**: 2026-01-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Admin.NET.Ai
**English** | **[中文](./README.md)**
[](https://dotnet.microsoft.com/)
[](LICENSE)
[](https://www.nuget.org/packages/Microsoft.Extensions.AI)
---
Admin.NET.Ai is an enterprise-grade AI capability core library built on **.NET 10**. It uses a pipeline/middleware architecture and deeply integrates `Microsoft.Extensions.AI` (MEAI) and `Microsoft.Agents` frameworks.
> [!IMPORTANT]
> **Requirements**: This project requires .NET 10 features. Recommend using [mise](https://mise.jdx.dev/) to manage the environment with `mise use dotnet` to activate the SDK.
---
## ✨ Core Features
| Feature | Description |
| :--- | :--- |
| 🔌 **Multi-Provider Support** | Seamlessly switch between OpenAI, DeepSeek, Qwen, Gemini, Ollama, etc. |
| 🤖 **Multi-Agent Orchestration** | Sequential/Parallel/Orchestrator/Roundtable modes, multi-provider for diversity |
| 🔧 **MCP Tool Discovery** | `[McpTool]` attribute to expose methods as MCP tools |
| 🎨 **Media Generation** | TTS/ASR/Image/Video generation with multi-provider support |
| 📚 **Hybrid RAG** | Vector retrieval + Neo4j GraphRAG + Reranking |
| ⚡ **Middleware Pipeline** | Caching/Rate-limiting/Token billing/Audit/Retry |
| 🔥 **Hot-Reload Scripting** | Natasha C# script engine for dynamic Agent logic updates |
| 📊 **Full Observability** | Trace timeline + DevUI visual debugging |
### 📋 Feature Demos Overview (Console)
| # | Module | Description |
| :---: | :--- | :--- |
| 1 | Basic Chat & Middleware | Chat, Audit, Tokens |
| 2 | Multi-Agent Workflow | MAF Sequential & Autonomous |
| 3 | Structured Data Extraction | JSON Schema, TOON |
| 4 | Smart Tools & Approval | Discover, Approval |
| 5 | Dynamic Script Hot-Reload | Natasha Scripting |
| 6 | Context Compression | Compression Reducers |
| 7 | Prompt Engineering | Prompt Templates |
| 8 | RAG Knowledge Retrieval | GraphRAG & Vector |
| 9 | Multimodal Capabilities | Vision & Audio |
| 10 | Conversation Persistence | Thread & Database |
| 11 | Real-world Scenarios | Comprehensive Applications |
| 12 | Built-in Agents | Sentiment/Knowledge Graph/Quality |
| 13 | Middleware Deep-dive | Middleware Stack |
| 14 | MCP Protocol | External Tool Integration |
| 15 | Monitoring & Metrics | OpenTelemetry |
| 16 | Storage Strategies | Hot/Cold/Vector |
| **17** | **⭐ Media Generation** | **TTS/ASR/Image/Video** |
---
## 🚀 Quick Start
### 1. Install
```bash
dotnet add package Admin.NET.Ai # Not uploaded yet, add project reference manually
```
### 2. Register Services
```csharp
services.AddAdminNetAi(configuration);
```
### 3. Usage Examples
#### Basic Chat
```csharp
var aiFactory = sp.GetRequiredService();
var client = aiFactory.GetDefaultChatClient();
var response = await client.GetResponseAsync("Hello, I'm Admin.NET");
```
#### Multi-Agent Collaboration
```csharp
var orchestrator = new EnhancedMultiAgentOrchestrator(aiFactory);
orchestrator
.AddAgent("Tech Expert", "Analyze from technical perspective", provider: "qwen")
.AddAgent("Product Manager", "Analyze from product perspective", provider: "deepseek");
await foreach (var evt in orchestrator.RunDiscussionAsync("Impact of AI on development", rounds: 2))
{
Console.Write(evt.Content);
}
```
#### MCP Tools
```csharp
[McpTool("Get weather information")] // Name defaults to method name
public WeatherInfo GetWeather([McpParameter("City name")] string city)
{
return new WeatherInfo { City = city, Temperature = 20 };
}
```
#### Image Generation
```csharp
var mediaService = sp.GetRequiredService();
var result = await mediaService.GenerateImageAsync(new ImageGenRequest
{
Prompt = "A cute robot cat",
Provider = "OpenAI"
});
```
---
## 🏗️ Architecture
```
Admin.NET.Ai/
├── Abstractions/ # Interface definitions
├── Core/ # AiFactory, PipelineBuilder
├── Middleware/ # Caching/RateLimiting/Audit/TokenBilling
├── Services/
│ ├── MCP/ # MCP Protocol + Tool Discovery
│ ├── Media/ # TTS/ASR/ImageGen/VideoGen
│ ├── Rag/ # Vector + GraphRAG
│ └── Workflow/ # Multi-Agent Orchestration Engine
├── Configuration/ # JSON config files
├── _doc/ # User documentation
└── _doc_Pro/ # Technical deep-dive
```
---
## ⚙️ Configuration
### LLMAgent.Clients.json (Providers)
```json
{
"LLM-Clients": {
"DefaultProvider": "qwen-plus",
"Clients": {
"qwen-plus": { "Provider": "Qwen", "ModelId": "qwen-plus", "ApiKey": "sk-xxx" },
"deepseek": { "Provider": "DeepSeek", "ModelId": "deepseek-chat", "ApiKey": "sk-xxx" }
}
}
}
```
### LLMAgent.Mcp.json (MCP Servers)
```json
{
"LLM-Mcp": {
"Servers": [
{ "Name": "Filesystem", "Url": "http://localhost:3001/sse" }
]
}
}
```
---
## 📖 Documentation
- **User Docs**: `_doc/` - Feature introductions and usage examples
- **Technical Deep-Dive**: `_doc_Pro/` - Implementation details and source code analysis
---
## 🎯 Demos
Run the console demo:
```bash
dotnet run --project HeMaCupAICheck
```
Choose from 17 feature demos:
1. Basic Chat | 2. Multi-Agent Workflow | 3. Structured Output | 4. Tool Calling | 5. Hot-Reload Script
6. Context Compression | 7. Prompts | 8. RAG | 9. Multimodal | 10. Persistence
12. Built-in Agents | 13. Middleware | 14. MCP | 15. Monitoring | 16. Storage | **17. Media Generation**
---
## ⚖️ License
Admin.NET.Ai is released under the [MIT License](LICENSE).