SDKs
Node SDK
Use AgentLine from TypeScript / JavaScript.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use AgentLine from TypeScript / JavaScript.
npm i agentline
import { AgentLineClient } from "agentline";
const client = new AgentLineClient({ apiKey: "al_live_..." });
client.agents // create, list, get, update, delete
client.numbers // buy, list, get, reassign
client.calls // create, list, get, getTranscript, hangup, pushContext
client.messages // send, list, listConversations
client.events // poll, peek
client.webhooks // list, set, delete, test
client.billing // getBalance, getExpenditure, getSummary, ...
client.voice // list, get, set, reset
import { AgentLineClient } from "agentline";
const client = new AgentLineClient({ apiKey: "al_live_..." });
const agent = await client.agents.create({
name: "Support Bot",
systemPrompt: "You are a helpful assistant.",
initialGreeting: "Hello! How can I help you today?",
});
await client.numbers.buy({ agentId: agent.id, country: "US", areaCode: "415" });
const call = await client.calls.create({ agentId: agent.id, toNumber: "+12125557890" });
await client.calls.hangup(call.id);
console.log(await client.calls.getTranscript(call.id));