Current
Procedural knowledge
Benchmark first
Corpora: KILT, QASC, and LongMemEval, plus repository-owned golden tool traces for workflow replay.
Protocol: Separate retrieval/evidence quality from agent execution. Report task success, exact and partial tool-sequence match, argument validity, tool-error recovery, grounded-output rate, trajectory cost, and reused-procedure uplift. Evaluate mined procedures on held-out tasks and reject any train/test source overlap.
Successful trajectories produce versioned procedure candidates. Regression gates and human review separate observed behavior from active behavior.
How it works
Cluster successful traces by reviewed intent, extract a parameterized tool/action sequence with preconditions and failure exits, and retain links to the source traces. Replay the candidate on held-out cases, compare task success, tool correctness, grounding, cost, and regressions with the active version, then produce a review proposal. Only an explicit application commit can activate a version; failed attempts remain negative evidence.
Research basisVoyager stores compositional skills and improves them using execution feedback, errors, and self-verification. Reflexion retains verbal feedback for later trials. They motivate persistent procedural candidates; held-out regression gates and human promotion are conservative Mari policies, not conclusions of either paper.
trajectories*→candidate→regression suite→review→*active version
from mari_components.trajectories import TrajectoryStep, learn_procedure
runs = {
"run-1": [
TrajectoryStep(0, "lookup_policy", "inspect", {"tier": "enterprise"}, ok=True),
TrajectoryStep(1, "issue_refund", "execute", {"currency": "USD"}, ok=True),
],
"run-2": [
TrajectoryStep(0, "lookup_policy", "inspect", {"tier": "enterprise"}, ok=True),
TrajectoryStep(1, "check_account", "inspect", ok=True),
TrajectoryStep(2, "issue_refund", "execute", {"currency": "USD"}, ok=True),
],
}
candidate = learn_procedure(runs, intent="process enterprise refund")
assert [step.tool for step in candidate.steps] == [
"lookup_policy",
"issue_refund",
]