camel-ai 0.2.22__py3-none-any.whl → 0.2.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of camel-ai might be problematic. Click here for more details.

Files changed (110) hide show
  1. camel/__init__.py +1 -1
  2. camel/agents/_types.py +41 -0
  3. camel/agents/_utils.py +188 -0
  4. camel/agents/chat_agent.py +570 -965
  5. camel/agents/knowledge_graph_agent.py +7 -1
  6. camel/agents/multi_hop_generator_agent.py +1 -1
  7. camel/configs/base_config.py +10 -13
  8. camel/configs/deepseek_config.py +4 -30
  9. camel/configs/gemini_config.py +5 -31
  10. camel/configs/openai_config.py +14 -32
  11. camel/configs/qwen_config.py +36 -36
  12. camel/datagen/self_improving_cot.py +81 -3
  13. camel/datagen/self_instruct/filter/instruction_filter.py +19 -3
  14. camel/datagen/self_instruct/self_instruct.py +52 -3
  15. camel/datasets/__init__.py +28 -0
  16. camel/datasets/base.py +969 -0
  17. camel/environments/__init__.py +16 -0
  18. camel/environments/base.py +503 -0
  19. camel/extractors/__init__.py +16 -0
  20. camel/extractors/base.py +263 -0
  21. camel/memories/agent_memories.py +16 -1
  22. camel/memories/blocks/chat_history_block.py +10 -2
  23. camel/memories/blocks/vectordb_block.py +1 -0
  24. camel/memories/context_creators/score_based.py +20 -3
  25. camel/memories/records.py +10 -0
  26. camel/messages/base.py +8 -8
  27. camel/models/__init__.py +2 -0
  28. camel/models/_utils.py +57 -0
  29. camel/models/aiml_model.py +48 -17
  30. camel/models/anthropic_model.py +41 -3
  31. camel/models/azure_openai_model.py +39 -3
  32. camel/models/base_audio_model.py +92 -0
  33. camel/models/base_model.py +88 -13
  34. camel/models/cohere_model.py +88 -11
  35. camel/models/deepseek_model.py +107 -45
  36. camel/models/fish_audio_model.py +18 -8
  37. camel/models/gemini_model.py +133 -15
  38. camel/models/groq_model.py +72 -10
  39. camel/models/internlm_model.py +14 -3
  40. camel/models/litellm_model.py +9 -2
  41. camel/models/mistral_model.py +42 -5
  42. camel/models/model_manager.py +57 -3
  43. camel/models/moonshot_model.py +33 -4
  44. camel/models/nemotron_model.py +32 -3
  45. camel/models/nvidia_model.py +43 -3
  46. camel/models/ollama_model.py +139 -17
  47. camel/models/openai_audio_models.py +87 -2
  48. camel/models/openai_compatible_model.py +37 -3
  49. camel/models/openai_model.py +158 -46
  50. camel/models/qwen_model.py +61 -4
  51. camel/models/reka_model.py +53 -3
  52. camel/models/samba_model.py +209 -4
  53. camel/models/sglang_model.py +153 -14
  54. camel/models/siliconflow_model.py +16 -3
  55. camel/models/stub_model.py +46 -4
  56. camel/models/togetherai_model.py +38 -3
  57. camel/models/vllm_model.py +37 -3
  58. camel/models/yi_model.py +36 -3
  59. camel/models/zhipuai_model.py +38 -3
  60. camel/retrievers/__init__.py +3 -0
  61. camel/retrievers/hybrid_retrival.py +237 -0
  62. camel/toolkits/__init__.py +15 -1
  63. camel/toolkits/arxiv_toolkit.py +2 -1
  64. camel/toolkits/ask_news_toolkit.py +4 -2
  65. camel/toolkits/audio_analysis_toolkit.py +238 -0
  66. camel/toolkits/base.py +22 -3
  67. camel/toolkits/code_execution.py +2 -0
  68. camel/toolkits/dappier_toolkit.py +2 -1
  69. camel/toolkits/data_commons_toolkit.py +38 -12
  70. camel/toolkits/excel_toolkit.py +172 -0
  71. camel/toolkits/function_tool.py +13 -0
  72. camel/toolkits/github_toolkit.py +5 -1
  73. camel/toolkits/google_maps_toolkit.py +2 -1
  74. camel/toolkits/google_scholar_toolkit.py +2 -0
  75. camel/toolkits/human_toolkit.py +0 -3
  76. camel/toolkits/image_analysis_toolkit.py +202 -0
  77. camel/toolkits/linkedin_toolkit.py +3 -2
  78. camel/toolkits/meshy_toolkit.py +3 -2
  79. camel/toolkits/mineru_toolkit.py +2 -2
  80. camel/toolkits/networkx_toolkit.py +240 -0
  81. camel/toolkits/notion_toolkit.py +2 -0
  82. camel/toolkits/openbb_toolkit.py +3 -2
  83. camel/toolkits/page_script.js +376 -0
  84. camel/toolkits/reddit_toolkit.py +11 -3
  85. camel/toolkits/retrieval_toolkit.py +6 -1
  86. camel/toolkits/semantic_scholar_toolkit.py +2 -1
  87. camel/toolkits/stripe_toolkit.py +8 -2
  88. camel/toolkits/sympy_toolkit.py +6 -1
  89. camel/toolkits/video_analysis_toolkit.py +407 -0
  90. camel/toolkits/{video_toolkit.py → video_download_toolkit.py} +21 -25
  91. camel/toolkits/web_toolkit.py +1307 -0
  92. camel/toolkits/whatsapp_toolkit.py +3 -2
  93. camel/toolkits/zapier_toolkit.py +191 -0
  94. camel/types/__init__.py +2 -2
  95. camel/types/agents/__init__.py +16 -0
  96. camel/types/agents/tool_calling_record.py +52 -0
  97. camel/types/enums.py +3 -0
  98. camel/types/openai_types.py +16 -14
  99. camel/utils/__init__.py +2 -1
  100. camel/utils/async_func.py +2 -2
  101. camel/utils/commons.py +114 -1
  102. camel/verifiers/__init__.py +23 -0
  103. camel/verifiers/base.py +340 -0
  104. camel/verifiers/models.py +82 -0
  105. camel/verifiers/python_verifier.py +202 -0
  106. camel_ai-0.2.23.dist-info/METADATA +671 -0
  107. {camel_ai-0.2.22.dist-info → camel_ai-0.2.23.dist-info}/RECORD +122 -97
  108. {camel_ai-0.2.22.dist-info → camel_ai-0.2.23.dist-info}/WHEEL +1 -1
  109. camel_ai-0.2.22.dist-info/METADATA +0 -527
  110. {camel_ai-0.2.22.dist-info → camel_ai-0.2.23.dist-info/licenses}/LICENSE +0 -0
@@ -1,527 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: camel-ai
3
- Version: 0.2.22
4
- Summary: Communicative Agents for AI Society Study
5
- License: Apache-2.0
6
- Keywords: communicative-ai,ai-societies,artificial-intelligence,deep-learning,multi-agent-systems,cooperative-ai,natural-language-processing,large-language-models
7
- Author: CAMEL-AI.org
8
- Requires-Python: >=3.10,<3.13
9
- Classifier: License :: OSI Approved :: Apache Software License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Provides-Extra: all
15
- Provides-Extra: communication-tools
16
- Provides-Extra: data-tools
17
- Provides-Extra: dev-tools
18
- Provides-Extra: document-tools
19
- Provides-Extra: huggingface
20
- Provides-Extra: media-tools
21
- Provides-Extra: model-platforms
22
- Provides-Extra: rag
23
- Provides-Extra: research-tools
24
- Provides-Extra: storage
25
- Provides-Extra: test
26
- Provides-Extra: web-tools
27
- Requires-Dist: PyMuPDF (>=1.22.5,<2.0.0) ; extra == "document-tools" or extra == "all"
28
- Requires-Dist: accelerate (>=0.26.0,<0.27.0) ; extra == "huggingface" or extra == "all"
29
- Requires-Dist: agentops (>=0.3.21,<0.4.0) ; extra == "dev-tools" or extra == "all"
30
- Requires-Dist: aiosqlite (>=0.20.0,<0.21.0) ; extra == "data-tools" or extra == "all"
31
- Requires-Dist: anthropic (>=0.42.0,<0.43.0) ; extra == "model-platforms" or extra == "all"
32
- Requires-Dist: apify_client (>=1.8.1,<2.0.0) ; extra == "web-tools" or extra == "all"
33
- Requires-Dist: arxiv (>=2.1.3,<3.0.0) ; extra == "research-tools" or extra == "all"
34
- Requires-Dist: arxiv2text (>=0.1.14,<0.2.0) ; extra == "research-tools" or extra == "all"
35
- Requires-Dist: asknews (>=0.7.54,<0.8.0) ; extra == "web-tools" or extra == "all"
36
- Requires-Dist: azure-storage-blob (>=12.21.0,<13.0.0) ; extra == "storage" or extra == "all"
37
- Requires-Dist: beautifulsoup4 (>=4,<5) ; extra == "document-tools" or extra == "all"
38
- Requires-Dist: botocore (>=1.35.3,<2.0.0) ; extra == "storage" or extra == "all"
39
- Requires-Dist: cohere (>=5.11.0,<6.0.0) ; extra == "rag" or extra == "model-platforms" or extra == "all"
40
- Requires-Dist: colorama (>=0.4.6,<0.5.0)
41
- Requires-Dist: curl_cffi (==0.6.2)
42
- Requires-Dist: dappier (>=0.3.3,<0.4.0) ; extra == "web-tools" or extra == "all"
43
- Requires-Dist: datacommons (>=1.4.3,<2.0.0) ; extra == "data-tools" or extra == "all"
44
- Requires-Dist: datacommons_pandas (>=0.0.3,<0.0.4) ; extra == "data-tools" or extra == "all"
45
- Requires-Dist: datasets (>=3,<4) ; extra == "huggingface" or extra == "all"
46
- Requires-Dist: diffusers (>=0.25.0,<0.26.0) ; extra == "huggingface" or extra == "all"
47
- Requires-Dist: discord.py (>=2.3.2,<3.0.0) ; extra == "communication-tools" or extra == "all"
48
- Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "dev-tools" or extra == "all"
49
- Requires-Dist: docstring-parser (>=0.15,<0.16)
50
- Requires-Dist: docx2txt (>=0.8,<0.9) ; extra == "document-tools" or extra == "all"
51
- Requires-Dist: duckduckgo-search (>=6.3.5,<7.0.0) ; extra == "web-tools" or extra == "all"
52
- Requires-Dist: e2b-code-interpreter (>=1.0.3,<2.0.0) ; extra == "dev-tools" or extra == "all"
53
- Requires-Dist: eval-type-backport (==0.2.0)
54
- Requires-Dist: ffmpeg-python (>=0.2.0,<0.3.0) ; extra == "media-tools" or extra == "all"
55
- Requires-Dist: firecrawl-py (>=1.0.0,<2.0.0) ; extra == "web-tools" or extra == "all"
56
- Requires-Dist: fish-audio-sdk (>=2024.12.5,<2025.0.0) ; extra == "model-platforms" or extra == "all"
57
- Requires-Dist: google-cloud-storage (>=2.18.0,<3.0.0) ; extra == "storage" or extra == "all"
58
- Requires-Dist: googlemaps (>=4.10.0,<5.0.0) ; extra == "web-tools" or extra == "all"
59
- Requires-Dist: httpx (>=0.23.0,<0.27.3)
60
- Requires-Dist: imageio[pyav] (>=2.34.2,<3.0.0) ; extra == "media-tools" or extra == "all"
61
- Requires-Dist: ipykernel (>=6.0.0,<7.0.0) ; extra == "dev-tools" or extra == "all"
62
- Requires-Dist: jsonschema (>=4,<5)
63
- Requires-Dist: jupyter_client (>=8.6.2,<9.0.0) ; extra == "dev-tools" or extra == "all"
64
- Requires-Dist: linkup-sdk (>=0.2.1,<0.3.0) ; extra == "web-tools" or extra == "all"
65
- Requires-Dist: litellm (>=1.38.1,<2.0.0) ; extra == "model-platforms" or extra == "all"
66
- Requires-Dist: mistralai (>=1.1.0,<2.0.0) ; extra == "model-platforms" or extra == "all"
67
- Requires-Dist: mock (>=5,<6) ; extra == "test"
68
- Requires-Dist: nebula3-python (==3.8.2) ; extra == "rag" or extra == "storage" or extra == "all"
69
- Requires-Dist: neo4j (>=5.18.0,<6.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
70
- Requires-Dist: newspaper3k (>=0.2.8,<0.3.0) ; extra == "web-tools" or extra == "all"
71
- Requires-Dist: notion-client (>=2.2.1,<3.0.0) ; extra == "communication-tools" or extra == "all"
72
- Requires-Dist: numpy (>=1.26,<2.0)
73
- Requires-Dist: openai (>=1.59.7,<2.0.0)
74
- Requires-Dist: openapi-spec-validator (>=0.7.1,<0.8.0) ; extra == "document-tools" or extra == "all"
75
- Requires-Dist: openbb (>=4.3.5,<5.0.0) ; extra == "data-tools" or extra == "all"
76
- Requires-Dist: opencv-python (>=4,<5) ; extra == "huggingface" or extra == "all"
77
- Requires-Dist: outlines (>=0.1.7,<0.2.0) ; extra == "all"
78
- Requires-Dist: pandas (>=1.5.3,<2.0.0) ; extra == "data-tools" or extra == "all"
79
- Requires-Dist: pandasai (>=2.3.0,<3.0.0) ; extra == "rag" or extra == "document-tools" or extra == "all"
80
- Requires-Dist: pandoc (>=2.4,<3.0)
81
- Requires-Dist: pillow (>=10.1.0,<11.0.0) ; extra == "media-tools" or extra == "all"
82
- Requires-Dist: prance (>=23.6.21.0,<24.0.0.0) ; extra == "document-tools" or extra == "all"
83
- Requires-Dist: praw (>=7.7.1,<8.0.0) ; extra == "communication-tools" or extra == "all"
84
- Requires-Dist: protobuf (>=5,<6)
85
- Requires-Dist: psutil (>=5.9.8,<6.0.0)
86
- Requires-Dist: pyTelegramBotAPI (>=4.18.0,<5.0.0) ; extra == "communication-tools" or extra == "all"
87
- Requires-Dist: pydantic (>=1.9,<2.10)
88
- Requires-Dist: pydub (>=0.25.1,<0.26.0) ; extra == "media-tools" or extra == "all"
89
- Requires-Dist: pygithub (>=2.3.0,<3.0.0) ; extra == "communication-tools" or extra == "all"
90
- Requires-Dist: pymilvus (>=2.4.0,<3.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
91
- Requires-Dist: pyowm (>=3.3.0,<4.0.0) ; extra == "web-tools" or extra == "all"
92
- Requires-Dist: pytest (>=7,<8) ; extra == "test"
93
- Requires-Dist: pytest-asyncio (>=0.23.0,<0.24.0) ; extra == "test"
94
- Requires-Dist: qdrant-client (>=1.9.0,<2.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
95
- Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0) ; extra == "rag" or extra == "all"
96
- Requires-Dist: redis (>=5.0.6,<6.0.0) ; extra == "storage" or extra == "all"
97
- Requires-Dist: reka-api (>=3.0.8,<4.0.0) ; extra == "model-platforms" or extra == "all"
98
- Requires-Dist: requests_oauthlib (>=1.3.1,<2.0.0) ; extra == "web-tools" or extra == "all"
99
- Requires-Dist: rouge (>=1.0.1,<2.0.0) ; extra == "data-tools" or extra == "all"
100
- Requires-Dist: scholarly[tor] (==1.7.11) ; extra == "research-tools" or extra == "all"
101
- Requires-Dist: sentence-transformers (>=3.0.1,<4.0.0) ; extra == "rag" or extra == "all"
102
- Requires-Dist: sentencepiece (>=0.2,<0.3) ; extra == "huggingface" or extra == "all"
103
- Requires-Dist: sglang (>=0.4.0,<0.5.0) ; extra == "model-platforms" or extra == "all"
104
- Requires-Dist: slack-bolt (>=1.20.1,<2.0.0) ; extra == "communication-tools" or extra == "all"
105
- Requires-Dist: slack-sdk (>=3.27.2,<4.0.0) ; extra == "communication-tools" or extra == "all"
106
- Requires-Dist: soundfile (>=0.13,<0.14) ; extra == "huggingface" or extra == "all"
107
- Requires-Dist: stripe (>=11.3.0,<12.0.0) ; extra == "data-tools" or extra == "all"
108
- Requires-Dist: sympy (>=1.13.3,<2.0.0) ; extra == "web-tools" or extra == "all"
109
- Requires-Dist: tavily-python (>=0.5.0,<0.6.0) ; extra == "web-tools" or extra == "all"
110
- Requires-Dist: textblob (>=0.17.1,<0.18.0) ; extra == "data-tools" or extra == "all"
111
- Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
112
- Requires-Dist: torch (==2.2.1) ; (platform_system == "Darwin" and platform_machine != "arm64") and (extra == "huggingface" or extra == "all")
113
- Requires-Dist: torch (>=2,<3) ; (platform_system != "Darwin" or platform_machine == "arm64") and (extra == "huggingface" or extra == "all")
114
- Requires-Dist: transformers (>=4,<5) ; extra == "huggingface" or extra == "all"
115
- Requires-Dist: tree-sitter (>=0.23.2,<0.24.0) ; extra == "dev-tools" or extra == "all"
116
- Requires-Dist: tree-sitter-python (>=0.23.6,<0.24.0) ; extra == "dev-tools" or extra == "all"
117
- Requires-Dist: unstructured[all-docs] (==0.16.20) ; extra == "rag" or extra == "document-tools" or extra == "all"
118
- Requires-Dist: wikipedia (>=1,<2) ; extra == "web-tools" or extra == "all"
119
- Requires-Dist: wolframalpha (>=5.0.0,<6.0.0) ; extra == "web-tools" or extra == "all"
120
- Requires-Dist: yt-dlp (>=2024.11.4,<2025.0.0) ; extra == "media-tools" or extra == "all"
121
- Project-URL: Documentation, https://docs.camel-ai.org
122
- Project-URL: Homepage, https://www.camel-ai.org/
123
- Project-URL: Repository, https://github.com/camel-ai/camel
124
- Description-Content-Type: text/markdown
125
-
126
- [![Colab][colab-image]][colab-url]
127
- [![Hugging Face][huggingface-image]][huggingface-url]
128
- [![Slack][slack-image]][slack-url]
129
- [![Discord][discord-image]][discord-url]
130
- [![Wechat][wechat-image]][wechat-url]
131
- [![Twitter][twitter-image]][twitter-url]
132
-
133
- ______________________________________________________________________
134
-
135
- # CAMEL: Finding the Scaling Laws of Agents
136
-
137
- [![Python Version][python-image]][python-url]
138
- [![PyTest Status][pytest-image]][pytest-url]
139
- [![Documentation][docs-image]][docs-url]
140
- [![Star][star-image]][star-url]
141
- [![Package License][package-license-image]][package-license-url]
142
-
143
- <p align="center">
144
- <a href="https://github.com/camel-ai/camel#community">Community</a> |
145
- <a href="https://github.com/camel-ai/camel#installation">Installation</a> |
146
- <a href="https://camel-ai.github.io/camel/">Documentation</a> |
147
- <a href="https://github.com/camel-ai/camel/tree/HEAD/examples">Examples</a> |
148
- <a href="https://arxiv.org/abs/2303.17760">Paper</a> |
149
- <a href="https://github.com/camel-ai/camel#citation">Citation</a> |
150
- <a href="https://github.com/camel-ai/camel#contributing-to-camel-">Contributing</a> |
151
- <a href="https://www.camel-ai.org/">CAMEL-AI</a>
152
- </p>
153
-
154
- <p align="center">
155
- <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png' width=800>
156
- </p>
157
-
158
-
159
- ## Community
160
- 🐫 CAMEL is an open-source community dedicated to finding the scaling laws of agents. We believe that studying these agents on a large scale offers valuable insights into their behaviors, capabilities, and potential risks. To facilitate research in this field, we implement and support various types of agents, tasks, prompts, models, and simulated environments.
161
-
162
- Join us ([*Discord*](https://discord.camel-ai.org/), [*WeChat*](https://ghli.org/camel/wechat.png) or [*Slack*](https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ)) in pushing the boundaries of finding the scaling laws of agents.
163
-
164
- ## What Can You Build With CAMEL?
165
-
166
- ### 🤖 Customize Agents
167
- - Customizable agents are the fundamental entities of the CAMEL architecture. CAMEL empowers you to customize agents using our modular components for specific tasks.
168
-
169
- ### ⚙️ Build Multi-Agent Systems
170
- - We propose a multi-agent framework to address agents' autonomous cooperation challenges, guiding agents toward task completion while maintaining human intentions.
171
-
172
- ### 💻 Practical Applications
173
- - The CAMEL framework serves as a generic infrastructure for a wide range of multi-agent applications, including task automation, data generation, and world simulations.
174
-
175
-
176
- ## Why Should You Use CAMEL?
177
-
178
- 1. Comprehensive Customization and Collaboration:
179
-
180
- - Integrates over 20 advanced model platforms (e.g., commercial models like OpenAI, open-source models such as Llama3, and self-deployment frameworks like Ollama).
181
-
182
- - Supports extensive external tools (e.g., Search, Twitter, Github, Google Maps, Reddit, Slack utilities).
183
- - Includes memory and prompt components for deep customization.
184
- - Facilitates complex multi-agent systems with advanced collaboration features.
185
-
186
-
187
- 2. User-Friendly with Transparent Internal Structure:
188
- - Designed for transparency and consistency in internal structure.
189
-
190
- - Offers comprehensive [tutorials and detailed docstrings](https://docs.camel-ai.org/) for all functions.
191
- - Ensures an approachable learning curve for newcomers.
192
-
193
-
194
- ## Try It Yourself
195
- We provide a [![Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing) demo showcasing a conversation between two ChatGPT agents playing roles as a python programmer and a stock trader collaborating on developing a trading bot for stock market.
196
-
197
- <p align="center">
198
- <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/framework.png' width=800>
199
- </p>
200
-
201
- ## Installation
202
-
203
- ### From PyPI
204
-
205
- To install the base CAMEL library:
206
- ```bash
207
- pip install camel-ai
208
- ```
209
-
210
- > **Note**: Some features may not work without their required dependencies. Install `camel-ai[all]` to ensure all dependencies are available, or install specific extras based on the features you need.
211
-
212
- ```bash
213
- pip install 'camel-ai[all]' # Replace with options below
214
- ```
215
-
216
- Available extras:
217
- - `all`: Includes all features below
218
- - `model_platforms`: OpenAI, Google, Mistral, Anthropic Claude, Cohere etc.
219
- - `huggingface`: Transformers, Diffusers, Accelerate, Datasets, PyTorch etc.
220
- - `rag`: Sentence Transformers, Qdrant, Milvus, BM25 etc.
221
- - `storage`: Neo4j, Redis, Azure Blob, Google Cloud Storage, AWS S3 etc.
222
- - `web_tools`: DuckDuckGo, Wikipedia, WolframAlpha, Google Maps, Weather API etc.
223
- - `document_tools`: PDF, Word, OpenAPI, BeautifulSoup, Unstructured etc.
224
- - `media_tools`: Image Processing, Audio Processing, YouTube Download, FFmpeg etc.
225
- - `communication_tools`: Slack, Discord, Telegram, GitHub, Reddit, Notion etc.
226
- - `data_tools`: Pandas, TextBlob, DataCommons, OpenBB, Stripe etc.
227
- - `research_tools`: arXiv, Google Scholar etc.
228
- - `dev_tools`: Docker, Jupyter, Tree-sitter, Code Interpreter etc.
229
-
230
- Multiple extras can be combined using commas:
231
- ```bash
232
- pip install 'camel-ai[rag,web_tools,document_tools]' # Example: RAG system with web search and document processing
233
- ```
234
-
235
- ### From Docker
236
-
237
- Detailed guidance can be found [here](https://github.com/camel-ai/camel/blob/master/.container/README.md)
238
-
239
- ## Quick Start
240
-
241
- By default, the agent uses the `ModelType.DEFAULT` model from the `ModelPlatformType.DEFAULT`. You can configure the default model platform and model type using environment variables. If these are not set, the agent will fall back to the default settings:
242
-
243
- ```bash
244
- ModelPlatformType.DEFAULT = "openai"
245
- ModelType.DEFAULT = "gpt-4o-mini"
246
- ```
247
-
248
- ### Setting Default Model Platform and Model Type (Optional)
249
-
250
- You can customize the default model platform and model type by setting the following environment variables:
251
- ```bash
252
- export DEFAULT_MODEL_PLATFORM_TYPE=<your preferred platform> # e.g., openai, anthropic, etc.
253
- export DEFAULT_MODEL_TYPE=<your preferred model> # e.g., gpt-3.5-turbo, gpt-4o-mini, etc.
254
- ```
255
-
256
- ### Setting Your Model API Key (Using OpenAI as an Example)
257
-
258
- **For Bash shell (Linux, macOS, Git Bash on Windows):**
259
-
260
- ```bash
261
- # Export your OpenAI API key
262
- export OPENAI_API_KEY=<insert your OpenAI API key>
263
- OPENAI_API_BASE_URL=<insert your OpenAI API BASE URL> #(Should you utilize an OpenAI proxy service, kindly specify this)
264
- ```
265
-
266
- **For Windows Command Prompt:**
267
-
268
- ```cmd
269
- REM export your OpenAI API key
270
- set OPENAI_API_KEY=<insert your OpenAI API key>
271
- set OPENAI_API_BASE_URL=<insert your OpenAI API BASE URL> #(Should you utilize an OpenAI proxy service, kindly specify this)
272
- ```
273
-
274
- **For Windows PowerShell:**
275
-
276
- ```powershell
277
- # Export your OpenAI API key
278
- $env:OPENAI_API_KEY="<insert your OpenAI API key>"
279
- $env:OPENAI_API_BASE_URL="<insert your OpenAI API BASE URL>" #(Should you utilize an OpenAI proxy service, kindly specify this)
280
- ```
281
-
282
- Replace `<insert your OpenAI API key>` with your actual OpenAI API key in each case. Make sure there are no spaces around the `=` sign.
283
-
284
-
285
- Please note that the environment variable is session-specific. If you open a new terminal window or tab, you will need to set the API key again in that new session.
286
-
287
- **For `.env` File:**
288
-
289
- To simplify the process of managing API Keys, you can use store information in a `.env` file and load them into your application dynamically.
290
-
291
- 1. Modify .env file in the root directory of CAMEL and fill the following lines:
292
-
293
- ```bash
294
- OPENAI_API_KEY=<fill your API KEY here>
295
- ```
296
-
297
- Replace <fill your API KEY here> with your actual API key.
298
-
299
- 2. Load the .env file in your Python script: Use the load_dotenv() function from the dotenv module to load the variables from the .env file into the environment. Here's an example:
300
-
301
- ```python
302
- from dotenv import load_dotenv
303
- import os
304
-
305
- # Load environment variables from the .env file
306
- load_dotenv()
307
- ```
308
- For more details about the key names in project and how to apply key,
309
- you can refer to [here](https://github.com/camel-ai/camel/.env).
310
-
311
- > [!TIP]
312
- > By default, the load_dotenv() function does not overwrite existing environment variables that are already set in your system. It only populates variables that are missing.
313
- If you need to overwrite existing environment variables with the values from your `.env` file, use the `override=True` parameter:
314
- > ```python
315
- > load_dotenv(override=True)
316
- > ```
317
-
318
- After setting the OpenAI API key, you can run the `role_playing.py` script. Find tasks for various assistant-user roles [here](https://drive.google.com/file/d/194PPaSTBR07m-PzjS-Ty6KlPLdFIPQDd/view?usp=share_link).
319
-
320
- ```bash
321
- # You can change the role pair and initial prompt in role_playing.py
322
- python examples/ai_society/role_playing.py
323
- ```
324
-
325
- Also feel free to run any scripts below that interest you:
326
-
327
- ```bash
328
- # You can change the role pair and initial prompt in these python files
329
-
330
- # Examples of two agents role-playing
331
- python examples/ai_society/role_playing.py
332
-
333
- # The agent answers questions by utilizing code execution tools.
334
- python examples/toolkits/code_execution_toolkit.py
335
-
336
- # Generating a knowledge graph with an agent
337
- python examples/knowledge_graph/knowledge_graph_agent_example.py
338
-
339
- # Multiple agents collaborating to decompose and solve tasks
340
- python examples/workforce/multiple_single_agents.py
341
-
342
- # Use agent to generate creative image
343
- python examples/vision/image_crafting.py
344
- ```
345
- For additional feature examples, see the [`examples`](https://github.com/camel-ai/camel/tree/master/examples) directory.
346
-
347
- ## Documentation
348
-
349
- The [complete documentation](https://camel-ai.github.io/camel/) pages for the CAMEL package. Also, detailed tutorials for each part are provided below:
350
-
351
- ### Agents
352
- Explore different types of agents, their roles, and their applications.
353
-
354
- - **[Creating Your First Agent](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agent.html)**
355
- - **[Creating Your First Agent Society](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agents_society.html)**
356
- - **[Embodied Agents](https://docs.camel-ai.org/cookbooks/advanced_features/embodied_agents.html)**
357
- - **[Critic Agents](https://docs.camel-ai.org/cookbooks/advanced_features/critic_agents_and_tree_search.html)**
358
-
359
- ---
360
-
361
- ### Key Modules
362
- Core components and utilities to build, operate, and enhance CAMEL-AI agents and societies.
363
-
364
- | Module | Description |
365
- |:---|:---|
366
- | **[Models](https://docs.camel-ai.org/key_modules/models.html)** | Model architectures and customization options for agent intelligence. |
367
- | **[Messages](https://docs.camel-ai.org/key_modules/messages.html)** | Messaging protocols for agent communication. |
368
- | **[Memory](https://docs.camel-ai.org/key_modules/memory.html)** | Memory storage and retrieval mechanisms. |
369
- | **[Tools](https://docs.camel-ai.org/key_modules/tools.html)** | Tools integration for specialized agent tasks. |
370
- | **[Prompts](https://docs.camel-ai.org/key_modules/prompts.html)** | Prompt engineering and customization. |
371
- | **[Tasks](https://docs.camel-ai.org/key_modules/tasks.html)** | Task creation and management for agent workflows. |
372
- | **[Loaders](https://docs.camel-ai.org/key_modules/loaders.html)** | Data loading tools for agent operation. |
373
- | **[Storages](https://docs.camel-ai.org/key_modules/storages.html)** | Storage solutions for agent. |
374
- | **[Society](https://docs.camel-ai.org/key_modules/society.html)** | Components for building agent societies and inter-agent collaboration. |
375
- | **[Embeddings](https://docs.camel-ai.org/key_modules/embeddings.html)** | Embedding models for RAG. |
376
- | **[Retrievers](https://docs.camel-ai.org/key_modules/retrievers.html)** | Retrieval methods for knowledge access. |
377
- ---
378
-
379
- ### Cookbooks
380
- Practical guides and tutorials for implementing specific functionalities in CAMEL-AI agents and societies.
381
-
382
- ### Basic Concepts
383
- | Cookbook | Description |
384
- |:---|:---|
385
- | **[Creating Your First Agent](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agent.html)** | A step-by-step guide to building your first agent. |
386
- | **[Creating Your First Agent Society](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agents_society.html)** | Learn to build a collaborative society of agents. |
387
- | **[Message Cookbook](https://docs.camel-ai.org/cookbooks/basic_concepts/agents_message.html)** | Best practices for message handling in agents. |
388
-
389
- ### Advanced Features
390
- | Cookbook | Description |
391
- |:---|:---|
392
- | **[Tools Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_tools.html)** | Integrating tools for enhanced functionality. |
393
- | **[Memory Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_memory.html)** | Implementing memory systems in agents. |
394
- | **[RAG Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_rag.html)** | Recipes for Retrieval-Augmented Generation. |
395
- | **[Graph RAG Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_graph_rag.html)** | Leveraging knowledge graphs with RAG. |
396
- | **[Track CAMEL Agents with AgentOps](https://docs.camel-ai.org/cookbooks/advanced_features/agents_tracking.html)** | Tools for tracking and managing agents in operations. |
397
- | **[Agents with Human-in-loop and Tool Approval from HumanLayer](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_human_in_loop_and_tool_approval.html)** | Implementing human oversight and tool approval within agent workflows using HumanLayer. |
398
-
399
- ### Data Generation & Model Training
400
- | Cookbook | Description |
401
- |:---|:---|
402
- | **[Data Generation with CAMEL and Finetuning with Unsloth](https://docs.camel-ai.org/cookbooks/data_generation/sft_data_generation_and_unsloth_finetuning_Qwen2_5_7B.html)** | Learn how to generate data with CAMEL and fine-tune models effectively with Unsloth. |
403
- | **[Data Gen with Real Function Calls and Hermes Format](https://docs.camel-ai.org/cookbooks/data_generation/data_gen_with_real_function_calls_and_hermes_format.html)** | Explore how to generate data with real function calls and the Hermes format. |
404
- | **[Self-instruct Data Generation](https://docs.camel-ai.org/cookbooks/data_generation/self_instruct_data_generation.html)** | Explore comprehensive guidelines and best practices for generating self-instructional data, enabling robust model training and improved performance. |
405
- | **[CoT Data Generation and SFT Qwen with Unsolth](https://docs.camel-ai.org/cookbooks/data_generation/cot_data_gen_sft_qwen_unsolth_upload_huggingface.html)** | Discover how to generate CoT data using CAMEL and SFT Qwen with Unsolth, and seamlessly upload your data and model to Huggingface. |
406
- | **[Agentic Data Generation, Evaluation & Filtering with Reward Models](https://docs.camel-ai.org/cookbooks/data_generation/synthetic_dataevaluation&filter_with_reward_model.html)** | Discover methods for generating, evaluating, and filtering agentic data using reward models to enhance the quality and efficiency of your synthetic data pipelines. |
407
- | **[Data Model Generation and Structured Output with Qwen Model](https://docs.camel-ai.org/cookbooks/data_generation/data_model_generation_and_structured_output_with_qwen.html)** |Learn how to generate data models and structured outputs using the Qwen Model for improved data representation.|
408
- | **[Distill Math Reasoning Data from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/distill_math_reasoning_data_from_deepseek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for distilling high-quality maths reasoning data with thought process (Long CoT data)from deepseek R1, and uploading the results to Hugging Face.|
409
- | **[Self-Improving Math Reasoning Data Distillation from DeepSeek R1](https://docs.camel-ai.org/cookbooks/data_generation/self_improving_math_reasoning_data_distillation_from_deepSeek_r1.html)** |Learn how to set up and leverage CAMEL's data distillation pipline for self-improving math reasoning data distillation from deepseek R1, and uploading the results to Hugging Face.|
410
-
411
- ### Multi-Agent Systems & Applications
412
- | Cookbook | Description |
413
- |:---|:---|
414
- | **[Role-Playing Scraper for Report & Knowledge Graph Generation](https://docs.camel-ai.org/cookbooks/applications/roleplaying_scraper.html)** | Create role-playing agents for data scraping and reporting. |
415
- | **[Create A Hackathon Judge Committee with Workforce](https://docs.camel-ai.org/cookbooks/multi_agent_society/workforce_judge_committee.html)** | Building a team of agents for collaborative judging. |
416
- | **[Dynamic Travel Planner Role-Playing: Multi-Agent System with Real-Time Insights Powered by Dappier](https://docs.camel-ai.org/cookbooks/applications/dynamic_travel_planner.html)** | Explore an innovative approach to travel planning, blending AI-driven role-playing and real-time data for seamless experiences. |
417
- | **[Customer Service Discord Bot with Agentic RAG](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG. |
418
- | **[Customer Service Discord Bot with Local Model](https://docs.camel-ai.org/cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG.html)** | Learn how to build a robust customer service bot for Discord using Agentic RAG which supports local deployment. |
419
- | **[Customer Service Discord Bot for Finance with OpenBB](https://docs.camel-ai.org/cookbooks/applications/finance_discord_bot.html)**| Learn how to build a sipmle yet powerful financial data assistant Discord bot using OpenBB tools. |
420
-
421
- ### Data Processing
422
- | Cookbook | Description |
423
- |:---|:---|
424
- | **[Video Analysis](https://docs.camel-ai.org/cookbooks/data_processing/video_analysis.html)** | Techniques for agents in video data analysis. |
425
- | **[3 Ways to Ingest Data from Websites with Firecrawl](https://docs.camel-ai.org/cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl.html)** | Explore three methods for extracting and processing data from websites using Firecrawl. |
426
- | **[Create AI Agents that work with your PDFs](https://docs.camel-ai.org/cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing.html)** | Learn how to create AI agents that work with your PDFs using Chunkr and Mistral AI. |
427
-
428
- ## Utilize Various LLMs as Backends
429
-
430
- For more details, please see our [`Models Documentation`](https://docs.camel-ai.org/key_modules/models.html#).
431
-
432
- ## Data (Hosted on Hugging Face)
433
- | Dataset | Chat format | Instruction format | Chat format (translated) |
434
- |----------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
435
- | **AI Society** | [Chat format](https://huggingface.co/datasets/camel-ai/ai_society/blob/main/ai_society_chat.tar.gz) | [Instruction format](https://huggingface.co/datasets/camel-ai/ai_society/blob/main/ai_society_instructions.json) | [Chat format (translated)](https://huggingface.co/datasets/camel-ai/ai_society_translated) |
436
- | **Code** | [Chat format](https://huggingface.co/datasets/camel-ai/code/blob/main/code_chat.tar.gz) | [Instruction format](https://huggingface.co/datasets/camel-ai/code/blob/main/code_instructions.json) | x |
437
- | **Math** | [Chat format](https://huggingface.co/datasets/camel-ai/math) | x | x |
438
- | **Physics** | [Chat format](https://huggingface.co/datasets/camel-ai/physics) | x | x |
439
- | **Chemistry** | [Chat format](https://huggingface.co/datasets/camel-ai/chemistry) | x | x |
440
- | **Biology** | [Chat format](https://huggingface.co/datasets/camel-ai/biology) | x | x |
441
-
442
- ## Visualizations of Instructions and Tasks
443
-
444
- | Dataset | Instructions | Tasks |
445
- |------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
446
- | **AI Society** | [Instructions](https://atlas.nomic.ai/map/3a559a06-87d0-4476-a879-962656242452/db961915-b254-48e8-8e5c-917f827b74c6) | [Tasks](https://atlas.nomic.ai/map/cb96f41b-a6fd-4fe4-ac40-08e101714483/ae06156c-a572-46e9-8345-ebe18586d02b) |
447
- | **Code** | [Instructions](https://atlas.nomic.ai/map/902d6ccb-0bbb-4294-83a8-1c7d2dae03c8/ace2e146-e49f-41db-a1f4-25a2c4be2457) | [Tasks](https://atlas.nomic.ai/map/efc38617-9180-490a-8630-43a05b35d22d/2576addf-a133-45d5-89a9-6b067b6652dd) |
448
- | **Misalignment** | [Instructions](https://atlas.nomic.ai/map/5c491035-a26e-4a05-9593-82ffb2c3ab40/2bd98896-894e-4807-9ed8-a203ccb14d5e) | [Tasks](https://atlas.nomic.ai/map/abc357dd-9c04-4913-9541-63e259d7ac1f/825139a4-af66-427c-9d0e-f36b5492ab3f) |
449
-
450
- ## Implemented Research Ideas from Other Works
451
- We implemented amazing research ideas from other works for you to build, compare and customize your agents. If you use any of these modules, please kindly cite the original works:
452
- - `TaskCreationAgent`, `TaskPrioritizationAgent` and `BabyAGI` from *Nakajima et al.*: [Task-Driven Autonomous Agent](https://yoheinakajima.com/task-driven-autonomous-agent-utilizing-gpt-4-pinecone-and-langchain-for-diverse-applications/). [[Example](https://github.com/camel-ai/camel/blob/master/examples/ai_society/babyagi_playing.py)]
453
-
454
- - `PersonaHub` from *Tao Ge et al.*: [Scaling Synthetic Data Creation with 1,000,000,000 Personas](https://arxiv.org/pdf/2406.20094). [[Example](https://github.com/camel-ai/camel/blob/master/examples/personas/personas_generation.py)]
455
-
456
- - `Self-Instruct` from *Yizhong Wang et al.*: [SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions](https://arxiv.org/pdf/2212.10560). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/self_instruct/self_instruct.py)]
457
-
458
- - `Source2Synth` from *Alisia Lupidi et al.*: [Source2Synth: Synthetic Data Generation and Curation Grounded in Real Data Sources](https://arxiv.org/abs/2409.08239). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/source2synth.py)]
459
-
460
- - `STaR` from *Eric Zelikman et al.*: [STaR: Bootstrapping Reasoning With Reasoning](https://arxiv.org/abs/2203.14465). [[Example](https://github.com/camel-ai/camel/blob/master/examples/datagen/star)]
461
-
462
- ## Other Research Works Based on Camel
463
- - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
464
-
465
- - [CRAB](https://crab.camel-ai.org/): Cross-environment Agent Benchmark for Multimodal Language Model Agents.
466
-
467
- - OASIS: Open Agents Social Interaction Simulations on a Large Scale.
468
-
469
- We warmly invite you to use CAMEL for your impactful research.
470
-
471
- ## News
472
- 📢 Added support for Qwen models, Deepseek models to the 🐫 CAMEL framework!. (Nov 28, 2024)
473
- - Integrate SGLang into the 🐫 CAMEL framework. (Dec, 13, 2024)
474
- - Integrated Reward Model into the 🐫 CAMEL framework. (Dec, 13, 2024)
475
- - Added GAIA Benchmark! (Dec, 09, 2024)
476
- - ...
477
- - Released AI Society and Code dataset (April 2, 2023)
478
- - Initial release of `CAMEL` python library (March 21, 2023)
479
-
480
- ## Citation
481
- ```
482
- @inproceedings{li2023camel,
483
- title={CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society},
484
- author={Li, Guohao and Hammoud, Hasan Abed Al Kader and Itani, Hani and Khizbullin, Dmitrii and Ghanem, Bernard},
485
- booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
486
- year={2023}
487
- }
488
- ```
489
- ## Acknowledgment
490
- Special thanks to [Nomic AI](https://home.nomic.ai/) for giving us extended access to their data set exploration tool (Atlas).
491
-
492
- We would also like to thank Haya Hammoud for designing the initial logo of our project.
493
-
494
- ## License
495
-
496
- The source code is licensed under Apache 2.0.
497
-
498
- ## Contributing to CAMEL 🐫
499
- We appreciate your interest in contributing to our open-source initiative. We provide a document of [contributing guidelines](https://github.com/camel-ai/camel/blob/master/CONTRIBUTING.md) which outlines the steps for contributing to CAMEL. Please refer to this guide to ensure smooth collaboration and successful contributions. 🤝🚀
500
-
501
- ## Contact
502
- For more information please contact camel.ai.team@gmail.com.
503
-
504
- [python-image]: https://img.shields.io/badge/Python-3.10%2C%203.11%2C%203.12-brightgreen.svg
505
- [python-url]: https://www.python.org/
506
- [pytest-image]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml/badge.svg
507
- [pytest-url]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml
508
- [docs-image]: https://img.shields.io/badge/Documentation-grey.svg?logo=github
509
- [docs-url]: https://camel-ai.github.io/camel/index.html
510
- [star-image]: https://img.shields.io/github/stars/camel-ai/camel?label=stars&logo=github&color=brightgreen
511
- [star-url]: https://github.com/camel-ai/camel/stargazers
512
- [package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
513
- [package-license-url]: https://github.com/camel-ai/camel/blob/master/licenses/LICENSE
514
-
515
- [colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
516
- [colab-image]: https://colab.research.google.com/assets/colab-badge.svg
517
- [huggingface-url]: https://huggingface.co/camel-ai
518
- [huggingface-image]: https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-CAMEL--AI-ffc107?color=ffc107&logoColor=white
519
- [slack-url]: https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ
520
- [slack-image]: https://img.shields.io/badge/Slack-CAMEL--AI-blueviolet?logo=slack
521
- [discord-url]: https://discord.camel-ai.org/
522
- [discord-image]: https://img.shields.io/badge/Discord-CAMEL--AI-7289da?logo=discord&logoColor=white&color=7289da
523
- [wechat-url]: https://ghli.org/camel/wechat.png
524
- [wechat-image]: https://img.shields.io/badge/WeChat-CamelAIOrg-brightgreen?logo=wechat&logoColor=white
525
- [twitter-url]: https://twitter.com/CamelAIOrg
526
- [twitter-image]: https://img.shields.io/twitter/follow/CamelAIOrg?style=social&color=brightgreen&logo=twitter
527
-