Graph-based agent framework powered by oauth-codex
Project description
Fabrix
Fabrix is a graph-based agent framework built on top of oauth-codex>=2.2.0.
Key Features
- Graph-based state transitions
- Structured state outputs via Pydantic
- Tool execution with strict, tool-specific argument schemas
- Tool execution with Pydantic parameter validation
- Async-only, streaming-first API
Installation
pip install fabrix
Quickstart
import asyncio
from pydantic import BaseModel
from fabrix import Agent
from fabrix.events import ReasoningEvent, TaskFinishedEvent, ToolEvent
class AddInput(BaseModel):
a: int
b: int
def add_numbers(payload: AddInput) -> int:
return payload.a + payload.b
async def main() -> None:
agent = Agent(
instructions="You are a precise assistant.",
tools=[add_numbers],
)
async for event in agent.run_task_stream("Use add_numbers to compute 3 + 9"):
print(f"[step={event.step}] {event.event_type}")
if isinstance(event, ReasoningEvent):
print("reasoning:", event.reasoning)
elif isinstance(event, ToolEvent):
if event.phase == "start":
print("tool call:", event.tool_name, event.arguments)
elif event.result is not None:
print("tool result:", event.result.model_dump())
elif isinstance(event, TaskFinishedEvent):
print("final:", event.final_output)
asyncio.run(main())
See examples/minimal/quickstart.py and examples/advanced/data_workflow.py for more.
Notes
- Structured state output is compiled to a Structured Outputs-compatible schema subset.
- Tool-call items use strict schemas (
anyOf, nooneOf/const) for provider compatibility. - Every object node is normalized to explicit
properties+requiredconsistency. - Map-like
dict[...]shapes may be narrowed to empty-object constraints for strict compatibility. - Define tool parameters with explicit fields (Pydantic models recommended) for reliable validation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabrix_ai-0.1.0.tar.gz.
File metadata
- Download URL: fabrix_ai-0.1.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31d547171777cd3a3e218df8f2302da8ebc00e18016a4d6b45c845154200ca13
|
|
| MD5 |
a656aae8b7765e2bd7021d94622389a3
|
|
| BLAKE2b-256 |
ef52d60d99874071b1d17d8420135e948a533ec30432f2fd894014622c1382f3
|
Provenance
The following attestation bundles were made for fabrix_ai-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on smturtle2/fabrix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabrix_ai-0.1.0.tar.gz -
Subject digest:
31d547171777cd3a3e218df8f2302da8ebc00e18016a4d6b45c845154200ca13 - Sigstore transparency entry: 953546755
- Sigstore integration time:
-
Permalink:
smturtle2/fabrix@4908be6371dc2cdc2aa3fa7ab272eb4438643628 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4908be6371dc2cdc2aa3fa7ab272eb4438643628 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fabrix_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fabrix_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cae9201a3c0abf6ad5d6b7d9dc1e2bb31a0e78ec21485f55316442900ec49390
|
|
| MD5 |
e7d5929382b2085f22c3715ef0317253
|
|
| BLAKE2b-256 |
18c1d01353848a913c1b1d993f0e7ed2ed85fbeff9fcc52ee883123d62baed4c
|
Provenance
The following attestation bundles were made for fabrix_ai-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on smturtle2/fabrix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabrix_ai-0.1.0-py3-none-any.whl -
Subject digest:
cae9201a3c0abf6ad5d6b7d9dc1e2bb31a0e78ec21485f55316442900ec49390 - Sigstore transparency entry: 953546757
- Sigstore integration time:
-
Permalink:
smturtle2/fabrix@4908be6371dc2cdc2aa3fa7ab272eb4438643628 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/smturtle2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4908be6371dc2cdc2aa3fa7ab272eb4438643628 -
Trigger Event:
push
-
Statement type: