Skip to main content
This guide takes you from a fresh install to a running agent that calls real tools through Invoke’s execution controls. You will install the CLI, authenticate, deploy a project with a guardrail template, call a tool through the TypeScript SDK, and verify the outcome with invoke demo.

Setup

1

Install the Invoke CLI

Install the CLI globally with your preferred package manager.
npm install -g @invoke/cli
npx @invoke/cli
yarn global add @invoke/cli
pnpm add -g @invoke/cli
bun add -g @invoke/cli
2

Authenticate

Log in to connect the CLI to your Invoke account. This stores your credentials locally for subsequent commands.
invoke login
3

Create and deploy your first agent project

Initialize a new project with the crm-guardrail template, then deploy it.
invoke init billing-agent --template crm-guardrail
cd billing-agent
invoke deploy
4

Make your first SDK call

npm install @invoke/sdk
import { Invoke } from "@invoke/sdk"

const invoke = new Invoke({
  apiKey: process.env.INVOKE_API_KEY!,
})

const result = await invoke.call({
  tool: "stripe.charge_customer",
  params: { customer_id: "cust_123", amount: 2400 },
  agentId: "billing-agent",
  idempotencyKey: "charge:cust_123:2400"
})
5

Verify with the demo runner

invoke demo

What just happened

Your agent now routes tool calls through Invoke instead of hitting APIs directly. Every call gets:
  • A commit record written before the side effect lands
  • Idempotency enforcement so a lost response does not become a duplicate charge
  • Scope validation against the policy defined in your deployed project
  • A trace your team can inspect when something important happens

Next steps

  • Read How It Works to understand the full execution loop and the four control primitives
  • Review Tool Safety Classes to limit what your agent can call and under what conditions
  • Explore Traces to inspect retries, reconciliation decisions, and blocked side effects