{"id":23044,"library":"camel-ai","title":"CAMEL: Communicative Agents for AI Society Study","description":"CAMEL is a multi-agent communication framework for building autonomous AI agents that can role-play, collaborate, and solve complex tasks. It provides model backends (OpenAI, Anthropic, DeepSeek, etc.), toolkits, memory, and planning. Current stable version is 0.2.90 (Python 3.10–3.14). Development is active with frequent pre-releases (e.g., 0.2.91a4).","status":"active","version":"0.2.90","language":"python","source_language":"en","source_url":"https://github.com/camel-ai/camel","tags":["multi-agent","llm","ai","framework","role-playing"],"install":[{"cmd":"pip install camel-ai","lang":"bash","label":"Default install"},{"cmd":"pip install 'camel-ai[all]'","lang":"bash","label":"Full install with all extras"}],"dependencies":[{"reason":"Core model backend for GPT/DeepSeek/etc.","package":"openai","optional":false},{"reason":"Anthropic Claude support","package":"anthropic","optional":true}],"imports":[{"note":"ChatAgent lives in camel.agent, not top-level","wrong":"from camel import ChatAgent","symbol":"ChatAgent","correct":"from camel.agent import ChatAgent"},{"note":"ModelFactory is in camel.models","wrong":"from camel import ModelFactory","symbol":"ModelFactory","correct":"from camel.models import ModelFactory"},{"note":"Module is agent (singular), not agents","wrong":"from camel.agents import TaskSpecifyAgent","symbol":"TaskSpecifyAgent","correct":"from camel.agent import TaskSpecifyAgent"},{"note":"RolePlaying is in camel.societies","wrong":"from camel import RolePlaying","symbol":"RolePlaying","correct":"from camel.societies import RolePlaying"}],"quickstart":{"code":"import os\nfrom camel.agent import ChatAgent\nfrom camel.message import SystemMessage, UserMessage\n\n# Set your API key\nos.environ['OPENAI_API_KEY'] = os.environ.get('OPENAI_API_KEY', 'your-key-here')\n\nagent = ChatAgent(\n    system_message=SystemMessage(content=\"You are a helpful assistant.\"),\n    model_type=\"gpt-4o-mini\"\n)\nresponse = agent.step(UserMessage(content=\"What is the capital of France?\"))\nprint(response.msgs[0].content)","lang":"python","description":"Basic ChatAgent example. Requires OPENAI_API_KEY environment variable."},"warnings":[{"fix":"Use `from camel.agent import ChatAgent` (singular) for v0.2.90.","message":"As of v0.2.0, the top-level API was restructured. Many classes moved from `camel.agent` to `camel.agents` (note the 's') and then back. Always check import paths.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Use `ModelFactory.create(model_type='gpt-4o-mini', api_key=...)`.","message":"In v0.2.50+, `ModelFactory.create()` changed signature; `model_name` parameter was renamed to `model_type`.","severity":"breaking","affected_versions":">=0.2.50"},{"fix":"Install extras: `pip install 'camel-ai[all]'` or targeted extras like `camel-ai[anthropic]`.","message":"The library installs with minimal dependencies by default. Many features (e.g., Anthropic, DeepSeek, web search) require extra installs like `camel-ai[anthropic]`.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure all pydantic models use v2 syntax (`BaseModel` from `pydantic` not `pydantic.v1`).","message":"CAMEL uses pydantic v2 for configuration. Mixing pydantic v1 models may cause silent validation failures.","severity":"gotcha","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from camel.agent import ChatAgent` (singular).","cause":"Old code using plural 'agents' after API change.","error":"ModuleNotFoundError: No module named 'camel.agents'"},{"fix":"Correct import: `from camel.agent import ChatAgent`.","cause":"Trying to import ChatAgent from top-level camel instead of camel.agent.","error":"AttributeError: module 'camel' has no attribute 'ChatAgent'"},{"fix":"Use `from camel.models import ModelFactory`.","cause":"ModelFactory is not in top-level camel.","error":"ImportError: cannot import name 'ModelFactory' from 'camel'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}