LangChain Security

LangChain gives agents
power. Vaultak gives
them limits.

LangChain has no built-in runtime guardrails. Vaultak wraps your AgentExecutor and intercepts every tool call before execution — enforcing the permissions you declare, not the model's judgment.

Start free → Read the guide
2 lines
Added to your existing AgentExecutor setup
100%
Of LangChain tool calls intercepted pre-execution
<2ms
Policy check latency per tool call
The problem with LangChain in production

Tool access is
all-or-nothing by default.

01 — Permissions
No per-tool permissions
LangChain tools inherit the full process permissions. A file-read tool can read any file the process can access — including .env, SSH keys, and production configs.
02 — Injection
Prompt injection risk
Malicious content in external data can hijack your agent's tool use sequence. Without a runtime layer, there's nothing between the injected instruction and your production database.
03 — Audit
No audit trail
LangChain's callback system logs model outputs, not action consequences. When something goes wrong, you have a transcript — not a record of what actually changed in your systems.

Drop it around your
AgentExecutor.

No changes to your tools or prompts. Vaultak hooks into LangChain's execution layer and checks every tool invocation against your permission profile before it runs.

  • Allowlist specific tools and resource patterns
  • Block access to sensitive file paths and env vars
  • Rate-limit tool calls per agent session
  • Pause execution and alert on anomalous sequences
  • Full structured audit log per invocation
langchain_agent.py
from langchain.agents import AgentExecutor
from vaultak import Vaultak, ActionType

vt = Vaultak(
  api_key="vtk_...",
  allowed_action_types=[ActionType.FILE_READ],
  allowed_resources=["/data/reports/*"],
  blocked_resources=["*.env", "*.key", "/etc/*"],
  max_actions_per_minute=20,
)

agent = AgentExecutor(
  agent=..., tools=[...], llm=llm
)

# Tool calls now checked before execution
with vt.monitor("langchain-prod"):
  result = agent.invoke({"input": query})
What gets protected

Every tool call,
every session.

FILE TOOLS
File system access
Allowlist specific directories. Block reads or writes to *.env, *.key, /etc/*, and any other sensitive paths. Violations are blocked pre-execution.
DATABASE TOOLS
Database queries
Restrict which databases and tables the agent can query. Block destructive operations like DROP, DELETE, and TRUNCATE unless explicitly permitted.
HTTP TOOLS
Outbound requests
Allowlist domains the agent is permitted to call. Block calls to internal network ranges, credential endpoints, and unexpected external destinations.

Secure your LangChain
agents in minutes.

Free tier. No infrastructure changes. Works with LangChain 0.1 and later.

Get started free → Full integration guide