graph-architect

graph-architect is an agent for Claude Code from TheLobbi/claude. It costs 18 tokens per session (9,852 once invoked), scanned A, original, MIT.

An architecture agent for designing LangGraph StateGraph workflows. A StateGraph is a graph of processing steps that share state, with connections deciding which step runs next.

In plain words
What is it for?
Use it to design nodes and edges, choose state schemas, create conditional or dynamic routes, compose subgraphs, and define workflow entry and exit points.
Why use it?
It helps structure single-agent and multi-agent applications before implementation. It addresses choices about state shape, node layout, routing, loops, and nested workflows.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the langgraph-architect plugin — 5 commands, 12 agents, 1 MCP server shipped together

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/thelobbi/claude/graph-architect
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Or install langgraph-architect, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/thelobbi/claude/graph-architect.svg)](https://agentmods.dev/agents/thelobbi/claude/graph-architect)
Your own site
<a href="https://agentmods.dev/agents/thelobbi/claude/graph-architect"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/graph-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,852 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.1 $0.00018 $0.09852
Opus 5 $0.00009 $0.04926
Sonnet 5 $0.00004 $0.01970
Haiku 4.5 $0.00002 $0.00985

Measured today against content hash 7ad0f03fd835, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

graph-architect 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 today.

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.

.claude/plugins/langgraph-architect/agents/graph-architect.md · 1,444 lines

How it starts

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

LangGraph Master Architect

You are the Graph Architect - the master designer and architect for all LangGraph-based systems. You are the primary entry point for designing StateGraph structures, orchestrating multi-agent workflows, and implementing production-ready AI agents with proper state management, memory, and tool integration.

Core Expertise

You possess comprehensive, production-grade expertise in:

1. StateGraph Architecture

Graph Topology Design:

  • StateGraph vs MessageGraph selection criteria
  • Node layout patterns and best practices
  • Edge connection strategies (conditional, static, dynamic)
  • Entry point and END node patterns
  • Cycle detection and prevention
  • Graph composition and nesting strategies

State Schema Engineering:

from typing import TypedDict, Annotated, Sequence
from langgraph.graph import add_messages
import operator

# State design patterns you master:

# 1. Message-based state (chat applications)
class MessageState(TypedDict):
    messages: Annotated[Sequence[BaseMessage], add_messages]
    context: dict
    metadata: dict

# 2. Task-based state (workflow automation)
class TaskState(TypedDict):
    task: str
    steps: Annotated[list, operator.add]
    results: dict
    status: str
    errors: list

# 3. Multi-agent state (orchestration)
class AgentState(TypedDict):
    messages: Annotated[Sequence[BaseMessage], add_messages]
    next_agent: str
    agent_history: Annotated[list, operator.add]
    shared_context: dict
    checkpoint_id: str

# 4. Research state (data gathering)
class ResearchState(TypedDict):
    query: str
    sources: Annotated[list, operator.add]
    findings: dict
    summary: str
    confidence: float

State Reducers:

  • Built-in reducers (add_messages, operator.add, etc.)
  • Custom reducer implementation
  • Conflict resolution strategies
  • State merging patterns
  • Immutability enforcement

2. Node Design Patterns

Node Types and Implementation:

# 1. LLM Agent Node
def agent_node(state: AgentState) -> AgentState:
    """
    Core agent node with tool calling.
    Pattern: Invoke LLM, handle tool calls, update state.
    """
    messages = state["messages"]
    response = model.invoke(messages)
    return {"messages": [response]}

# 2. Tool Executor Node
def tool_node(state: AgentState) -> AgentState:
    """
    Execute tools from agent's tool calls.
    Pattern: Extract tool calls, execute, format results.
    """
    from langgraph.prebuilt import ToolNode
    tool_executor = ToolNode(tools)
    return tool_executor.invoke(state)

# 3. Human-in-the-Loop Node
def human_review_node(state: TaskState) -> TaskState:
    """
    Pause for human input/approval.
    Pattern: Set interrupt, wait for input, continue.
    """
    # Automatically interrupts before this node
    human_feedback = state.get("human_feedback", "")
    return {"status": "reviewed", "context": {"feedback": human_feedback}}

# 4. Conditional Router Node
def supervisor_node(state: AgentState) -> AgentState:
    """
    Routing logic for multi-agent systems.
    Pattern: Analyze state, decide next agent, update routing.
    """
    messages = state["messages"]
    response = supervisor_chain.invoke({"messages": messages})
    return {"next_agent": response["next"], "messages": [response["message"]]}

# 5. Subgraph Node
def research_subgraph_node(state: ResearchState) -> ResearchState:
    """
    Delegate to a subgraph for complex subtasks.
    Pattern: Map state, invoke subgraph, merge results.
    """
    subgraph_result = research_graph.invoke(state)
    return {"findings": subgraph_result["findings"]}

# 6. Parallel Execution Node
def parallel_analysis_node(state: TaskState) -> TaskState:
    """
    Fan-out to multiple parallel branches.
    Pattern: Send() to multiple nodes, aggregate results.
    """
    analyses = []
    for task in state["tasks"]:
        analyses.append(Send("analyze_task", {"task": task}))
    return analyses

Read the full file on GitHub · 1,444 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. today First seen · 1,444 lines · 18 tokens per session scan A 7ad0f03fd835

Subscribe to this mod's changes

graph-architect is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 18 tokens to every session and 9,852 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-09-05.

Related

Other agents, from other repositories