Metadata-Version: 2.4
Name: syntropy-core
Version: 0.2.0
Summary: A fair source multi-agent AI framework where agents are organized on a mathematical lattice — Python runtime, SDK, and CLI.
Project-URL: Homepage, https://syntropyos.dev
Project-URL: Documentation, https://syntropyos.dev/docs
Project-URL: Repository, https://github.com/syntropy-os/syntropy
Project-URL: Changelog, https://github.com/syntropy-os/syntropy/blob/main/python/CHANGELOG.md
License-Expression: BUSL-1.1
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.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: httpx<1.0,>=0.28
Requires-Dist: pydantic-settings<3.0,>=2.9
Requires-Dist: pydantic<3.0,>=2.11
Requires-Dist: typer<1.0,>=0.12
Requires-Dist: websockets<16.0,>=13.0
Provides-Extra: dev
Requires-Dist: bandit<2.0,>=1.8; extra == 'dev'
Requires-Dist: hypothesis<7.0,>=6.140; extra == 'dev'
Requires-Dist: mypy<2.0,>=1.17; extra == 'dev'
Requires-Dist: pytest-asyncio<2.0,>=1.1; extra == 'dev'
Requires-Dist: pytest-cov<7.0,>=6.3; extra == 'dev'
Requires-Dist: pytest<9.0,>=8.4; extra == 'dev'
Requires-Dist: ruff<0.14,>=0.13; extra == 'dev'
Description-Content-Type: text/markdown

# Syntropy Python

The Python runtime, SDK, and CLI for [Syntropy](https://github.com/syntropy-os/syntropy) — a fair source multi-agent AI framework where agents are organized on a mathematical lattice and hierarchy emerges from interaction, not assignment.

```bash
pip install syntropy-core
```

The distribution is `syntropy-core`; the import stays `import syntropy`.

## Capabilities

- Immutable lattice join and meet operations with deterministic ordering,
  verified against the shared axiom contract that the Elixir runtime also
  enforces (property-based parity tests on both sides).
- Semantic task routing (`single`, `parallel`, `all`, `auto`) with
  explicit-agent overrides, contribution-aware EMA position recomputation, and
  symmetric connection tracking.
- Retained observation events, task history, structural recommendations with
  approval-gated persistent join/meet, and replay snapshots.
- Provider adapters: mock (default), OpenAI-compatible, and Ollama for fully
  offline local runs — selected through runtime settings.
- Pluggable memory stores: in-memory (default) or stdlib-`sqlite3` persistence
  via `SYNTROPY_STORE=sqlite`.
- `GatewayClient`: typed REST client for hosted gateways (agents, runs and
  cancellation, events, history, recommendations, webhook CRUD), plus
  `syntropy.remote.EventChannel` for live websocket event streaming and
  `syntropy.webhooks` HMAC signature helpers.
- A `syntropy` CLI: `run`, `review` (local paths and public GitHub URLs),
  `submit --remote --watch`, `runs`, `agents deploy --preset`,
  `events --follow`, and `trust` for structural decision review.

## Quick start

```bash
# Fully local, no API key (requires Ollama)
SYNTROPY_LLM_PROVIDER=ollama syntropy run "Monolith or microservices for our next product stage?"

# Against a hosted gateway
export SYNTROPY_GATEWAY_URL=https://your-gateway.example.com
export SYNTROPY_API_TOKEN=syn_...
syntropy submit "Review our failover strategy" --remote --watch
```

Examples live in `examples/` — start with `01_basic_lattice.py` (local
lattice) and `02_remote_gateway.py` (hosted gateway).

## License

Fair Source, [Business Source License 1.1](LICENSE): free for development,
evaluation, research, and personal use; free in production under US $1M
revenue/funding; each version converts to Apache 2.0 four years after release.
