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.
git clone --depth 1 https://github.com/Codeblockz/langchain-community-pluginWrote 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.
[](https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-agent)<a href="https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-agent"><img src="https://agentmods.dev/badge/commands/codeblockz/langchain-community-plugin/new-agent/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-agent"><img src="https://agentmods.dev/badge/commands/codeblockz/langchain-community-plugin/new-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00013 | $0.01237 |
| Opus 5.5 | $0.00005 | $0.00495 |
| Sonnet 5.5 | $0.00003 | $0.00247 |
| Haiku 4.5 | $0.00001 | $0.00124 |
Grade A, and why
new-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 1mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
New LangGraph Agent Command
Create a new LangGraph agent file with best practices baked in.
Workflow
-
Ask the user which agent type they want:
create_agent- High-level API, simpler, uses middlewareStateGraph- Low-level API, full control, custom routing
-
Get filename from argument or ask user (default:
agent.py) -
Generate the agent file using the appropriate template below
-
Inform user about next steps (install dependencies, customize tools)
Templates
create_agent Template
"""
LangGraph Agent using create_agent API
Install: pip install langchain langgraph
"""
from langchain.agents import create_agent
from langchain.tools import tool
from langgraph.checkpoint.memory import InMemorySaver
# Define your tools
@tool
def search(query: str) -> str:
"""Search for information.
Args:
query: The search query
"""
# TODO: Implement search logic
return f"Results for: {query}"
@tool
def calculate(expression: str) -> str:
"""Evaluate a mathematical expression.
Args:
expression: Math expression to evaluate
"""
# TODO: Implement safely
return str(eval(expression))
# Create the agent
agent = create_agent(
model="claude-sonnet-4-5-20250929", # or "gpt-4o"
tools=[search, calculate],
system_prompt="You are a helpful assistant.",
checkpointer=InMemorySaver(), # Required for memory/HITL
)
def main():
# Invoke with thread_id for conversation memory
config = {"configurable": {"thread_id": "user-123"}}
result = agent.invoke(
{"messages": [{"role": "user", "content": "Hello!"}]},
config=config
)
for msg in result["messages"]:
print(f"{msg.type}: {msg.content}")
if __name__ == "__main__":
main()
StateGraph Template
"""
LangGraph Agent using StateGraph API
Install: pip install langchain langgraph
"""
from typing import Annotated, Literal
from typing_extensions import TypedDict
from langchain.messages import AnyMessage, HumanMessage, SystemMessage
from langchain.chat_models import init_chat_model
from langchain.tools import tool
from langgraph.graph import StateGraph, START, END
from langgraph.graph.message import add_messages
from langgraph.checkpoint.memory import InMemorySaver
# 1. Define state - MUST be TypedDict
class State(TypedDict):
messages: Annotated[list[AnyMessage], add_messages] # Reducer appends messages
# 2. Define tools
@tool
def search(query: str) -> str:
"""Search for information.
Args:
query: The search query
"""
# TODO: Implement search logic
return f"Results for: {query}"
@tool
def calculate(expression: str) -> str:
"""Evaluate a mathematical expression.
Args:
expression: Math expression to evaluate
"""
# TODO: Implement safely
return str(eval(expression))
# 3. Setup model with tools
tools = [search, calculate]
tools_by_name = {t.name: t for t in tools}
model = init_chat_model("claude-sonnet-4-5-20250929").bind_tools(tools)
# 4. Define nodes
def call_model(state: State) -> dict:
"""Call the model and return response."""
messages = [
SystemMessage(content="You are a helpful assistant."),
*state["messages"]
]
response = model.invoke(messages)
return {"messages": [response]}
def call_tools(state: State) -> dict:
"""Execute tool calls from the last message."""
from langchain.messages import ToolMessage
last_message = state["messages"][-1]
results = []
for tool_call in last_message.tool_calls:
tool_fn = tools_by_name[tool_call["name"]]
result = tool_fn.invoke(tool_call["args"])
results.append(
ToolMessage(content=str(result), tool_call_id=tool_call["id"])
)
return {"messages": results}
# 5. Define routing
def should_continue(state: State) -> Literal["tools", "__end__"]:
"""Route to tools or end based on last message."""
last_message = state["messages"][-1]
if last_message.tool_calls:
return "tools"
return END
# 6. Build and compile graph
builder = StateGraph(State)
builder.add_node("model", call_model)
builder.add_node("tools", call_tools)
builder.add_edge(START, "model")
builder.add_conditional_edges("model", should_continue, ["tools", END])
builder.add_edge("tools", "model")
# Compile with checkpointer for memory/HITL
graph = builder.compile(checkpointer=InMemorySaver())
def main():
# Use thread_id for conversation persistence
config = {"configurable": {"thread_id": "user-123"}}
result = graph.invoke(
{"messages": [HumanMessage(content="Hello!")]},
config=config
)
for msg in result["messages"]:
print(f"{msg.type}: {msg.content}")
if __name__ == "__main__":
main()
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.
- 1mo ago First seen · 217 lines · 13 tokens per session scan A 09f5598f35bc
new-agent is a command published in the GitHub repository Codeblockz/langchain-community-plugin (3 stars, last pushed 9mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,237 once invoked, about $0.0001 per session on Opus 5.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.
Other commands, from other repositories
expect
Diff-aware AI browser testing — reads the git diff, maps changes to affected pages via the route map, generates a targeted test plan, and executes it via agent-browser (Rust daemon + CDP, ARIA-tree-first) with pass/fail reporting. Use when testing UI changes, verifying PRs before merge, or running regression checks on…
explore
Multi-angle codebase exploration spawning 3-5 parallel agents for code structure, data flow, architecture patterns, and health assessment. Generates ASCII visualizations, import graphs, and design pattern detection with cross-session memory storage. Use when exploring a repo, discovering architecture, onboarding to a…
design-import
Scaffolds React components from a Claude Design handoff bundle and stops at files on disk: no stories, no tests, no pull request. Use when handed a claude.ai/design URL or a local bundle file; when that same scaffold should carry on through test generation, browser verification and an opened PR, run /ork:design-ship…
dev
One-command dev loop boot. Spins up portless (named HTTPS subdomain), emulate (stateful API mocks), the project's dev server, and an agent-browser session, all keyed to the current git branch. Use when starting a feature branch, switching worktrees, or returning to a project after a break. Skips silently with install…
design-ship
One-shot pipeline turning a claude.ai/design link into a pull request: scaffold via /ork:design-import, stories and specs via /ork:cover, browser verification via /ork:expect, then open the PR. Use when a design link should come back as a PR with no intermediate steps; if all you need is the components written to…
memory
Read-side memory operations on the knowledge graph: search past decisions and patterns, load session context, view decision timelines, render Mermaid graph visualizations. Subcommands: search, load, history, viz, status. Use when finding or reviewing what memory already holds. For storing new knowledge instead, invoke…