Metadata-Version: 2.4
Name: smoothie-framework
Version: 0.0.1rc2
Summary: Python capability projections for Smoothie Framework
Author: Smoothie Framework
License-Expression: Apache-2.0
Project-URL: Documentation, https://docs.smoothie.dev/framework/0.1
Project-URL: Issues, https://github.com/Qwirklabs/smoothie/issues
Project-URL: Repository, https://github.com/Qwirklabs/smoothie
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: jsonschema<5,>=4.23
Dynamic: license-file

# Smoothie Framework Python SDK

This experimental SDK independently implements the portable capability slices
selected for Framework 0.1. It does not mirror the TypeScript package tree or
claim capability parity.

The first 0.1 source slice is `smoothie_framework.model`: bounded Model invocation,
result, stream, usage, and safe-error values for `smoothie:model@1`.

```python
from smoothie_framework.model import ModelInvocation, ModelRuntime

result = ModelRuntime(provider).generate(ModelInvocation(
    model="openai/gpt-4.1-mini",
    messages=({"role": "user", "content": "Summarize this ticket."},),
))
```

`ModelRuntime` validates provider output and stream ordering against the
portable contract. Provider configuration and credentials remain native Python
concerns. The initial `OpenAIResponsesProvider` uses the Python standard HTTP
stack, resolves its credential for each request, and caps JSON response bodies
at 16 MiB before parsing.

`smoothie_framework.agent` adds the bounded Framework 0.1 Agent slice:

```python
from smoothie_framework.agent import AgentDefinition, AgentRuntime, AgentTool

agent = AgentRuntime(AgentDefinition(
    name="ticket-agent",
    instructions="Read the ticket before answering.",
    model="openai/gpt-4.1-mini",
    tools=(read_ticket,),
), model_runtime)

result = agent.run("Read ticket T-1")
```

Definitions are side-effect-free; `AgentRuntime` binds one definition to a
Model runtime. The initial synchronous loop is bounded to eight Model turns and
32 Tool executions, validates Tool input before its binding, checks cooperative
cancellation at side-effect boundaries, and emits content-free lifecycle
evidence. It does not claim TypeScript Governance, Worker durability, approval,
steering, routing, or provider parity.
