Metadata-Version: 2.5
Name: levain-sdk
Version: 0.1.0
Summary: SDK for building Levain agent recipes
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: claude-agent-sdk==0.2.135
Requires-Dist: langchain-core==1.5.6
Provides-Extra: crawler
Requires-Dist: trafilatura==2.1.0; extra == 'crawler'
Provides-Extra: models
Requires-Dist: langchain-anthropic==1.4.3; extra == 'models'
Requires-Dist: langchain-openai==1.2.2; extra == 'models'
Provides-Extra: review
Requires-Dist: fastmcp==3.4.7; extra == 'review'
Requires-Dist: githubkit==0.16.0; extra == 'review'
Description-Content-Type: text/markdown

# levain-sdk

The Python interface that [Levain](https://levainlabs.com) agent
recipes are written against: node helpers, the agentic engine, state
reducers, and tool annotations.

A recipe's node functions import from `levain_sdk`, so this package is
what makes a cloned recipe installable and readable in your editor —
type checking, completion, and `uv sync` all resolve against it.
Agents execute on the Levain platform; this package defines the
contract, it does not run them.

## Install

Recipe packages already declare `levain-sdk`, so inside a cloned
recipe:

```
uv sync
```

Or directly:

```
pip install levain-sdk
```

### Extras

- `models` — direct (non-agentic) LLM calls via `levain_sdk.models`.
- `review` — helpers used by review-oriented recipes.
- `crawler` — main-content extraction for crawling recipes.

Most recipes need none of these; the error message will name the
extra if a module you import requires one.

## Authoring recipes

Validation and code generation live in the companion tool,
[levain-cli](https://pypi.org/project/levain-cli/). The full authoring
guide is at [docs.levainlabs.com](https://docs.levainlabs.com).

## License

Apache-2.0.
