← Back to Pull requests

docs: propose Agent Substrate as an agent execution layer #271

Open
unknown opened this pull request with 207 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 14, 2026 01:31 UTC
Author

Summary

Tracking issue: https://github.com/nirmata/ottoflow/issues/272

This PR adds a draft proposal, docs/dev/PROPOSAL_AGENT_SUBSTRATE.md, for running agent steps as Agent Substrate actors, and aligns the existing docs with it.

  • Recommended design: the agent-executor acts as a Substrate gateway. The runner and the exec contract don't change. For an Agent with executionMode: substrate, the gateway resolves the Agent and its MCPServers, creates a step-scoped actor, forwards the request through atenet-router, and deletes the actor afterward.

  • Credentials: LLM keys and remote MCP auth move to Substrate's egress gateway (phase 3), so the sandbox never holds them.

  • Options considered: calling a kagent SandboxAgent through externalAgentRef (unverified), the runner calling Substrate directly, the gateway (recommended), and delegating to kagent.

  • kagent interaction: spec.expose.kagent stays a BYO Agent; a SandboxAgent calling an exposed Workflow is untested; kagent and OttoFlow can share one Substrate install with separate atespaces.
  • Doc alignment

  • docs/dev/DESIGN.md: lists substrate as a future execution mode.

  • docs/dev/PROPOSAL_AGENT_SANDBOXING.md: points to the new proposal instead of deferring Substrate until its API stabilizes.

  • docs/user/tasks/workflows-as-a2a-agents.md: notes that kagent SandboxAgent callers are untested.
  • Testing

    Docs only. I didn't run make test, make lint, make verify-codegen, or make build-cli, because no code or API types change.

    🤖 Generated with Claude Code

    Diff: 207 lines (+155 / -52) across 2 files Reviewer: JimBugwadia Review duration: 5143m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.41) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.41 · 207 lines diff across 2 files
    0.41
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.319
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #271"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 41.4% (MEDIUM) · Higher = larger blast radius
    41.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.6% · Safe to merge
    23.6%