Let your agents build together.
A Python library for AI coding agents on one codebase: which tasks are ready, what can run together, what to redo, and which checks passed.
Your agent runner — the program that starts your agents — runs them; Optimal keeps the plan and the record.
Shared plan
Optimal does thisBlueprint = tasks, dependencies and required checks.
Optimal keeps one shared plan; every agent works from the same copy.
Blueprint = tasks, dependencies and required checks. Optimal keeps one shared plan; every agent works from the same copy. The roof waits = a task waits for the tasks it needs. Optimal marks a task ready only after the tasks it needs have passed their checks. Two crews = two agents working at the same time. Optimal says which tasks can run together; your runner starts the agents. New wing = tasks added later. Optimal keeps finished work that is still valid; new tasks join the plan. Rebuilt entrance = a change to one part of the code. Optimal lists exactly which tasks to redo; everything else is reused. New worker, same part = a replacement agent. Your runner restarts the task; Optimal hands it the saved partial work, so it doesn't start from zero. Inspection = your tests and checks. Optimal runs each result's declared checks before it can go into the shared code. Signed ledger = the record of what ran. Optimal keeps a record of which checks ran and passed for every result that went in.
What using it looks like
Private preview — not yet released
from optimal.graph import GraphIndex
graph = GraphIndex([
{"id": "api", "depends_on": []},
{"id": "ui", "depends_on": []},
{"id": "integration", "depends_on": ["api", "ui"]},
])
graph.ready(set()) # ['api', 'ui'] -> run both at once
graph.ready({"api", "ui"}) # ['integration']
graph.invalidation({"api"})["affected"] # ['api', 'integration'] -> redo after an API changefrom optimal.graph import GraphIndex
graph = GraphIndex([
{"id": "api", "depends_on": []},
{"id": "ui", "depends_on": []},
{"id": "integration", "depends_on": ["api", "ui"]},
])
# -> ['api', 'ui']: run both at once
graph.ready(set())
# -> ['integration']
graph.ready({"api", "ui"})
# -> ['api', 'integration']: redo after an API change
graph.invalidation({"api"})["affected"]
Works with: any agent runner that can call Python 3.11+ — no runner-specific integrations ship yet.
Made by: SeaOtter (MIT licence).
Availability: private preview by invitation.