@frontal-labs/agents
v0.0.1
Published
Frontal Agents SDK — define, deploy, and observe AI agents with LangChain, LangGraph, and Vercel AI SDK integration
Downloads
85
Maintainers
Readme
@frontal-labs/agents
Define, deploy, and operate Frontal agents.
Installation
bun add @frontal-labs/agents @frontal-labs/coreUsage
import { FrontalClient } from "@frontal-labs/core";
import { createAgentsClient } from "@frontal-labs/agents";
const client = new FrontalClient({
apiKey: process.env.FRONTAL_API_KEY!,
baseUrl: process.env.FRONTAL_API_URL ?? "https://api.frontal.dev/v1",
});
const agents = createAgentsClient(client);
const page = await agents.list({ limit: 10 });
const created = await agents.create({
name: "order-ops",
triggers: [{ event: "order.created" }],
scope: {
read: ["order"],
write: ["incident"],
actions: [],
escalate: [],
invokeAgents: [],
invokeFunctions: [],
},
confidence: {
autoExecuteAbove: 0.9,
escalateBelow: 0.6,
requireReviewBetween: true,
},
memory: { type: "working" },
retry: { maxRetries: 3, retryDelay: 1000, backoff: "exponential", retryOn: [429, 500] },
});Configuration
FRONTAL_API_KEYFRONTAL_AGENTS_API_URL(optional)FRONTAL_API_URL(fallback)
Default base URL: https://api.frontal.dev/v1.
