saign
Streaming Artificially Intelligent Graph Navigator
saign (pronounced "sane") is a multi-agent LLM coordination framework built
on top of SGN. It uses SGN's pad-DAG
iteration model as a control-loop substrate: each iteration is a "tick,"
elements maintain explicit state across ticks, and a coordinator gates state
transitions across the fleet.
Status: past the initial skeleton. The architectural spine —
StatefulElement,Coordinator, and theLogSource/LogSinkblackboard cycle-breaker — is in place and exercised end-to-end. LLM integration (via litellm, with a synchronous tool-use loop) and a durableSQLiteBlackboardbackend are implemented. Budget/cost controls are not yet implemented.
Installation
pip install -e ".[dev]"
Example
A minimal saign pipeline has agents (StatefulElement subclasses) and one
coordinator (Coordinator subclass), wired by with_blackboard:
from sgn import Pipeline
from saign import Coordinator, Directive, StatefulElement, with_blackboard
class MyAgent(StatefulElement):
default_states = {"nominal", "diagnosing", "diagnosed", "fixing"}
def decide(self, state, inputs):
# ...inspect inputs, current state, self.latest_directive...
return state
def act(self, state, inputs):
# ...take action, return freeform context for outgoing report...
return {"observation": "..."}
class MyCoordinator(Coordinator):
default_states = {"watching", "deciding"}
def decide(self, state, inputs):
# ...read agent reports from inputs, decide next state...
return state
def act(self, state, inputs):
self._directives = {"agent1": Directive(action="fix", rationale="...")}
return None
a1 = MyAgent(name="agent1", sink_pad_names=["context"],
source_pad_names=["report"], initial_state="nominal")
coord = MyCoordinator(name="coord",
sink_pad_names=["context", "from_agent1"],
source_pad_names=["report", "directives"],
initial_state="watching")
p = Pipeline()
bb = with_blackboard(p, agents=[a1], coordinator=coord, period=1.0)
p.run(auto_parallelize=False)
Topology
log_src.context ──┬→ each agent.context
└→ coord.context
agent.report ──────────┬→ coord.from_<agent>
└→ log_snk.from_<agent> (broadcast)
coord.report ──────→ log_snk.from_<coord>
coord.directives ──────→ log_snk.directives_from_<coord>
Reports flow direct (zero-tick latency). Directives flow through the
blackboard with one-tick delay — this asymmetry is what keeps the topology
a DAG; agents read their latest directive next tick via
StatefulElement.latest_directive.
Related
sgn— the streaming pipeline framework saign is built on.
License
MPL-2.0 (same as SGN).
Metadata
Release files for saign 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| saign-0.1.0.tar.gz | 66.8 kB | Without provenance | Details for saign-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saign-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for saign-0.1.0-py3-none-any.whl |
Total release size: 101.0 kB
Release files / saign-0.1.0.tar.gz
| Download URL | saign-0.1.0.tar.gz |
|---|---|
| Size | 66.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
060f445f5a7caf9c8290ea50ce133bb3c968cca879174edcb869989f99d83172
|
|
BLAKE2b-256 checksum How to use checksums |
86d3468917cf1e5278ce29ac454539b13bbd3dfbd0e2c00273fddf1c45d5aeaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / saign-0.1.0-py3-none-any.whl
| Download URL | saign-0.1.0-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a1a2cb8a75d0bf5f93b27616b104b84b48142bd8c55fec68b57c6e83fd03f1e
|
|
BLAKE2b-256 checksum How to use checksums |
a604be494b23294c68db272805bc697fbb5e4f2ec2fd9a3e3051a026496ee45e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for saign 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.