Skip to main content

Understanding Context Flow

Context in micro-agent chains refers to the data and insights passed between agents. Unlike traditional programming where you explicitly define data structures, agent context is managed through natural language instructions and structured outputs.

How Context Pass-Through Works

1. Initial Context Creation

When Agent A completes its work, it generates output that becomes context for Agent B:

2. Context Transmission Methods

Method A: Direct Instruction Passing
Method B: Full Context Inclusion
Method C: Structured Data Passing

Context Scoping Strategies

Pass only essential data to reduce token usage:

Rich Context

Include detailed information when downstream agents need full picture:

Progressive Enhancement

Each agent adds to the context:

Verification Per Stage Explained

Verification allows human oversight at critical decision points without interrupting the entire flow.

How Verification Works Technically

  1. Setting Verification Requirements
  2. Runtime Behavior
    • Agent executes Step 1 automatically
    • At Step 2, execution pauses
    • System notifies designated reviewer
    • Reviewer sees output and can:
      • Approve to continue
      • Reject and stop
      • Modify and continue
    • Step 3 executes only after approval
  3. Verification UI Flow

Multi-Stage Verification Patterns

Pattern 1: Department-Based Verification

Pattern 2: Risk-Based Verification

Pattern 3: Parallel Verification

Context Preservation Strategies

1. Chat History Integration

Each agent’s chat preserves full execution context:

2. Explicit State Management

Agents can write to shared knowledge base:

3. Execution Metadata

System automatically tracks:
  • Parent agent that triggered execution
  • Timestamp and duration
  • User who approved verifications
  • Complete input/output for each step

Advanced Context Patterns

Context Transformation

Context Filtering

Context Enrichment

Best Practices

  1. Context Size Management
    • Keep passed context under 1000 tokens when possible
    • Use summaries instead of full documents
    • Reference IDs rather than full records
  2. Verification Placement
    • Add verification before irreversible actions
    • Group related decisions in one verification step
    • Avoid verification on data gathering steps
  3. Context Security
    • Never pass passwords or API keys in context
    • Sanitize PII when not needed downstream
    • Use references to sensitive data instead of values
  4. Error Context
    • Include error handling instructions in context
    • Pass failure reasons to recovery agents
    • Maintain audit trail of verification decisions

Example: Complete Order Processing Chain

Each agent receives only the context it needs, and verification happens only for high-value payments.
Need help setting up verification workflows? Check our agent creation guide or contact support.