HomeIntegrations › Add authorization to LangChain agents
Integration

Add authorization to LangChain agents

Wrap any LangChain tool so a scoped warrant is checked before it runs — spend caps, rate limits, revocation, and an audit trail included.

Why authorize LangChain tools?

LangChain agents call tools autonomously based on model output. That is exactly the risk: the model decides, at runtime, to call a tool — including tools that spend money or touch production. You want the agent to be able to act, but only within limits you set in advance. A warrant encodes those limits; Liceat enforces them at the tool boundary.

Guard a LangChain tool

Wrap the tool's func so authorization runs first:

import { DynamicStructuredTool } from '@langchain/core/tools';
import { createClient, guardTool } from 'liceat';
const decide = createClient({ gateway: 'https://liceat.com' }).decider();

const charge = guardTool(decide,
  { resource: 'pay:stripe/charge', action: 'pay', amount: a => a.cents, currency: 'USD' },
  async (a) => stripe.charges.create({ amount: a.cents, currency: 'usd' }));

new DynamicStructuredTool({ name: 'charge_card', schema,
  func: (args) => charge(agentWarrant, args)
    .then(JSON.stringify, (e) => 'denied: ' + e.message) }); // model sees the denial

What you get

Frequently asked

What is Liceat?

Liceat is permission infrastructure for AI agents. You issue a warrant — a scoped, spend-capped, revocable token — that grants an agent narrow authority; the agent presents it at the point of action; Liceat enforces it (scope, spend, rate, holder-binding, revocation) and records every decision in a tamper-evident log. It is open source with a zero-dependency SDK for TypeScript and Python.

Is it free?

The SDK and self-hosted gateway are free and open source. The hosted gateway at liceat.com gives 10,000 free decisions with no card, then meters at fractions of a cent per decision — payable by card or USDC.

Give your agents permission, not your keys.

Free to self-host. 10,000 free decisions on the hosted gateway — no card.

Get an API key Read the docs