ABP Framework integration library for Agno AgentOS service. Provides complete API support for Agent, Team, Workflow, Knowledge, Traces, Memory, and Database operations.
$ dotnet add package AbpAgnoSharpAbpAgnoSharp 是一个用于对接 Agno AgentOS 服务的 ABP Framework 集成库。
完整的 Agno AgentOS API 支持
基于 WebApiClientCore 的 HTTP 客户端
自动认证处理
支持 JSON 序列化/反序列化(Snake Case)
依赖注入支持
dotnet add package AbpAgnoSharp
或通过 Package Manager Console:
Install-Package AbpAgnoSharp
在您的 ABP 项目中添加项目引用:
<ProjectReference Include="..\AbpAgnoSharp\AbpAgnoSharp.csproj" />
在 appsettings.json 中配置 Agno 服务:
{
"AI": {
"Agno": {
"ApiKey": "your-api-key",
"BaseUrl": "http://localhost:7777",
"EnableLogging": false
}
}
}
[DependsOn(typeof(AbpAgnoSharpModule))]
public class YourModule : AbpModule
{
// ...
}
public class YourService : ITransientDependency
{
private readonly AgentClient _agentClient;
public YourService(AgentClient agentClient)
{
_agentClient = agentClient;
}
public async Task GetAgentsAsync()
{
var response = await _agentClient.GetAgents();
// 处理响应
}
}
public class YourService : ITransientDependency
{
private readonly IAgentApi _agentApi;
public YourService(IAgentApi agentApi)
{
_agentApi = agentApi;
}
public async Task GetAgentsAsync()
{
var response = await _agentApi.GetAgents();
// 处理响应
}
}
项目提供了以下客户端类:
AgentClient - 代理操作TeamClient - 团队操作WorkflowClient - 工作流操作KnowledgeClient - 知识库操作TracesClient - 追踪操作MemoryClient - 记忆操作DatabaseClient - 数据库操作本项目采用 MIT 许可证。
欢迎提交 Issue 和 Pull Request!