Metadata-Version: 2.4
Name: alloygent
Version: 0.1.1
Summary: A typed Python library for building agent workflows from plain functions.
Project-URL: Homepage, https://github.com/XorenAI/Alloygent
Project-URL: Repository, https://github.com/XorenAI/Alloygent
Project-URL: Issues, https://github.com/XorenAI/Alloygent/issues
Author-email: Jit Debnath <jit.nathdeb@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,orchestration,typed,workflow
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# Alloygent

A typed Python library for building agent workflows from plain functions.

## Install

```bash
pip install alloygent
```

## Development

```bash
uv sync
uv run ruff check .
uv build
```

## Usage

```python
from alloygent import Agent, Context, Model, ModelResponse, tool


class EchoModel(Model):
    def _call(self, messages: list[Context], tools=None, **params) -> ModelResponse:
        last_message = messages[-1].content
        return ModelResponse(message=f"Echo: {last_message}")


@tool()
def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b


agent = Agent(model=EchoModel("echo"), tools=[add])
result = agent.run("hello")
print(result.message)
```

## Publishing

Build and publish from your laptop with a PyPI API token:

```bash
uv build
uv publish --token "pypi-..."
```

The GitHub workflow builds release distributions for tags and manual runs, but
does not upload to PyPI.
