Metadata-Version: 2.4
Name: attest-ai
Version: 0.3.0
Summary: Test framework for AI agents
Project-URL: Homepage, https://github.com/attest-frameowrk/attest
Project-URL: Repository, https://github.com/attest-frameowrk/attest
Project-URL: Issues, https://github.com/attest-frameowrk/attest/issues
Project-URL: Documentation, https://github.com/attest-frameowrk/attest#readme
Author: Attest Contributors
License-Expression: Apache-2.0
Keywords: agents,ai,evaluation,llm,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Requires-Dist: jsonschema>=4.20
Provides-Extra: all
Requires-Dist: anthropic>=0.30; extra == 'all'
Requires-Dist: google-adk>=1.0; extra == 'all'
Requires-Dist: google-genai>=1.0; extra == 'all'
Requires-Dist: langchain-core>=0.3; extra == 'all'
Requires-Dist: llama-index-core>=0.10.20; extra == 'all'
Requires-Dist: ollama>=0.4; extra == 'all'
Requires-Dist: openai>=1.30; extra == 'all'
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.30; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: twine>=6.0; extra == 'dev'
Provides-Extra: gemini
Requires-Dist: google-genai>=1.0; extra == 'gemini'
Provides-Extra: google-adk
Requires-Dist: google-adk>=1.0; extra == 'google-adk'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
Provides-Extra: llamaindex
Requires-Dist: llama-index-core>=0.10.20; extra == 'llamaindex'
Provides-Extra: ollama
Requires-Dist: ollama>=0.4; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: openai>=1.30; extra == 'openai'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.20; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'otel'
Description-Content-Type: text/markdown

# attest-ai

Test framework for AI agents. Deterministic assertions (schema validation, cost constraints, trace ordering, content matching) over agent execution traces.

## Install

```bash
pip install attest-ai
```

With LLM provider support:

```bash
pip install attest-ai[openai]      # OpenAI
pip install attest-ai[anthropic]   # Anthropic
pip install attest-ai[gemini]      # Google Gemini
pip install attest-ai[ollama]      # Ollama (local)
pip install attest-ai[all]         # All providers
```

## Quick start

```python
import attest
from attest import expect

result = attest.AgentResult(
    trace=trace,  # captured from your agent
    assertion_results=[],
)

# Layer 1: Schema validation
expect(result).output_matches_schema({"type": "object", "required": ["refund_id"]})

# Layer 2: Cost & performance constraints
expect(result).cost_under(0.05)
expect(result).latency_under(5000)

# Layer 3: Trace structure
expect(result).tools_called_in_order(["lookup_order", "process_refund"])
expect(result).no_tool_loops(max_iterations=3)

# Layer 4: Content assertions
expect(result).output_contains("refund")
expect(result).output_not_contains("sorry")
```

## Pytest integration

Attest registers as a pytest plugin automatically:

```bash
pytest tests/ --attest-engine=/path/to/attest-engine
```

## Links

- [Repository](https://github.com/attest-frameowrk/attest)
- [Contributing](https://github.com/attest-frameowrk/attest/blob/main/CONTRIBUTING.md)
- [License](https://github.com/attest-frameowrk/attest/blob/main/LICENSE) (Apache-2.0)
