Metadata-Version: 2.4
Name: parallem
Version: 0.0.2
Summary: A library for building LLM pipelines with built-in support for batch processing and multi-provider compatibility. Beta prerelease - use at your own risk.
Keywords: llm,openai,anthropic,google,batch,pipeline,ai,machine-learning
Author: conjuncts
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
License-File: LICENSE
Requires-Dist: colorama>=0.4.6
Requires-Dist: openai>=1.107.2
Requires-Dist: pillow>=10.0.0
Requires-Dist: polars>=1.32.3
Project-URL: Homepage, https://github.com/conjuncts/parallem
Project-URL: Issues, https://github.com/conjuncts/parallem/issues
Project-URL: Repository, https://github.com/conjuncts/parallem

# ParaLLeM

ParaLLeM is a library for orchestrating agentic LLM workflows.

- Batch API support
- Concise, readable, and **expressive**
- Developer-centered and lightweight
- Parallelize thousands of requests, while keeping reproducible traces for each run
- **Save 50% on all token costs**

Find out more about our mission — [parallem.org](https://parallem.org)

## Quickstart

```bash
pip install parallem
```

```python
from dotenv import load_dotenv
import parallem as pllm

load_dotenv()  # Put OPENAI_API_KEY in the .env file

with pllm.resume_directory(
    ".pllm/simplest",
    provider="openai",
    strategy="sync",
    dashboard=True,
) as orch:
    with orch.agent() as agt:
        resp = agt.ask_llm("Please name a power of 3.")
        agt.print(resp.final_answer)
```

To switch to the Batch API, simply change `strategy="sync"` to `strategy="batch"`.

## Compatibility

| Sync/Batch | OpenAI | Anthropic | Google |
| --- | --- | --- | --- |
| Simple | ✅ | ✅ | ✅ |
| Structured Output | ✅ | ✅ | ✅ |
| Function Calls | ✅ | ✅ | ✅ |
| Web Search | ✅ | ✅ | ✅ |
| Image Input | ✅ | ✅ | ✅ |
| MCP | ✅ | - | - |


## Philosophy

1. We are built from the ground up around the Batch API.
2. Switch between sync (sequential) and batch in just 1 line of code.
3. Control flow is best represented with Python, not data structures.
4. An agent is more than just one LLM.

## Documentation

Please refer to the [documentation](https://parallem-ai.github.io/parallem).

