← nopea.tech
ScaneaConsenteaMaskeaBundlesPricing
Agent frameworks

LangChain agent

createAgent()'s .invoke() is a plain async function like everything else here -- wrap it the same way.

← All recipes
import { createAgent } from "langchain";
import { Maskea, retries, budget, secrets } from "@nopeatech/maskea";

const agent = createAgent({
  model: "gpt-5.5",
  tools: [],
});

const maskea = new Maskea()
  .use(retries({ max: 3 }))
  .use(budget({ maxMonthlyUsd: 50 }))
  .use(secrets({ mode: "mask" }));

const invoke = maskea.wrap(agent.invoke.bind(agent));

const result = await invoke({
  messages: [{ role: "user", content: "What's the weather in Delhi?" }],
});

Checked against the shipped @nopeatech/maskea API. Full docs at nopea.tech/maskea/docs.

More in Agent frameworks

LlamaIndex LLM →