{"id":27717,"library":"ell-ai","title":"ell - The Language Model Programming Library","description":"ell is a Python library for programming language models (LMs) with a functional, composable API. It provides decorators for defining LM prompts, supports multiple model providers (OpenAI, Anthropic, etc.), and includes tools for tracing and versioning. Current version 0.0.17, actively developed with weekly releases.","status":"active","version":"0.0.17","language":"python","source_language":"en","source_url":"https://github.com/MadcowD/ell","tags":["llm","language-model","prompt-engineering","functional-programming"],"install":[{"cmd":"pip install ell-ai","lang":"bash","label":"Install ell"}],"dependencies":[{"reason":"Required for OpenAI model support. API client used internally.","package":"openai","optional":false},{"reason":"Required for Anthropic model support (Claude).","package":"anthropic","optional":true}],"imports":[{"note":"ell is a module, not a class. The library is imported as 'import ell', not a submodule import.","wrong":"from ell import ell","symbol":"ell","correct":"import ell"},{"note":"SimpleModel is a class inside the 'simple' submodule, not directly on ell.","wrong":"from ell import SimpleModel","symbol":"ell.simple","correct":"from ell.simple import SimpleModel"},{"note":"trace is a function and should be imported explicitly. The module itself is not callable.","wrong":"import ell.tracing","symbol":"ell.tracing","correct":"from ell.tracing import trace"}],"quickstart":{"code":"import ell\nimport os\n\n# Initialize ell with an API key\napi_key = os.environ.get('OPENAI_API_KEY', '')\nell.init(api_key=api_key)\n\n# Define a simple prompt\n@ell.simple(model=\"gpt-4\", temperature=0.7)\ndef hello(name: str):\n    \"\"\"You are a helpful assistant. Say hello to {name}.\"\"\"\n    return f\"Hello, {name}!\"\n\n# Run the prompt\nresponse = hello(\"World\")\nprint(response)","lang":"python","description":"Initialize ell, define a prompt with @ell.simple, and call it."},"warnings":[{"fix":"Use `ell.init(api_key='...')` or configure providers via `ell.config`.","message":"In version 0.0.15+, the API for initializing ell changed from `ell.init(api_key=...)` to requiring explicit model provider setup. Older code using `ell.init()` without arguments will fail.","severity":"breaking","affected_versions":"<0.0.15"},{"fix":"Replace `@ell.llm` with `@ell.simple` for single-turn prompts or `@ell.complex` for multi-turn.","message":"The `ell.llm` decorator is deprecated and will be removed in 0.1.0. Use `ell.simple` or `ell.complex` instead.","severity":"deprecated","affected_versions":">=0.0.14, <0.1.0"},{"fix":"Ensure the decorated function returns a string. Use f-strings or string formatting.","message":"Prompt functions must return a string; returning a dict or list will cause a TypeError. The decorator expects a plain string output.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from ell.simple import SimpleModel` or access via `ell.simple.SimpleModel`.","cause":"Trying to import SimpleModel directly from ell instead of ell.simple.","error":"ImportError: cannot import name 'SimpleModel' from 'ell'"},{"fix":"Add `ell.init(api_key='sk-...')` at the top of your script, preferably using environment variables.","cause":"Forgetting to call ell.init() before defining prompts.","error":"RuntimeError: ell.init() must be called before using any models"},{"fix":"Pass the required arguments: `hello(name='World')`.","cause":"Calling a prompt function without the required arguments (the ones defined in the function signature).","error":"TypeError: __call__() missing 1 required positional argument: 'name'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}