camel-ai 0.2.21__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 (116) 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 +53 -4
  15. camel/datasets/__init__.py +28 -0
  16. camel/datasets/base.py +969 -0
  17. camel/embeddings/openai_embedding.py +10 -1
  18. camel/environments/__init__.py +16 -0
  19. camel/environments/base.py +503 -0
  20. camel/extractors/__init__.py +16 -0
  21. camel/extractors/base.py +263 -0
  22. camel/interpreters/docker/Dockerfile +12 -0
  23. camel/interpreters/docker_interpreter.py +19 -1
  24. camel/interpreters/subprocess_interpreter.py +42 -17
  25. camel/loaders/__init__.py +2 -0
  26. camel/loaders/mineru_extractor.py +250 -0
  27. camel/memories/agent_memories.py +16 -1
  28. camel/memories/blocks/chat_history_block.py +10 -2
  29. camel/memories/blocks/vectordb_block.py +1 -0
  30. camel/memories/context_creators/score_based.py +20 -3
  31. camel/memories/records.py +10 -0
  32. camel/messages/base.py +8 -8
  33. camel/models/__init__.py +2 -0
  34. camel/models/_utils.py +57 -0
  35. camel/models/aiml_model.py +48 -17
  36. camel/models/anthropic_model.py +41 -3
  37. camel/models/azure_openai_model.py +39 -3
  38. camel/models/base_audio_model.py +92 -0
  39. camel/models/base_model.py +132 -4
  40. camel/models/cohere_model.py +88 -11
  41. camel/models/deepseek_model.py +107 -63
  42. camel/models/fish_audio_model.py +18 -8
  43. camel/models/gemini_model.py +133 -15
  44. camel/models/groq_model.py +72 -10
  45. camel/models/internlm_model.py +14 -3
  46. camel/models/litellm_model.py +9 -2
  47. camel/models/mistral_model.py +42 -5
  48. camel/models/model_manager.py +57 -3
  49. camel/models/moonshot_model.py +33 -4
  50. camel/models/nemotron_model.py +32 -3
  51. camel/models/nvidia_model.py +43 -3
  52. camel/models/ollama_model.py +139 -17
  53. camel/models/openai_audio_models.py +87 -2
  54. camel/models/openai_compatible_model.py +37 -3
  55. camel/models/openai_model.py +158 -46
  56. camel/models/qwen_model.py +61 -4
  57. camel/models/reka_model.py +53 -3
  58. camel/models/samba_model.py +209 -4
  59. camel/models/sglang_model.py +153 -14
  60. camel/models/siliconflow_model.py +16 -3
  61. camel/models/stub_model.py +46 -4
  62. camel/models/togetherai_model.py +38 -3
  63. camel/models/vllm_model.py +37 -3
  64. camel/models/yi_model.py +36 -3
  65. camel/models/zhipuai_model.py +38 -3
  66. camel/retrievers/__init__.py +3 -0
  67. camel/retrievers/hybrid_retrival.py +237 -0
  68. camel/toolkits/__init__.py +20 -3
  69. camel/toolkits/arxiv_toolkit.py +2 -1
  70. camel/toolkits/ask_news_toolkit.py +4 -2
  71. camel/toolkits/audio_analysis_toolkit.py +238 -0
  72. camel/toolkits/base.py +22 -3
  73. camel/toolkits/code_execution.py +2 -0
  74. camel/toolkits/dappier_toolkit.py +2 -1
  75. camel/toolkits/data_commons_toolkit.py +38 -12
  76. camel/toolkits/excel_toolkit.py +172 -0
  77. camel/toolkits/function_tool.py +13 -0
  78. camel/toolkits/github_toolkit.py +5 -1
  79. camel/toolkits/google_maps_toolkit.py +2 -1
  80. camel/toolkits/google_scholar_toolkit.py +2 -0
  81. camel/toolkits/human_toolkit.py +0 -3
  82. camel/toolkits/image_analysis_toolkit.py +202 -0
  83. camel/toolkits/linkedin_toolkit.py +3 -2
  84. camel/toolkits/meshy_toolkit.py +3 -2
  85. camel/toolkits/mineru_toolkit.py +178 -0
  86. camel/toolkits/networkx_toolkit.py +240 -0
  87. camel/toolkits/notion_toolkit.py +2 -0
  88. camel/toolkits/openbb_toolkit.py +3 -2
  89. camel/toolkits/page_script.js +376 -0
  90. camel/toolkits/reddit_toolkit.py +11 -3
  91. camel/toolkits/retrieval_toolkit.py +6 -1
  92. camel/toolkits/semantic_scholar_toolkit.py +2 -1
  93. camel/toolkits/stripe_toolkit.py +8 -2
  94. camel/toolkits/sympy_toolkit.py +44 -1
  95. camel/toolkits/video_analysis_toolkit.py +407 -0
  96. camel/toolkits/{video_toolkit.py → video_download_toolkit.py} +21 -25
  97. camel/toolkits/web_toolkit.py +1307 -0
  98. camel/toolkits/whatsapp_toolkit.py +3 -2
  99. camel/toolkits/zapier_toolkit.py +191 -0
  100. camel/types/__init__.py +2 -2
  101. camel/types/agents/__init__.py +16 -0
  102. camel/types/agents/tool_calling_record.py +52 -0
  103. camel/types/enums.py +3 -0
  104. camel/types/openai_types.py +16 -14
  105. camel/utils/__init__.py +2 -1
  106. camel/utils/async_func.py +2 -2
  107. camel/utils/commons.py +114 -1
  108. camel/verifiers/__init__.py +23 -0
  109. camel/verifiers/base.py +340 -0
  110. camel/verifiers/models.py +82 -0
  111. camel/verifiers/python_verifier.py +202 -0
  112. camel_ai-0.2.23.dist-info/METADATA +671 -0
  113. {camel_ai-0.2.21.dist-info → camel_ai-0.2.23.dist-info}/RECORD +127 -99
  114. {camel_ai-0.2.21.dist-info → camel_ai-0.2.23.dist-info}/WHEEL +1 -1
  115. camel_ai-0.2.21.dist-info/METADATA +0 -528
  116. {camel_ai-0.2.21.dist-info → camel_ai-0.2.23.dist-info/licenses}/LICENSE +0 -0
@@ -1,528 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: camel-ai
3
- Version: 0.2.21
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: pyyaml (>=6.0.2,<7.0.0)
95
- Requires-Dist: qdrant-client (>=1.9.0,<2.0.0) ; extra == "rag" or extra == "storage" or extra == "all"
96
- Requires-Dist: rank-bm25 (>=0.2.2,<0.3.0) ; extra == "rag" or extra == "all"
97
- Requires-Dist: redis (>=5.0.6,<6.0.0) ; extra == "storage" or extra == "all"
98
- Requires-Dist: reka-api (>=3.0.8,<4.0.0) ; extra == "model-platforms" or extra == "all"
99
- Requires-Dist: requests_oauthlib (>=1.3.1,<2.0.0) ; extra == "web-tools" or extra == "all"
100
- Requires-Dist: rouge (>=1.0.1,<2.0.0) ; extra == "data-tools" or extra == "all"
101
- Requires-Dist: scholarly[tor] (==1.7.11) ; extra == "research-tools" or extra == "all"
102
- Requires-Dist: sentence-transformers (>=3.0.1,<4.0.0) ; extra == "rag" or extra == "all"
103
- Requires-Dist: sentencepiece (>=0.2,<0.3) ; extra == "huggingface" or extra == "all"
104
- Requires-Dist: sglang (>=0.4.0,<0.5.0) ; extra == "model-platforms" or extra == "all"
105
- Requires-Dist: slack-bolt (>=1.20.1,<2.0.0) ; extra == "communication-tools" or extra == "all"
106
- Requires-Dist: slack-sdk (>=3.27.2,<4.0.0) ; extra == "communication-tools" or extra == "all"
107
- Requires-Dist: soundfile (>=0.13,<0.14) ; extra == "huggingface" or extra == "all"
108
- Requires-Dist: stripe (>=11.3.0,<12.0.0) ; extra == "data-tools" or extra == "all"
109
- Requires-Dist: sympy (>=1.13.3,<2.0.0) ; extra == "web-tools" or extra == "all"
110
- Requires-Dist: tavily-python (>=0.5.0,<0.6.0) ; extra == "web-tools" or extra == "all"
111
- Requires-Dist: textblob (>=0.17.1,<0.18.0) ; extra == "data-tools" or extra == "all"
112
- Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
113
- Requires-Dist: torch (==2.2.1) ; (platform_system == "Darwin" and platform_machine != "arm64") and (extra == "huggingface" or extra == "all")
114
- Requires-Dist: torch (>=2,<3) ; (platform_system != "Darwin" or platform_machine == "arm64") and (extra == "huggingface" or extra == "all")
115
- Requires-Dist: transformers (>=4,<5) ; extra == "huggingface" or extra == "all"
116
- Requires-Dist: tree-sitter (>=0.23.2,<0.24.0) ; extra == "dev-tools" or extra == "all"
117
- Requires-Dist: tree-sitter-python (>=0.23.6,<0.24.0) ; extra == "dev-tools" or extra == "all"
118
- Requires-Dist: unstructured[all-docs] (==0.16.20) ; extra == "rag" or extra == "document-tools" or extra == "all"
119
- Requires-Dist: wikipedia (>=1,<2) ; extra == "web-tools" or extra == "all"
120
- Requires-Dist: wolframalpha (>=5.0.0,<6.0.0) ; extra == "web-tools" or extra == "all"
121
- Requires-Dist: yt-dlp (>=2024.11.4,<2025.0.0) ; extra == "media-tools" or extra == "all"
122
- Project-URL: Documentation, https://docs.camel-ai.org
123
- Project-URL: Homepage, https://www.camel-ai.org/
124
- Project-URL: Repository, https://github.com/camel-ai/camel
125
- Description-Content-Type: text/markdown
126
-
127
- [![Colab][colab-image]][colab-url]
128
- [![Hugging Face][huggingface-image]][huggingface-url]
129
- [![Slack][slack-image]][slack-url]
130
- [![Discord][discord-image]][discord-url]
131
- [![Wechat][wechat-image]][wechat-url]
132
- [![Twitter][twitter-image]][twitter-url]
133
-
134
- ______________________________________________________________________
135
-
136
- # CAMEL: Finding the Scaling Laws of Agents
137
-
138
- [![Python Version][python-image]][python-url]
139
- [![PyTest Status][pytest-image]][pytest-url]
140
- [![Documentation][docs-image]][docs-url]
141
- [![Star][star-image]][star-url]
142
- [![Package License][package-license-image]][package-license-url]
143
-
144
- <p align="center">
145
- <a href="https://github.com/camel-ai/camel#community">Community</a> |
146
- <a href="https://github.com/camel-ai/camel#installation">Installation</a> |
147
- <a href="https://camel-ai.github.io/camel/">Documentation</a> |
148
- <a href="https://github.com/camel-ai/camel/tree/HEAD/examples">Examples</a> |
149
- <a href="https://arxiv.org/abs/2303.17760">Paper</a> |
150
- <a href="https://github.com/camel-ai/camel#citation">Citation</a> |
151
- <a href="https://github.com/camel-ai/camel#contributing-to-camel-">Contributing</a> |
152
- <a href="https://www.camel-ai.org/">CAMEL-AI</a>
153
- </p>
154
-
155
- <p align="center">
156
- <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/logo_light.png' width=800>
157
- </p>
158
-
159
-
160
- ## Community
161
- 🐫 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.
162
-
163
- 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.
164
-
165
- ## What Can You Build With CAMEL?
166
-
167
- ### 🤖 Customize Agents
168
- - Customizable agents are the fundamental entities of the CAMEL architecture. CAMEL empowers you to customize agents using our modular components for specific tasks.
169
-
170
- ### ⚙️ Build Multi-Agent Systems
171
- - We propose a multi-agent framework to address agents' autonomous cooperation challenges, guiding agents toward task completion while maintaining human intentions.
172
-
173
- ### 💻 Practical Applications
174
- - The CAMEL framework serves as a generic infrastructure for a wide range of multi-agent applications, including task automation, data generation, and world simulations.
175
-
176
-
177
- ## Why Should You Use CAMEL?
178
-
179
- 1. Comprehensive Customization and Collaboration:
180
-
181
- - Integrates over 20 advanced model platforms (e.g., commercial models like OpenAI, open-source models such as Llama3, and self-deployment frameworks like Ollama).
182
-
183
- - Supports extensive external tools (e.g., Search, Twitter, Github, Google Maps, Reddit, Slack utilities).
184
- - Includes memory and prompt components for deep customization.
185
- - Facilitates complex multi-agent systems with advanced collaboration features.
186
-
187
-
188
- 2. User-Friendly with Transparent Internal Structure:
189
- - Designed for transparency and consistency in internal structure.
190
-
191
- - Offers comprehensive [tutorials and detailed docstrings](https://docs.camel-ai.org/) for all functions.
192
- - Ensures an approachable learning curve for newcomers.
193
-
194
-
195
- ## Try It Yourself
196
- 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.
197
-
198
- <p align="center">
199
- <img src='https://raw.githubusercontent.com/camel-ai/camel/master/misc/framework.png' width=800>
200
- </p>
201
-
202
- ## Installation
203
-
204
- ### From PyPI
205
-
206
- To install the base CAMEL library:
207
- ```bash
208
- pip install camel-ai
209
- ```
210
-
211
- > **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.
212
-
213
- ```bash
214
- pip install 'camel-ai[all]' # Replace with options below
215
- ```
216
-
217
- Available extras:
218
- - `all`: Includes all features below
219
- - `model_platforms`: OpenAI, Google, Mistral, Anthropic Claude, Cohere etc.
220
- - `huggingface`: Transformers, Diffusers, Accelerate, Datasets, PyTorch etc.
221
- - `rag`: Sentence Transformers, Qdrant, Milvus, BM25 etc.
222
- - `storage`: Neo4j, Redis, Azure Blob, Google Cloud Storage, AWS S3 etc.
223
- - `web_tools`: DuckDuckGo, Wikipedia, WolframAlpha, Google Maps, Weather API etc.
224
- - `document_tools`: PDF, Word, OpenAPI, BeautifulSoup, Unstructured etc.
225
- - `media_tools`: Image Processing, Audio Processing, YouTube Download, FFmpeg etc.
226
- - `communication_tools`: Slack, Discord, Telegram, GitHub, Reddit, Notion etc.
227
- - `data_tools`: Pandas, TextBlob, DataCommons, OpenBB, Stripe etc.
228
- - `research_tools`: arXiv, Google Scholar etc.
229
- - `dev_tools`: Docker, Jupyter, Tree-sitter, Code Interpreter etc.
230
-
231
- Multiple extras can be combined using commas:
232
- ```bash
233
- pip install 'camel-ai[rag,web_tools,document_tools]' # Example: RAG system with web search and document processing
234
- ```
235
-
236
- ### From Docker
237
-
238
- Detailed guidance can be found [here](https://github.com/camel-ai/camel/blob/master/.container/README.md)
239
-
240
- ## Quick Start
241
-
242
- 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:
243
-
244
- ```bash
245
- ModelPlatformType.DEFAULT = "openai"
246
- ModelType.DEFAULT = "gpt-4o-mini"
247
- ```
248
-
249
- ### Setting Default Model Platform and Model Type (Optional)
250
-
251
- You can customize the default model platform and model type by setting the following environment variables:
252
- ```bash
253
- export DEFAULT_MODEL_PLATFORM_TYPE=<your preferred platform> # e.g., openai, anthropic, etc.
254
- export DEFAULT_MODEL_TYPE=<your preferred model> # e.g., gpt-3.5-turbo, gpt-4o-mini, etc.
255
- ```
256
-
257
- ### Setting Your Model API Key (Using OpenAI as an Example)
258
-
259
- **For Bash shell (Linux, macOS, Git Bash on Windows):**
260
-
261
- ```bash
262
- # Export your OpenAI API key
263
- export OPENAI_API_KEY=<insert your OpenAI API key>
264
- OPENAI_API_BASE_URL=<insert your OpenAI API BASE URL> #(Should you utilize an OpenAI proxy service, kindly specify this)
265
- ```
266
-
267
- **For Windows Command Prompt:**
268
-
269
- ```cmd
270
- REM export your OpenAI API key
271
- set OPENAI_API_KEY=<insert your OpenAI API key>
272
- set OPENAI_API_BASE_URL=<insert your OpenAI API BASE URL> #(Should you utilize an OpenAI proxy service, kindly specify this)
273
- ```
274
-
275
- **For Windows PowerShell:**
276
-
277
- ```powershell
278
- # Export your OpenAI API key
279
- $env:OPENAI_API_KEY="<insert your OpenAI API key>"
280
- $env:OPENAI_API_BASE_URL="<insert your OpenAI API BASE URL>" #(Should you utilize an OpenAI proxy service, kindly specify this)
281
- ```
282
-
283
- Replace `<insert your OpenAI API key>` with your actual OpenAI API key in each case. Make sure there are no spaces around the `=` sign.
284
-
285
-
286
- 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.
287
-
288
- **For `.env` File:**
289
-
290
- To simplify the process of managing API Keys, you can use store information in a `.env` file and load them into your application dynamically.
291
-
292
- 1. Modify .env file in the root directory of CAMEL and fill the following lines:
293
-
294
- ```bash
295
- OPENAI_API_KEY=<fill your API KEY here>
296
- ```
297
-
298
- Replace <fill your API KEY here> with your actual API key.
299
-
300
- 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:
301
-
302
- ```python
303
- from dotenv import load_dotenv
304
- import os
305
-
306
- # Load environment variables from the .env file
307
- load_dotenv()
308
- ```
309
- For more details about the key names in project and how to apply key,
310
- you can refer to [here](https://github.com/camel-ai/camel/.env).
311
-
312
- > [!TIP]
313
- > 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.
314
- If you need to overwrite existing environment variables with the values from your `.env` file, use the `override=True` parameter:
315
- > ```python
316
- > load_dotenv(override=True)
317
- > ```
318
-
319
- 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).
320
-
321
- ```bash
322
- # You can change the role pair and initial prompt in role_playing.py
323
- python examples/ai_society/role_playing.py
324
- ```
325
-
326
- Also feel free to run any scripts below that interest you:
327
-
328
- ```bash
329
- # You can change the role pair and initial prompt in these python files
330
-
331
- # Examples of two agents role-playing
332
- python examples/ai_society/role_playing.py
333
-
334
- # The agent answers questions by utilizing code execution tools.
335
- python examples/toolkits/code_execution_toolkit.py
336
-
337
- # Generating a knowledge graph with an agent
338
- python examples/knowledge_graph/knowledge_graph_agent_example.py
339
-
340
- # Multiple agents collaborating to decompose and solve tasks
341
- python examples/workforce/multiple_single_agents.py
342
-
343
- # Use agent to generate creative image
344
- python examples/vision/image_crafting.py
345
- ```
346
- For additional feature examples, see the [`examples`](https://github.com/camel-ai/camel/tree/master/examples) directory.
347
-
348
- ## Documentation
349
-
350
- The [complete documentation](https://camel-ai.github.io/camel/) pages for the CAMEL package. Also, detailed tutorials for each part are provided below:
351
-
352
- ### Agents
353
- Explore different types of agents, their roles, and their applications.
354
-
355
- - **[Creating Your First Agent](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agent.html)**
356
- - **[Creating Your First Agent Society](https://docs.camel-ai.org/cookbooks/basic_concepts/create_your_first_agents_society.html)**
357
- - **[Embodied Agents](https://docs.camel-ai.org/cookbooks/advanced_features/embodied_agents.html)**
358
- - **[Critic Agents](https://docs.camel-ai.org/cookbooks/advanced_features/critic_agents_and_tree_search.html)**
359
-
360
- ---
361
-
362
- ### Key Modules
363
- Core components and utilities to build, operate, and enhance CAMEL-AI agents and societies.
364
-
365
- | Module | Description |
366
- |:---|:---|
367
- | **[Models](https://docs.camel-ai.org/key_modules/models.html)** | Model architectures and customization options for agent intelligence. |
368
- | **[Messages](https://docs.camel-ai.org/key_modules/messages.html)** | Messaging protocols for agent communication. |
369
- | **[Memory](https://docs.camel-ai.org/key_modules/memory.html)** | Memory storage and retrieval mechanisms. |
370
- | **[Tools](https://docs.camel-ai.org/key_modules/tools.html)** | Tools integration for specialized agent tasks. |
371
- | **[Prompts](https://docs.camel-ai.org/key_modules/prompts.html)** | Prompt engineering and customization. |
372
- | **[Tasks](https://docs.camel-ai.org/key_modules/tasks.html)** | Task creation and management for agent workflows. |
373
- | **[Loaders](https://docs.camel-ai.org/key_modules/loaders.html)** | Data loading tools for agent operation. |
374
- | **[Storages](https://docs.camel-ai.org/key_modules/storages.html)** | Storage solutions for agent. |
375
- | **[Society](https://docs.camel-ai.org/key_modules/society.html)** | Components for building agent societies and inter-agent collaboration. |
376
- | **[Embeddings](https://docs.camel-ai.org/key_modules/embeddings.html)** | Embedding models for RAG. |
377
- | **[Retrievers](https://docs.camel-ai.org/key_modules/retrievers.html)** | Retrieval methods for knowledge access. |
378
- ---
379
-
380
- ### Cookbooks
381
- Practical guides and tutorials for implementing specific functionalities in CAMEL-AI agents and societies.
382
-
383
- ### Basic Concepts
384
- | Cookbook | Description |
385
- |:---|:---|
386
- | **[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. |
387
- | **[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. |
388
- | **[Message Cookbook](https://docs.camel-ai.org/cookbooks/basic_concepts/agents_message.html)** | Best practices for message handling in agents. |
389
-
390
- ### Advanced Features
391
- | Cookbook | Description |
392
- |:---|:---|
393
- | **[Tools Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_tools.html)** | Integrating tools for enhanced functionality. |
394
- | **[Memory Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_memory.html)** | Implementing memory systems in agents. |
395
- | **[RAG Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_rag.html)** | Recipes for Retrieval-Augmented Generation. |
396
- | **[Graph RAG Cookbook](https://docs.camel-ai.org/cookbooks/advanced_features/agents_with_graph_rag.html)** | Leveraging knowledge graphs with RAG. |
397
- | **[Track CAMEL Agents with AgentOps](https://docs.camel-ai.org/cookbooks/advanced_features/agents_tracking.html)** | Tools for tracking and managing agents in operations. |
398
- | **[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. |
399
-
400
- ### Data Generation & Model Training
401
- | Cookbook | Description |
402
- |:---|:---|
403
- | **[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. |
404
- | **[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. |
405
- | **[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. |
406
- | **[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. |
407
- | **[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. |
408
- | **[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.|
409
- | **[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.|
410
- | **[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.|
411
-
412
- ### Multi-Agent Systems & Applications
413
- | Cookbook | Description |
414
- |:---|:---|
415
- | **[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. |
416
- | **[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. |
417
- | **[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. |
418
- | **[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. |
419
- | **[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. |
420
- | **[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. |
421
-
422
- ### Data Processing
423
- | Cookbook | Description |
424
- |:---|:---|
425
- | **[Video Analysis](https://docs.camel-ai.org/cookbooks/data_processing/video_analysis.html)** | Techniques for agents in video data analysis. |
426
- | **[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. |
427
- | **[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. |
428
-
429
- ## Utilize Various LLMs as Backends
430
-
431
- For more details, please see our [`Models Documentation`](https://docs.camel-ai.org/key_modules/models.html#).
432
-
433
- ## Data (Hosted on Hugging Face)
434
- | Dataset | Chat format | Instruction format | Chat format (translated) |
435
- |----------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
436
- | **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) |
437
- | **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 |
438
- | **Math** | [Chat format](https://huggingface.co/datasets/camel-ai/math) | x | x |
439
- | **Physics** | [Chat format](https://huggingface.co/datasets/camel-ai/physics) | x | x |
440
- | **Chemistry** | [Chat format](https://huggingface.co/datasets/camel-ai/chemistry) | x | x |
441
- | **Biology** | [Chat format](https://huggingface.co/datasets/camel-ai/biology) | x | x |
442
-
443
- ## Visualizations of Instructions and Tasks
444
-
445
- | Dataset | Instructions | Tasks |
446
- |------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
447
- | **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) |
448
- | **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) |
449
- | **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) |
450
-
451
- ## Implemented Research Ideas from Other Works
452
- 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:
453
- - `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)]
454
-
455
- - `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)]
456
-
457
- - `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)]
458
-
459
- - `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)]
460
-
461
- - `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)]
462
-
463
- ## Other Research Works Based on Camel
464
- - [Agent Trust](http://agent-trust.camel-ai.org/): Can Large Language Model Agents Simulate Human Trust Behavior?
465
-
466
- - [CRAB](https://crab.camel-ai.org/): Cross-environment Agent Benchmark for Multimodal Language Model Agents.
467
-
468
- - OASIS: Open Agents Social Interaction Simulations on a Large Scale.
469
-
470
- We warmly invite you to use CAMEL for your impactful research.
471
-
472
- ## News
473
- 📢 Added support for Qwen models, Deepseek models to the 🐫 CAMEL framework!. (Nov 28, 2024)
474
- - Integrate SGLang into the 🐫 CAMEL framework. (Dec, 13, 2024)
475
- - Integrated Reward Model into the 🐫 CAMEL framework. (Dec, 13, 2024)
476
- - Added GAIA Benchmark! (Dec, 09, 2024)
477
- - ...
478
- - Released AI Society and Code dataset (April 2, 2023)
479
- - Initial release of `CAMEL` python library (March 21, 2023)
480
-
481
- ## Citation
482
- ```
483
- @inproceedings{li2023camel,
484
- title={CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Society},
485
- author={Li, Guohao and Hammoud, Hasan Abed Al Kader and Itani, Hani and Khizbullin, Dmitrii and Ghanem, Bernard},
486
- booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
487
- year={2023}
488
- }
489
- ```
490
- ## Acknowledgment
491
- Special thanks to [Nomic AI](https://home.nomic.ai/) for giving us extended access to their data set exploration tool (Atlas).
492
-
493
- We would also like to thank Haya Hammoud for designing the initial logo of our project.
494
-
495
- ## License
496
-
497
- The source code is licensed under Apache 2.0.
498
-
499
- ## Contributing to CAMEL 🐫
500
- 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. 🤝🚀
501
-
502
- ## Contact
503
- For more information please contact camel.ai.team@gmail.com.
504
-
505
- [python-image]: https://img.shields.io/badge/Python-3.10%2C%203.11%2C%203.12-brightgreen.svg
506
- [python-url]: https://www.python.org/
507
- [pytest-image]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml/badge.svg
508
- [pytest-url]: https://github.com/camel-ai/camel/actions/workflows/pytest_package.yml
509
- [docs-image]: https://img.shields.io/badge/Documentation-grey.svg?logo=github
510
- [docs-url]: https://camel-ai.github.io/camel/index.html
511
- [star-image]: https://img.shields.io/github/stars/camel-ai/camel?label=stars&logo=github&color=brightgreen
512
- [star-url]: https://github.com/camel-ai/camel/stargazers
513
- [package-license-image]: https://img.shields.io/badge/License-Apache_2.0-blue.svg
514
- [package-license-url]: https://github.com/camel-ai/camel/blob/master/licenses/LICENSE
515
-
516
- [colab-url]: https://colab.research.google.com/drive/1AzP33O8rnMW__7ocWJhVBXjKziJXPtim?usp=sharing
517
- [colab-image]: https://colab.research.google.com/assets/colab-badge.svg
518
- [huggingface-url]: https://huggingface.co/camel-ai
519
- [huggingface-image]: https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-CAMEL--AI-ffc107?color=ffc107&logoColor=white
520
- [slack-url]: https://join.slack.com/t/camel-ai/shared_invite/zt-2g7xc41gy-_7rcrNNAArIP6sLQqldkqQ
521
- [slack-image]: https://img.shields.io/badge/Slack-CAMEL--AI-blueviolet?logo=slack
522
- [discord-url]: https://discord.camel-ai.org/
523
- [discord-image]: https://img.shields.io/badge/Discord-CAMEL--AI-7289da?logo=discord&logoColor=white&color=7289da
524
- [wechat-url]: https://ghli.org/camel/wechat.png
525
- [wechat-image]: https://img.shields.io/badge/WeChat-CamelAIOrg-brightgreen?logo=wechat&logoColor=white
526
- [twitter-url]: https://twitter.com/CamelAIOrg
527
- [twitter-image]: https://img.shields.io/twitter/follow/CamelAIOrg?style=social&color=brightgreen&logo=twitter
528
-