Skip to main content

Use Autessa in your existing project

Keep your framework, your model and your code. Pick the Autessa feature you need and add it in about five lines. Each package works on its own and reads your key from AUTESSA_API_KEY.

All packages are in private preview. Install steps are on each linked page.

You want toUsePage
Block prompt injection and data leaksFirewall middleware for LangChain, Vercel AI SDK, LiteLLM, MCP, Pipecat or LiveKitAI Application Firewall
Remove card numbers and health data from call audioSecurePass processor for Pipecat or LiveKitSecurePass
Grade conversations and attack-test your agentGraders for LangChain, Vercel AI SDK, Pipecat and LiveKit; the evals package; the eval action in CIEvaluations
Make realistic test dataLangChain loader, Vercel AI SDK dataset, MCP tools, or the synth packageSynthetic data
Call an agent you deployed on AutessaLangChain Runnable or tool, Vercel AI SDK tool, MCP tools, or the agents packageCall your agents from code

Get a key first: get a free API key, then export AUTESSA_API_KEY="<keyId>:<secret>".

Firewall​

LangChain (Python). Add the middleware to your agent:

from langchain.agents import create_agent
from langchain_anthropic import ChatAnthropic
from langchain_autessa import AutessaFirewallMiddleware

agent = create_agent(ChatAnthropic(model="claude-opus-5-5"), tools=[], middleware=[AutessaFirewallMiddleware()])

Vercel AI SDK. Wrap your model:

import { anthropic } from "@ai-sdk/anthropic";
import { wrapLanguageModel } from "ai";
import { autessaFirewall } from "@autessa/ai-sdk";

const model = wrapLanguageModel({ model: anthropic("claude-opus-5-5"), middleware: autessaFirewall() });

LiteLLM. Run the guardrail service, then add it to your LiteLLM config:

litellm_settings:
guardrails:
- guardrail_name: autessa-input
litellm_params: { guardrail: generic_guardrail_api, mode: pre_call, api_base: http://localhost:8080, api_key: os.environ/GUARDRAIL_API_KEY }

MCP. Put the firewall in front of any MCP server you already use:

claude mcp add notes --env AUTESSA_API_KEY="$AUTESSA_API_KEY" -- \
npx -y @autessa/mcp-firewall -- npx -y your-notes-mcp-server

LiveKit Agents. Use AutessaFirewallAgent in place of Agent:

from livekit.plugins.autessa import AutessaFirewall, AutessaFirewallAgent

agent = AutessaFirewallAgent(instructions="You help customers with their orders.",
firewall=AutessaFirewall(session_id=ctx.room.name))
await session.start(agent=agent, room=ctx.room)

Pipecat has AutessaFirewallProcessor. See Pipecat.

A new company's policy only records what it finds. To block, use a policy in Enforce mode and pass its name (policy_name / policyName).

SecurePass​

Pipecat. Add the recorder after the output transport. It redacts the full call when the call ends:

from pipecat_autessa_redact import AutessaRedactionProcessor

recorder = AutessaRedactionProcessor(external_id="call-42", types=["CARD_NUMBER", "CARD_CVV"], on_result=print)
pipeline = Pipeline([transport.input(), stt, aggregators.user(), llm, tts,
transport.output(), recorder, aggregators.assistant()])

LiveKit Agents. Attach the recorder to your session:

from livekit.plugins.autessa import AutessaRecorder

recorder = AutessaRecorder(external_id=ctx.room.name, types=["CARD_NUMBER", "CARD_CVV"], on_result=print)
recorder.attach(session)
ctx.add_shutdown_callback(recorder.finish)

Evaluations​

LangChain. Grade an agent run:

from langchain_autessa import AutessaGrader

result = agent.invoke({"messages": [("user", "Where is order 1042?")]})
graded = AutessaGrader("You help customers track orders.").grade(result, expected_outcome="The agent gives the order status.")
print(graded.passed)

AutessaGradingCallback grades every run you pass it as a callback.

Vercel AI SDK. Grade a generateText run, including its tool calls:

import { gradeGeneration } from "@autessa/ai-sdk";

const result = await generateText({ model, system, prompt, tools, stopWhen: stepCountIs(5) });
const { passed } = await gradeGeneration({ result, system, prompt, expectedOutcome: "Gives the order status." });

Pipecat. Grade each finished call. grader.user() goes after speech to text, the grader after the LLM:

from pipecat_autessa_evals import AutessaCallGrader

grader = AutessaCallGrader(agent_instructions="You book dental cleanings.", on_result=print)
pipeline = Pipeline([transport.input(), stt, grader.user(), aggregators.user(), llm,
grader, tts, transport.output(), aggregators.assistant()])

LiveKit Agents. Attach the grader to your session. It grades the call when the session closes:

from livekit.plugins.autessa import AutessaCallGrader

grader = AutessaCallGrader(expected_outcome="The customer gets their order status.", on_result=print)
await session.start(agent=agent, room=ctx.room)
grader.attach(session)

Pipecat and LiveKit also have grade_transcript() for transcripts you collected elsewhere. Without a framework, use the evals package. To attack-test your agent's endpoint on every pull request, add the eval action.

Synthetic data​

LangChain. Load made-up rows as documents, or as grading cases:

from langchain_autessa import AutessaSynthLoader

docs = AutessaSynthLoader(description="Support tickets for a phone company", row_count=5).load()
cases = AutessaSynthLoader(description="Order questions with the expected outcome", row_count=20).load_eval_cases(
{"user": "question", "expected_outcome": "expected"}, agent_instructions="You help customers.")

Vercel AI SDK. Get rows and test cases for generateText tests:

import { autessaBuildDataset } from "@autessa/ai-sdk";

const { rows, cases } = await autessaBuildDataset({
description: "customers asking a bike shop about late orders, with what a good answer does",
rowCount: 20,
cases: { user: "question", expectedOutcome: "expected", agentInstructions: "You help with orders." },
});

Without a framework, use the synth package: generate, then toEvalCases or toSeed.

Agents​

Hand work to an agent you deployed on Autessa. It answers with its own instructions, tools and firewall policy.

LangChain. A Runnable, and a tool another agent can delegate to:

from langchain_autessa import AutessaAgent

support = AutessaAgent(agent_id="V1StGXR8Z5", name="support_agent", description="Answers order questions.")
agent = create_agent(model, tools=[support.as_tool()])

In JavaScript: new AutessaAgent({ agentId, name, description }).asTool().

Vercel AI SDK. An AI SDK tool:

import { autessaAgentTool } from "@autessa/ai-sdk";

const billing = autessaAgentTool({ agentId: "V1StGXR8Z5", description: "Answers billing and refund questions" });
const { text } = await generateText({ model, tools: { billing }, stopWhen: stepCountIs(5), prompt: "Why was I charged twice?" });

MCP. Turn on the agent and synthetic data tools (agent_* and synth_*). They are off by default:

claude mcp add autessa-tools --env AUTESSA_API_KEY="$AUTESSA_API_KEY" -- npx -y @autessa/mcp-tools --include builtin,tenant,agents,synth

From your own code, use the agents package. To build the agent itself in code, see Build an agent in code.