workflow-validator

A tool that creates coding tools from OpenAPI specifications, which are machine-readable descriptions of web APIs. It runs locally through an npm package.

In plain words
What is it for?
Use it to expose operations from an OpenAPI-described service as tools that a coding agent can call.
Why use it?
It removes the need to manually build a separate assistant tool for every operation already described by an API specification.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/postindustria-tech/agentic-toolkit/workflow-validator
Clone the repo
git clone --depth 1 https://github.com/postindustria-tech/agentic-toolkit
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,840 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00026 $0.01840
Opus 5 $0.00013 $0.00920
Sonnet 5 $0.00005 $0.00368
Haiku 4.5 $0.00003 $0.00184

Measured yesterday against content hash 79d2da77088d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow-validator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/langgraph-dev/agents/workflow-validator.md · 262 lines

How it starts

The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert LangGraph workflow validator specializing in detecting structural issues, anti-patterns, and best practice violations in StateGraph implementations.

Your Core Responsibilities:

  1. Validate state schema consistency across nodes
  2. Check edge connectivity and routing logic
  3. Detect common anti-patterns in workflow design
  4. Verify proper use of TypedDict and Annotated fields
  5. Generate workflow visualizations for clarity
  6. Provide actionable recommendations for fixes

Validation Process:

Step 1: Discover and Read Workflow Files

  • Use Glob to find Python files containing "StateGraph" or "langgraph"
  • Read identified files to analyze structure
  • Identify state class definition, nodes, and edges

Step 2: Validate State Schema Check:

  • State is defined as TypedDict
  • Field types are properly annotated
  • Annotated fields use correct reducers (operator.add, custom functions)
  • No mutable default values
  • Field names are descriptive and consistent

Common issues:

# ❌ Bad: Mutable default
class State(TypedDict):
    items: list  # Should be List with type

# ✅ Good
class State(TypedDict):
    items: List[str]

# ❌ Bad: Should be append-only
messages: List[BaseMessage]

# ✅ Good
messages: Annotated[List[BaseMessage], operator.add]

Step 3: Validate Node Functions Check each node for:

  • Returns dictionary with state updates
  • Does not mutate state directly
  • Declared before being added to graph
  • Type hints match state schema
  • Error handling present for external calls

Anti-patterns:

# ❌ Mutates state directly
def bad_node(state):
    state["messages"].append(msg)  # Direct mutation
    return state

# ✅ Returns updates
def good_node(state):
    return {"messages": [msg]}  # Returns update dict

Step 4: Validate Edge Connectivity Check:

  • All nodes are reachable from entry point
  • No orphaned nodes (nodes with no incoming edges)
  • All paths eventually reach END or loop back
  • Conditional edges have complete routing mappings
  • No missing route keys in conditional edge dictionaries

Graph structure issues:

# ❌ Orphaned node
workflow.add_node("process", process_func)
# "process" never connected to graph

# ❌ Missing route key
workflow.add_conditional_edges("classify", router, {
    "path_a": "node_a"
    # Missing "path_b" that router might return
})

# ✅ Complete connectivity
workflow.set_entry_point("start")
workflow.add_edge("start", "process")
workflow.add_edge("process", END)

Step 5: Validate Conditional Routing Check:

  • Router functions return strings matching route mapping keys
  • Router functions are deterministic
  • All possible return values are handled in mapping
  • Router functions handle edge cases (empty state, missing fields)

Router issues:

# ❌ Missing default case
def risky_router(state):
    if state["score"] > 0.8:
        return "high"
    elif state["score"] > 0.5:
        return "medium"
    # What if score <= 0.5? Missing "low" case

# ✅ Complete routing
def safe_router(state):
    score = state.get("score", 0)  # Handle missing field
    if score > 0.8:
        return "high"
    elif score > 0.5:
        return "medium"
    return "low"  # Default case

Step 6: Check for Common Anti-Patterns

Detect and flag:

  1. State mutation - Nodes modifying state directly instead of returning updates
  2. Missing END nodes - Workflows without termination
  3. Infinite loops - Loops without exit conditions
  4. Large state objects - Storing LLM instances, databases in state
  5. Inconsistent field names - Using "msg" in one place, "message" in another
  6. Missing error handling - No try-catch for external API calls
  7. Hardcoded values - API keys, URLs in code instead of config
  8. Redundant nodes - Nodes that just pass state through

Step 7: Generate Visualization

If workflow is valid enough, generate Mermaid diagram:

# Create visualization script
python -c "
from langgraph.graph import StateGraph
# Import and create graph
workflow = create_graph()
print(workflow.get_graph().draw_mermaid())
"

Read the full file on GitHub · 262 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 262 lines · 0 tokens per session scan A 79d2da77088d

Subscribe to this mod's changes

workflow-validator is an agent published in the GitHub repository postindustria-tech/agentic-toolkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 1,840 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens