Metadata-Version: 2.5
Name: hyle-core
Version: 0.1.0a1
Summary: Typed, provider-independent primitives for working with AI models.
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Dist: pydantic>=2.13.4
Requires-Dist: typing-extensions>=4.16.0
Requires-Python: >=3.14
Project-URL: Source, https://github.com/aekn/hyle
Project-URL: Documentation, https://aekn.github.io/hyle/
Project-URL: Issues, https://github.com/aekn/hyle/issues
Import-Name: hyle
Description-Content-Type: text/markdown

# hyle-core

Provider-independent primitives for building AI systems in Python.

## Installation

Requires Python 3.14+.

```bash
uv add hyle-core
```

Provider integrations are installed separately.

## Quick start

Code can depend on capabilities rather than concrete providers:

```python
from hyle import Model, Request


async def summarize(model: Model, text: str) -> str:
    response = await model.generate(Request(text, instructions="Summarize this in one sentence."))
    return response.require_text()
```

Any compatible `Model` can be passed to `summarize`.

Hyle also provides tools, structured output, embeddings, streaming, and a bounded model-tool runtime. Use the runtime where it fits, or compose the lower-level primitives directly when your application needs a different control flow.

Provider integrations can implement the same core interfaces independently. Higher-level application patterns such as agents, crews, and workflows can be built on top with ordinary Python.

Ollama support is available through `hyle-ollama`. Gemini support is planned next.

## Status

Hyle is a personal project built for fun. There is no fixed roadmap or timeline.

Alpha. The API may change.

## License

[MIT](LICENSE)
