Observed since 21 Oct, 10:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A modern Python ADK - Agent Development Kit for building AI agents with LangGraph and LangChain. This library provides a comprehensive, type-safe framework for developing intelligent agents with chat, workflow, memory, and knowledge management capabilities.
基于 LangGraph/LangChain 的智能体开发框架,提供开箱即用的 RAG、记忆管理、对话流等能力。
RAG 检索增强生成
记忆管理
对话流管理
工作流引擎
只安装核心依赖,包含聊天、工作流、内存管理等基础功能:
pip install aigility
如需使用 RAG、向量存储、文档处理等高级功能:
# 安装所有可选功能
pip install "aigility[all]"
# 或者只安装需要的模块
pip install "aigility[rag-local]" # 本地 RAG (HuggingFace + Chroma)
pip install "aigility[rag-qdrant]" # Qdrant RAG
pip install "aigility[timem]" # 太忆 RAG 服务
pip install "aigility[anthropic]" # Anthropic LLM 支持
| 模块 | 说明 | 安装命令 |
|---|---|---|
anthropic | Anthropic Claude 支持 | pip install "aigility[anthropic]" |
rag-local | 本地 RAG (HuggingFace + Chroma) | pip install "aigility[rag-local]" |
rag-qdrant | Qdrant RAG | pip install "aigility[rag-qdrant]" |
timem | 太忆 RAG 服务 | pip install "aigility[timem]" |
timem-rag | 太忆 RAG 完整功能 (含文档处理) | pip install "aigility[timem-rag]" |
zai | 在智 embedding 服务 | pip install "aigility[zai]" |
all | 所有功能 | pip install "aigility[all]" |
注意:rag-local 会下载 HuggingFace 模型(约 500MB-2GB),安装时间较长
from aigility.rag import RAGService, RAGConfig, EmbeddingConfig, VectorStoreConfig
# 配置 RAG 服务
config = RAGConfig(
embedding=EmbeddingConfig(provider="dashscope", api_key="your-api-key"),
vector_store=VectorStoreConfig(provider="chroma", persist_path="./my_db")
)
# 初始化服务
rag_service = RAGService(config=config)
# 添加文档
rag_service.add_file("document.pdf")
# 检索相关内容
results = rag_service.search("什么是机器学习?")
print(results)
from aigility.rag import RAGService, create_rag_workflow
from langchain_openai import ChatOpenAI
# 初始化 RAG 服务和 LLM
rag_service = RAGService()
llm = ChatOpenAI(model="gpt-4")
# 创建工作流
workflow = create_rag_workflow(rag_service, llm)
# 执行查询
result = workflow.invoke({
"query": "什么是机器学习?",
"messages": []
})
print(result["answer"])
from aigility import ADKClient, create_client
# 创建客户端
client = create_client(
llm_provider="openai",
llm_api_key="your-api-key",
memory_api_key="your-memory-api-key",
)
# 使用记忆
memory = client.memory
await memory.add(
messages=[{"role": "user", "content": "Hello"}],
user_id="user123",
character_id="assistant"
)
# 创建对话智能体
agent = client.create_chat_agent(name="my_agent")
aigility/
├── core/ # 核心配置和类型
├── memory/ # 记忆管理
├── chat/ # 基础对话
├── chatflow/ # 对话流管理
├── workflow/ # 工作流引擎
├── rag/ # RAG 检索增强生成
│ ├── service.py # RAG 服务
│ ├── workflow.py # RAG 工作流
│ ├── embeddings/ # Embedding 模型
│ ├── vector_stores/ # 向量存储
│ └── ingestion.py # 文档摄取
├── adp/ # ADP 服务客户端
└── client.py # 主客户端
MIT License
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.1.1 | 28 Sept 2026 | 44 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 10:49 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:28624298ec9e6be45416d9fdcae2080fb255dc4d39373336b04158955ab7f530