Skip to content

cognis-digital/taskloom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

taskloom

Deterministic, auditable multi-agent orchestration. Register tools, describe a plan (fixed or rule-driven), and taskloom runs them in one loop that records every step to a full execution trace. Same inputs → same trace, every time. Zero dependencies, fully offline.

PyPI CI License: COCL 1.0 Deps

Most agent frameworks are nondeterministic: the model decides the plan, so the same input can take a different path every run — impossible to test, audit, or reproduce. taskloom inverts that. You own the plan (a fixed sequence or explicit rules); the model, if you use one at all, is isolated behind a single tool. The result is orchestration you can unit-test, diff, and put in front of an auditor.

pip install taskloom
taskloom demo            # runs a sample pipeline and prints the full trace
taskloom demo --twice    # proves determinism: two runs, identical traces

See it work

$ taskloom demo
taskloom execution trace
============================================================
  [ok ]  0. load      -> alerts    list[5]
  [ok ]  1. triage    -> hot       list[3]
  [ok ]  2. group     -> by_kind   dict{2}
  [ok ]  3. summarize -> answer    LSASS memory read…; Outbound beacon to 203.0.113.10…
------------------------------------------------------------
  4 step(s), 4 ok, 0 failed

$ taskloom demo --twice
determinism check: traces identical across two runs -> True

Write your own in a few lines

from taskloom import Orchestrator, Plan

orch = Orchestrator()

@orch.tool(description="load the alert feed")
def load():
    return fetch_alerts()

@orch.tool(description="keep only high/critical")
def triage(alerts, min_sev="high"):
    return [a for a in alerts if severity(a) >= level(min_sev)]

plan = (Plan()
        .step("load", out="alerts")
        .step("triage", out="hot", alerts=lambda bb: bb["alerts"], min_sev="critical"))

result = orch.run(plan)          # -> {blackboard, trace, ok, steps}
print(orch.render_trace())       # every step, its inputs, and its result

Step args can be literals or lambda bb: … that read earlier results off the blackboard, so steps chain cleanly. Every call is logged; a tool that raises is captured in the trace (or, with strict=True, halts the run).

Fixed plans or rule-driven

from taskloom import RulePlanner, rule, Step

planner = RulePlanner([
    rule(lambda bb: "alerts" not in bb,            Step("load", out="alerts")),
    rule(lambda bb: any(a.crit for a in bb["alerts"]), Step("page_oncall")),
    rule(lambda bb: True,                          Step("summarize", out="report")),
])
orch.run(planner)   # fires eligible rules in order until none match — still fully deterministic

Why taskloom

LLM-planner agent frameworks taskloom
Reproducible run (same in → same trace)
Unit-testable orchestration hard
Full execution trace / audit log varies ✅ built-in
Works with no model at all
Model isolated to one swappable step
Zero dependencies, offline

The optional LocalModel routes a single summarize/reason step through a local Ollama endpoint (nothing leaves your box); the default DeterministicProvider is extractive and model-free, so even summarization is reproducible.

When to use it

Pipelines you need to trust and rerun: security triage, compliance workflows, data enrichment, incident runbooks, CI automation — anywhere "the agent did something different this time" is unacceptable. Pairs with meldkit (multi-INT fusion) as its orchestration layer.

Install

pip install taskloom        # zero runtime deps, Python 3.10+

License

COCL 1.0. See DISCLAIMER.md.

Part of the Cognis toolset.

About

Deterministic, auditable multi-agent orchestration — register tools, run a fixed or rule-driven plan, get a fully-traced reproducible result. Zero deps, offline.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages