Metadata-Version: 2.4
Name: projectkate
Version: 0.1.1
Summary: KATE SDK — local-first auto-eval for AI agents
Project-URL: Homepage, https://www.projectkate.com
Project-URL: Repository, https://github.com/thekateproject/kate-sdk
Author-email: Sagnik <sagnik@projectkate.com>
License: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: aiosqlite>=0.20
Requires-Dist: anthropic>=0.30
Requires-Dist: deepeval>=1.0
Requires-Dist: httpx>=0.27
Requires-Dist: openai>=1.30
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13.0
Requires-Dist: sqlalchemy[asyncio]>=2.0
Provides-Extra: all
Requires-Dist: openinference-instrumentation-anthropic>=0.1.2; extra == 'all'
Requires-Dist: openinference-instrumentation-crewai>=0.1.0; extra == 'all'
Requires-Dist: openinference-instrumentation-google-generativeai>=0.1.0; extra == 'all'
Requires-Dist: openinference-instrumentation-langchain>=0.1.25; extra == 'all'
Requires-Dist: openinference-instrumentation-mistralai>=0.1.0; extra == 'all'
Requires-Dist: openinference-instrumentation-openai>=0.1.4; extra == 'all'
Requires-Dist: openinference-instrumentation-vertexai>=0.1.0; extra == 'all'
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
Provides-Extra: anthropic-instrument
Requires-Dist: openinference-instrumentation-anthropic>=0.1.2; extra == 'anthropic-instrument'
Requires-Dist: opentelemetry-api>=1.20; extra == 'anthropic-instrument'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'anthropic-instrument'
Provides-Extra: crewai
Requires-Dist: openinference-instrumentation-crewai>=0.1.0; extra == 'crewai'
Requires-Dist: opentelemetry-api>=1.20; extra == 'crewai'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: google-genai
Requires-Dist: openinference-instrumentation-google-generativeai>=0.1.0; extra == 'google-genai'
Requires-Dist: opentelemetry-api>=1.20; extra == 'google-genai'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'google-genai'
Provides-Extra: instrument
Requires-Dist: opentelemetry-api>=1.20; extra == 'instrument'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'instrument'
Provides-Extra: langchain
Requires-Dist: openinference-instrumentation-langchain>=0.1.25; extra == 'langchain'
Requires-Dist: opentelemetry-api>=1.20; extra == 'langchain'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'langchain'
Provides-Extra: mistral
Requires-Dist: openinference-instrumentation-mistralai>=0.1.0; extra == 'mistral'
Requires-Dist: opentelemetry-api>=1.20; extra == 'mistral'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'mistral'
Provides-Extra: openai
Requires-Dist: openinference-instrumentation-openai>=0.1.4; extra == 'openai'
Requires-Dist: opentelemetry-api>=1.20; extra == 'openai'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'openai'
Provides-Extra: vertexai
Requires-Dist: openinference-instrumentation-vertexai>=0.1.0; extra == 'vertexai'
Requires-Dist: opentelemetry-api>=1.20; extra == 'vertexai'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'vertexai'
Description-Content-Type: text/markdown

# KATE SDK

Auto-eval and observability for AI agents. Trace every LLM call, run evaluations locally or against a KATE server, and catch regressions before they ship.

## Install

```bash
pip install projectkate
```

### Optional instrumentation extras

```bash
pip install projectkate[openai]                # Auto-instrument OpenAI SDK
pip install projectkate[anthropic-instrument]  # Auto-instrument Anthropic SDK
pip install projectkate[langchain]             # Auto-instrument LangChain / LangGraph
pip install projectkate[all]                   # All supported providers
```

## Quick Start

```python
import projectkate

# Initialize — reads KATE_API_URL, KATE_API_KEY, KATE_AGENT_ID from env
projectkate.init()

# Trace any function that calls an LLM
@projectkate.trace("summarize")
def summarize(text: str) -> str:
    return client.messages.create(
        model="claude-sonnet-4-20250514",
        messages=[{"role": "user", "content": f"Summarize: {text}"}],
    ).content[0].text

# Run context: creates a run, captures traces, triggers eval on exit
async with projectkate.run() as ctx:
    result = summarize("Today's top news stories...")
    ctx.output(result)
```

## Local Eval (no server needed)

Run evaluations locally against your agent with zero infrastructure:

```python
from projectkate.local import LocalEvalRunner

runner = LocalEvalRunner(agent_fn=my_agent)
results = await runner.run(test_cases=[
    {"input": "Summarize the news", "expected": "A concise summary..."},
])
runner.print_results(results)
```

## Documentation

- [Getting Started](docs/getting_started.md) — full integration guide
- [Examples](examples/) — runnable example agents

## License

Apache 2.0 — see [LICENSE](LICENSE).
