custom_agents
灵活、可扩展的多智能体框架,基于OpenAI原生API构建,提供简洁高效的智能体开发体验。
功能特性
- 多种智能体实现:SimpleAgent、ReActAgent、ReflectionAgent、PlanAndSolveAgent、ToolAwareSimpleAgent
- 强大的工具系统:支持自定义工具、工具链、异步执行
- 核心组件:LLM集成、配置管理、消息系统
- 可扩展的架构:模块化设计,易于扩展和定制
安装
# 从本地安装
pip install -e .
# 或从PyPI安装(当发布后)
pip install custom_agents
快速开始
from custom_agents import SimpleAgent, Config
# 配置LLM
config = Config(api_key="your-api-key")
# 创建智能体
agent = SimpleAgent(config=config)
# 运行智能体
response = agent.run("解释什么是机器学习")
print(response)
工具使用
from custom_agents import ToolAwareSimpleAgent, Config, SearchTool, global_registry
# 注册工具
global_registry.register_tool(SearchTool())
# 创建配置
config = Config(api_key="your-api-key")
# 创建支持工具的智能体
agent = ToolAwareSimpleAgent(config=config)
# 运行智能体(会使用搜索工具)
response = agent.run("2023年世界足球先生是谁?")
print(response)
版本信息
- 版本:0.1.0
- 作者:huangjh
- 邮箱:646624437@qq.com
许可证
MIT License
Metadata
Release files for custom-agents 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| custom_agents-0.3.0.tar.gz | 193.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| custom_agents-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 436.1 kB
Release files / custom_agents-0.3.0.tar.gz
| Download URL | custom_agents-0.3.0.tar.gz |
|---|---|
| Size | 193.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
069e8a460e0131e071f7f3436accf8ab5f6546f3face2cae67c463f3692bf1c4
|
|
BLAKE2b-256 checksum How to use checksums |
adb019520920280fc794efe5af3c0ea17432e0a7e525b3d24f36a3c867719296
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / custom_agents-0.3.0-py3-none-any.whl
| Download URL | custom_agents-0.3.0-py3-none-any.whl |
|---|---|
| Size | 242.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34fe644532f04a3b0a81a5260b82433bb812f046d62d0f60df1c88cdd2eb522b
|
|
BLAKE2b-256 checksum How to use checksums |
8d914326644e0893b148d3f45d52fb9f8a681496c9889e1ed8056510ee26eaee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for custom-agents 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.