create-agent

A command that generates a ReAct software agent, meaning an agent that reasons through tasks and calls tools as needed. It creates the agent, tool definitions, state structure, and README using the project's settings.

In plain words
What is it for?
Creating an agent with web search, calculations, or custom tools, then generating its Python files and documentation.
Why use it?
It avoids building the basic agent structure and tool-routing code by hand. This gives development a consistent starting point.

Command

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 commands/postindustria-tech/agentic-toolkit/create-agent
Clone the repo
git clone --depth 1 https://github.com/postindustria-tech/agentic-toolkit
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 790 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.00015 $0.00790
Opus 5 $0.00008 $0.00395
Sonnet 5 $0.00003 $0.00158
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

create-agent 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/commands/create-agent.md · 145 lines

How it starts

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

Create ReAct Agent

Generate a complete ReAct agent with tool calling, ToolNode integration, and conditional routing.

Instructions for Claude

1. Gather Requirements

Ask user for:

  • Agent name (if not provided)
  • Tools to include (if --tools not provided):
    • Search (web search)
    • Calculator (math operations)
    • Custom tools (user-defined)
  • Purpose/domain of the agent

2. Read Settings

Check .claude/langgraph-dev.local.md for:

  • llm_provider and llm_model
  • async_by_default
  • Code style preferences

3. Generate Agent Structure

Create:

{agent_name}/
├── agent.py        # ReAct agent implementation
├── tools.py        # Tool definitions
├── state.py        # Agent state schema
└── README.md

4. Generate state.py

from typing import TypedDict, Annotated, List
from langchain.schema import BaseMessage
import operator

class AgentState(TypedDict):
    \"\"\"State for ReAct agent.\"\"\"
    messages: Annotated[List[BaseMessage], operator.add]

5. Generate tools.py

from langchain.tools import Tool

def search_web(query: str) -> str:
    \"\"\"Search the web for information.\"\"\"
    # Implementation
    return f"Search results for: {query}"

search_tool = Tool(
    name="WebSearch",
    func=search_web,
    description="Useful for finding current information. Input: search query."
)

# Add other tools based on user selection
tools = [search_tool, ...]

6. Generate agent.py

from langgraph.prebuilt import ToolNode
from langgraph.graph import StateGraph, END
from langchain_anthropic import ChatAnthropic
from .tools import tools
from .state import AgentState

# LLM with tools
llm = ChatAnthropic(model="claude-sonnet-4-5")
llm_with_tools = llm.bind_tools(tools)

# Agent node
def agent_node(state: AgentState):
    response = llm_with_tools.invoke(state["messages"])
    return {"messages": [response]}

# Tool execution node
tool_node = ToolNode(tools)

# Routing logic
def should_continue(state: AgentState):
    last_message = state["messages"][-1]
    if last_message.tool_calls:
        return "tools"
    return END

# Build graph
workflow = StateGraph(AgentState)
workflow.add_node("agent", agent_node)
workflow.add_node("tools", tool_node)

workflow.set_entry_point("agent")
workflow.add_conditional_edges("agent", should_continue, {
    "tools": "tools",
    END: END
})
workflow.add_edge("tools", "agent")  # Loop back

app = workflow.compile()

Read the full file on GitHub · 145 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 · 145 lines · 15 tokens per session scan A 4cccf7135f2a

Subscribe to this mod's changes

create-agent is a command published in the GitHub repository postindustria-tech/agentic-toolkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 790 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.