LangSmith alternative

LangSmith traces every node. RunGuard stops the loop before node 4 fires.

If your team runs LangChain or LangGraph agents and needs a runtime circuit breaker — something that detects a repeating tool-call pattern and halts the agent mid-run before the 20th LLM call goes out — RunGuard fills the gap without touching your existing LangSmith tracing setup.

Why teams look for a LangSmith alternative

Feature comparison

LangSmith RunGuard
Pre-call loop detection (halts before next call)
Per-run USD budget cap
Context-window overrun guard
Works with non-LangChain frameworks Limited
Post-run trace replay
Evaluation datasets and scoring
Prompt hub and versioning
Starting price Free developer / $39/seat/mo Plus $0 trial / $19/mo Solo

How RunGuard is different

The core distinction is where in the call stack each tool sits. LangSmith's LangChainTracer lives inside CallbackManager, one layer above your LLM client, and its callbacks fire post-call. RunGuard's guard() wrapper sits one layer below CallbackManager — below the LangChain stack entirely — and fires pre-call. For a LangGraph agent, the composition is:

// TypeScript — RunGuard below traceable() in the call chain
import { guard } from "@runguard/sdk"
import { traceable } from "langsmith/traceable"

const innerFn = async (msg: string) => anthropic.messages.create({ ... })

// guard() is below traceable() — pre-call gate first
const safeFn = traceable(guard(innerFn, {
  repeats: 3,
  maxCycleLen: 8,
  maxUsd: 5
}))

// LangSmith traces every call RunGuard allows; RunGuard throws on loops.

When RunGuard trips, LangSmith traces the LoopDetectedError — a useful signal in your evaluation dataset. When RunGuard does not trip, LangSmith traces the successful call. Neither tool needs to know the other exists.

When LangSmith is still the right choice

If you are building LangChain or LangGraph agents and your primary need is trace visibility, eval dataset management, prompt hub access, or online evaluation pipelines — LangSmith is the best tool in that space. Its integration with LangGraph's streaming APIs, its annotation queues, and its LangChain Hub for prompt sharing are mature and production-tested. If you need to debug why an agent made certain decisions by replaying its trace, LangSmith's trace explorer is excellent. RunGuard is not a tracing tool and will not replace those capabilities.

FAQ

Does RunGuard work with LangGraph's recursion_limit?
recursion_limit is a step counter — it halts the graph after N total steps regardless of pattern. RunGuard detects repeating call signatures (the same tool, same arguments, same context slice) and trips at the Nth repetition, not the Nth total step. A legitimate 30-step research agent will not trigger RunGuard if its tool calls are diverse; a looping 10-step agent will trigger it at step 3 of the repeated pattern. The two mechanisms are complementary — RunGuard catches pattern loops; recursion_limit catches runaway long graphs.
Can I use RunGuard without LangSmith?
Yes. RunGuard has no dependency on LangSmith or LangChain. It wraps any async function that calls an LLM. If you use raw Anthropic SDK, OpenAI SDK, or Mistral, RunGuard works identically.
What is the overhead of adding RunGuard to a LangGraph node?
RunGuard's check is an in-memory hash lookup — typically under 0.5ms per call. It does not add a network round-trip. The overhead is negligible compared to a 200–2000ms LLM API call.

Get early access

Add the loop gate your LangSmith setup is missing

Join the waitlist →