Sgraal + AgentKit

Memory safety for 17-subagent workflows and 100+ skills.

The problem

When 17 subagents share memory, drift and consensus collapse risk compounds. A planner agent's assumption becomes an executor's fact. An error in one agent's memory propagates silently through the chain.

Cross-agent validation

from sgraal import SgraalClient

client = SgraalClient("sg_demo_playground")

# Collect outputs from multiple subagents
agent_outputs = {
    "planner": "Deploy feature X to production",
    "reviewer": "Code review passed for feature X",
    "tester": "All tests green for feature X",
}

# Validate cross-agent consensus before executing
result = client.preflight(
    memory_state=[
        {"id": f"agent_{name}", "content": output,
         "type": "semantic", "timestamp_age_days": 0,
         "source_trust": 0.85, "source_conflict": 0.05,
         "downstream_count": 3,
         "provenance_chain": [name]}
        for name, output in agent_outputs.items()
    ],
    domain="coding",
    action_type="irreversible"
)

if result["recommended_action"] == "USE_MEMORY":
    deploy()

Key detections for AgentKit

provenance_chain

Track which subagent produced each memory. Detect circular references.

consensus_collapse

Catch 17 agents agreeing on the same wrong fact from a single source.

identity_drift

Detect subagent authority creep across the orchestration chain.

Read the full docs