Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    agent handoff contract generator

    1

    Audit and harden data contracts between agents in OpenAI Agents SDK, CrewAI, and LangGraph to prevent silent corruption.

    $14

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    agent handoff contract generator

    agent handoff contract generator

    Example session with this skill installed

    I have a LangGraph setup where nodes update the state using Command(update=...). Sometimes downstream nodes get missing fields and crash. Can you audit my state handoff?

    • Read your context and instructions
    • Compiled the agent handoff contract

    I have audited the LangGraph state handoff in your provided graph definition. The primary issue is the use of TypedDict for your AgentState, which provides static type hints but zero runtime validation. When an upstream node omits a field in Command(update=...), the graph continues with a corrupted state, causing the downstream crashes you observed.

    Handoff Contract Audit

    LocationFrameworkFindingSeverity
    AgentStateLangGraphTypedDict used; no runtime enforcementHigh
    research_nodeLangGraphMissing schemaVersion in update payloadMedium
    writer_nodeLangGraphMissing status field for outcome trackingMedium

    Hardened State Contract

    I have converted your TypedDict to a Pydantic BaseModel and added versioning. This ensures the graph raises a ValidationError immediately at the handoff point if a node returns malformed data.

    from pydantic import BaseModel, Field
    from typing import List, Optional
    
    class AgentState(BaseModel):
        # Added versioning and status for contract safety
        schema_version: str = Field(default="1.0.0")
        status: str = Field(default="pending")
        
        # Your existing fields now with runtime enforcement
        query: str
        documents: List[str] = Field(default_factory=list)
        draft: Optional[str] = None
    
    # Update your node logic to return a validated dict
    # Example for research_node:
    # return Command(update=AgentState(
    #     schema_version="1.0.0",
    #     status="success",
    #     query=state.query,
    #     documents=found_docs
    # ).model_dump())
    

    Next steps

    1. Replace the TypedDict definition of AgentState with the Pydantic BaseModel provided above.
    2. Initialize your graph with the new AgentState model.
    3. Update node return statements to use .model_dump() to ensure the payload is validated before the state update occurs.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    In multi-agent systems, data corruption happens when an upstream agent changes its output shape and a downstream agent silently receives the garbage. This skill audits handoff points in OpenAI Agents SDK, CrewAI, and LangGraph codebases to find these silent failure vectors. It identifies missing schemas and provides the framework-specific code to enforce runtime validation at the exact moment data crosses between agents. ## What it does - **Handoff auditing** scans code for `handoff()` calls, CrewAI `Task` definitions, and LangGraph `Command` updates missing explicit contracts. - **Contract generation** creates Pydantic models or typed schemas that include mandatory `status` and `schemaVersion` fields. - **Runtime enforcement** provides code that fails loud on malformed payloads, preventing silent state corruption. - **Framework-specific wiring** generates diffs for the buyer's actual call sites using the native mechanisms of their chosen SDK. ## How it works 1. **Framework identification** detects if the codebase uses OpenAI Agents SDK, CrewAI, or LangGraph. 2. **Handoff inventory** maps every point where data passes between agents, tasks, or nodes. 3. **Gap reporting** lists every handoff point missing runtime validation, versioning, or status fields. 4. **Validator implementation** generates the missing framework-native code to harden the data contract. ## Frameworks & tools This skill supports OpenAI Agents SDK, CrewAI, and LangGraph. It uses Pydantic for runtime validation and targets the native handoff mechanisms of each framework. ## Why this beats prompting it yourself Generic prompts often suggest framework-agnostic JSON schemas that require custom boilerplate to implement. This skill understands the specific internal validation hooks of each SDK and identifies the specific risk of using `TypedDict` in LangGraph for runtime safety. ## Use cases - Auditing a CrewAI project where unstructured text is passed between tasks without a schema. - Hardening OpenAI Agents SDK handoffs to ensure every transfer includes a status code. - Converting LangGraph `TypedDict` states into Pydantic models for strict runtime enforcement. - Root-causing why a downstream agent is failing due to malformed upstream data. ## Known limitations Does not audit control flow for deadlocks or infinite loops. Only supports OpenAI Agents SDK, CrewAI, and LangGraph. Requires access to the buyer's actual call-site code for accurate diffs.

    Does not audit control flow (deadlocks/loops). Supports only OpenAI Agents SDK, CrewAI, and LangGraph. Requires buyer code for accurate diff generation.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    In multi-agent workflows, a downstream agent can silently receive malformed or incomplete data from an upstream handoff. This skill audits your handoff points (OpenAI Agents SDK handoff(), CrewAI task outputs, LangGraph state passing) for missing schemas, status or version fields, and missing runtime validation, then generates the validator that closes each gap. It checks and fixes the data contract only.

    The skill currently provides native support for the OpenAI Agents SDK, CrewAI, and LangGraph, including specialized handling for LangGraph's TypedDict state transitions.

    No, this skill goes beyond generic advice by generating framework-specific code diffs and Pydantic models that plug directly into your existing call sites and task definitions.

    The skill instructions and three dated reference snapshots, one each for the OpenAI Agents SDK, CrewAI and LangGraph handoff mechanisms. When you run it on your code, your agent produces a gap report and, for each gap, a validator written as a diff against your actual call site. It needs access to your real handoff code.

    While it effectively hardens data integrity and prevents malformed payloads, it does not audit your system's logic for control flow issues like infinite loops or deadlocks.

    New in Agents & Orchestration