Metadata-Version: 2.4
Name: sefia
Version: 0.1.1
Summary: Define LLM-powered steps as typed async Python functions.
Project-URL: Homepage, https://github.com/nueruyu/sefia
Project-URL: Repository, https://github.com/nueruyu/sefia
Project-URL: Issues, https://github.com/nueruyu/sefia/issues
Project-URL: Documentation, https://github.com/nueruyu/sefia/tree/main/docs
Author: nueruyu
License: MIT License
        
        Copyright (c) 2026 nueruyu
        
        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.
License-File: LICENSE
Keywords: agents,asyncio,durable-execution,human-in-the-loop,inference,llm,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: glyff-file-store>=0.13.0
Requires-Dist: glyff-pydantic>=0.13.0
Requires-Dist: glyff>=0.13.0
Requires-Dist: jsonschema>=4.18
Requires-Dist: jsonweir>=0.1.0
Requires-Dist: pydantic>=2.0
Requires-Dist: typing-extensions>=4.6
Description-Content-Type: text/markdown

# sefia

**S**tateless **E**ngraved **F**unction **I**nference **A**bstraction

sefia turns typed Python functions into durable, replayable LLM-backed calls.
An `@infer` function is an abstract method whose implementer is an LLM: the
signature is the input contract, the return type is the validated output
contract, the docstring is the instruction, and the body is `...`.

```python
from pydantic import BaseModel
from sefia import infer


class Summary(BaseModel):
    key_points: list[str]
    uncertainty: str


@infer
async def summarize(article: str) -> Summary:
    """Summarize the article for a technical audience; note key uncertainty."""
    ...
```

Because model and tool steps replay on re-invocation, a call can pause, resume
after a restart, and drive human-in-the-loop flows over ordinary
request/response handlers — with no workflow engine or graph DSL.

## Install

```bash
pip install sefia
```

`sefia` is the core framework: decorators, session, profiles, and the tool
system. It is model-provider-agnostic; to talk to an actual LLM provider, add
an adapter such as
[`sefia-litellm`](https://pypi.org/project/sefia-litellm/), or install the
batteries-included stack [`sefios`](https://pypi.org/project/sefios/).

## Documentation

See the [repository](https://github.com/nueruyu/sefia) for the full README,
tutorial, and architecture docs.

## Status

Early development. APIs may change before v1.0.

## License

MIT
