Metadata-Version: 2.4
Name: eval-agents
Version: 0.1.2
Summary: AgentLab — a modular framework for building, evaluating, and comparing LLM-powered agents.
Author-email: Your Name <your@email.com>
License: MIT License
        
        Copyright (c) 2024 AgentLab Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/agentlab
Project-URL: Bug Tracker, https://github.com/yourusername/agentlab/issues
Project-URL: Changelog, https://github.com/yourusername/agentlab/blob/main/CHANGELOG.md
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: cohere>=7.0.0
Requires-Dist: sentence-transformers>=2.0.0
Requires-Dist: faiss-cpu>=1.7.0
Requires-Dist: rank-bm25>=0.2.2
Requires-Dist: numpy>=1.24.0
Provides-Extra: llm
Requires-Dist: openai>=1.0.0; extra == "llm"
Requires-Dist: anthropic>=0.20.0; extra == "llm"
Requires-Dist: google-generativeai>=0.5.0; extra == "llm"
Provides-Extra: rerank
Requires-Dist: cohere>=7.0.0; extra == "rerank"
Requires-Dist: sentence-transformers>=2.0.0; extra == "rerank"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: build; extra == "dev"
Dynamic: license-file

# Eval Agents

A modular, composable framework for building, evaluating, and comparing LLM-powered agents.

You write the agent logic. The framework provides the LLMs, embeddings, vector stores, and rerankers — and automatically runs combinatorial experiments to find the best stack.

## Installation

```bash
pip install eval-agents
```

Or with optional provider extras:

```bash
pip install eval-agents[llm]      # OpenAI, Anthropic, Google SDKs
pip install eval-agents[rerank]   # Cohere + CrossEncoder rerankers
pip install eval-agents[dev]      # Development tools
```

## Quick Start

```python
from agentlab.agents import agent
from agentlab.llm import get_llm
from agentlab.embedding import get_embedding
from agentlab.retriever import get_retriever
from agentlab.reranker import get_reranker
from agentlab.execution import run_experiment

# 1. Define your agent using the @agent decorator
@agent(name="my_researcher")
class MyResearcher:
    def __init__(self, llm, embedding=None, vectorstore=None, reranker=None):
        self.llm         = llm
        self.embedding   = embedding
        self.vectorstore = vectorstore
        self.reranker    = reranker

    def run(self, query: str) -> str:
        return self.llm.generate(f"Research: {query}")

# 2. Build components
llm       = get_llm(provider="openai", model="gpt-4o")
embedding = get_embedding(provider="openai", model="text-embedding-3-small")
retriever = get_retriever(provider="faiss")
reranker  = get_reranker(provider="cohere")

# 3. Launch the UI
# agentlab start --app my_project.py

# 4. Run an experiment
result = run_experiment({
    "agents":     ["my_researcher"],
    "llms":       [{"provider": "openai",  "model": "gpt-4o",                "temperature": 0.2}],
    "embeddings": [{"provider": "openai",  "model": "text-embedding-3-small"}],
    "retrievers": [{"provider": "faiss"}],
    "mode": "Sequential"
})
```

## Package Structure

Eval Agents is organized like scoped packages — each sub-package has one clear responsibility:

| Sub-package              | Responsibility                                           |
|--------------------------|----------------------------------------------------------|
| `agentlab`               | Top-level exports and version info                       |
| `agentlab.llm`           | LLM providers (OpenAI, Anthropic, Google, Ollama)        |
| `agentlab.embedding`     | Embedding models (OpenAI, Cohere, Sentence Transformers) |
| `agentlab.retriever`     | Vector, keyword, and hybrid retrieval                    |
| `agentlab.vectorstore`   | Vector stores (FAISS, Pinecone, Chroma, Qdrant)          |
| `agentlab.reranker`      | Rerankers (Cohere API, CrossEncoder local)               |
| `agentlab.agents`        | Agent registry and `@agent` decorator                    |
| `agentlab.execution`     | Experiment runner (Sequential & Parallel)                |
| `agentlab.config`        | API key management and settings                          |

## Run Experiments via UI

The AgentLab UI allows you to:

1. **Register agents** using the `@agent` decorator
2. **Select LLMs** to test: `☑ GPT-4o` `☑ Claude Sonnet` `☑ Gemini 2.5 Pro`
3. **Select Embeddings**: `☑ text-embedding-3-small` `☑ all-MiniLM-L6-v2`
4. **Enter API keys** in the secure settings panel
5. **Click Run** — the engine runs every combination and shows a comparison dashboard

```bash
agentlab start --app my_project.py
```

## Environment Variables

Create a `.env` file in your project root:

```env
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
COHERE_API_KEY=...
VOYAGE_API_KEY=...
```

## License

MIT
