|
16 | 16 | - 🔮 **Native C# Code Interpreter** - Execute C# code directly, no Python needed |
17 | 17 | - 🕸️ **SharpGraph** - Graph orchestration with loops and complex branches |
18 | 18 | - 🧬 **DSPy Optimizer** - Auto-optimize prompts, gets smarter over time |
| 19 | +- 🎯 **Agent Skills Mechanism** - Enterprise behavior governance, discoverable, activatable, auditable ⭐ NEW |
| 20 | +- 🐍 **Python SDK** - Official Python SDK via PyPI, calls C# services via gRPC ⭐ NEW |
19 | 21 | - 🏗️ **Architecture Improvements** - StrongContext, Modular Architecture, Middleware System, State Persistence, Parallel Execution, Event System, OpenAPI Tools, OpenTelemetry, Structured Logging, Fluent API, Pre-built Templates |
20 | 22 |
|
21 | 23 | Package download: https://www.nuget.org/packages/SharpAIKit/ |
@@ -56,10 +58,36 @@ await foreach (var chunk in client.ChatStreamAsync("Tell me a story")) |
56 | 58 |
|
57 | 59 | ## 📦 Installation |
58 | 60 |
|
| 61 | +### .NET Package (NuGet) |
| 62 | + |
59 | 63 | ```bash |
60 | 64 | dotnet add package SharpAIKit |
61 | 65 | ``` |
62 | 66 |
|
| 67 | +### Python SDK (PyPI) ⭐ **New** |
| 68 | + |
| 69 | +```bash |
| 70 | +pip install sharpaikit |
| 71 | +``` |
| 72 | + |
| 73 | +**Quick Start**: |
| 74 | + |
| 75 | +```python |
| 76 | +from sharpaikit import Agent |
| 77 | + |
| 78 | +agent = Agent( |
| 79 | + api_key="your-api-key", |
| 80 | + model="gpt-4", |
| 81 | + auto_start_host=True |
| 82 | +) |
| 83 | + |
| 84 | +result = agent.run("Hello, world!") |
| 85 | +print(result.output) |
| 86 | +agent.close() |
| 87 | +``` |
| 88 | + |
| 89 | +**PyPI**: https://pypi.org/project/sharpaikit/ |
| 90 | + |
63 | 91 | ## 🌐 Supported Providers |
64 | 92 |
|
65 | 93 | | Provider | URL | |
@@ -182,6 +210,38 @@ Console.WriteLine($"Best score: {result.BestScore:F2}"); |
182 | 210 | // The optimizer automatically adds few-shot examples and improves the prompt! |
183 | 211 | ``` |
184 | 212 |
|
| 213 | +### 🎯 Agent Skills Mechanism ⭐ **Enterprise Governance** |
| 214 | + |
| 215 | +**Enterprise behavior governance system** - Decouple behavior specifications from Prompts, providing discoverable, activatable, and constrainable behavior modules. |
| 216 | + |
| 217 | +**Key Features**: |
| 218 | +- ✅ Tool whitelist/blacklist constraints |
| 219 | +- ✅ Execution step and time limits |
| 220 | +- ✅ Context injection |
| 221 | +- ✅ Custom validators |
| 222 | +- ✅ Deterministic constraint merging |
| 223 | +- ✅ Complete audit trails |
| 224 | + |
| 225 | +**Quick Example**: |
| 226 | + |
| 227 | +```csharp |
| 228 | +using SharpAIKit.Skill; |
| 229 | +using SharpAIKit.Skill.Examples; |
| 230 | + |
| 231 | +var skillResolver = new DefaultSkillResolver(); |
| 232 | +skillResolver.RegisterSkill(new SecurityPolicySkill()); |
| 233 | +skillResolver.RegisterSkill(new CodeReviewSkill()); |
| 234 | + |
| 235 | +var agent = new EnhancedAgent(llmClient, skillResolver: skillResolver); |
| 236 | +var result = await agent.RunAsync("Review code for security issues"); |
| 237 | + |
| 238 | +// View Skill resolution |
| 239 | +if (agent.LastSkillResolution != null) |
| 240 | +{ |
| 241 | + Console.WriteLine($"Activated Skills: {string.Join(", ", agent.LastSkillResolution.ActivatedSkillIds)}"); |
| 242 | +} |
| 243 | +``` |
| 244 | + |
185 | 245 | See [中文文档](README_CN.md) or [English Documentation](README_EN.md) for detailed examples. |
186 | 246 |
|
187 | 247 | ## 🏗️ Architecture Improvements |
|
0 commit comments