Skip to main content

CustomAgents - 灵活、可扩展的多智能体框架

Project description

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)

版本信息

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

custom_agents-0.3.0.tar.gz (193.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

custom_agents-0.3.0-py3-none-any.whl (242.8 kB view details)

Uploaded Python 3

File details

Details for the file custom_agents-0.3.0.tar.gz.

File metadata

  • Download URL: custom_agents-0.3.0.tar.gz
  • Upload date:
  • Size: 193.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for custom_agents-0.3.0.tar.gz
Algorithm Hash digest
SHA256 069e8a460e0131e071f7f3436accf8ab5f6546f3face2cae67c463f3692bf1c4
MD5 13e86db12a7845842d7a81341f532396
BLAKE2b-256 adb019520920280fc794efe5af3c0ea17432e0a7e525b3d24f36a3c867719296

See more details on using hashes here.

File details

Details for the file custom_agents-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: custom_agents-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 242.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for custom_agents-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34fe644532f04a3b0a81a5260b82433bb812f046d62d0f60df1c88cdd2eb522b
MD5 28db37dfbf243dd8c1b78fbd91d3bf80
BLAKE2b-256 8d914326644e0893b148d3f45d52fb9f8a681496c9889e1ed8056510ee26eaee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page