@praxa/sdk, configuring your connection to the Praxa Integration Gateway, and submitting your first governed AI agent mission — all without touching a provider API key. You’ll need Node.js 20 or later and a Praxa gateway URL and access token from your deployment administrator.
1
Install the SDK
Add
@praxa/sdk to your project using your preferred package manager:2
Set environment variables
Export two environment variables before running your code.
PRAXA_BASE_URL is the HTTPS origin of your Praxa Integration Gateway — the base URL of the deployment, not a specific path. PRAXA_ACCESS_TOKEN is a short-lived delegated OAuth token issued by your gateway; see the Authentication guide for how to obtain one.PRAXA_BASE_URL must be an HTTPS origin. The SDK rejects HTTP origins and any URL containing embedded usernames or passwords.3
Create your first mission
Create a file called The second argument to
mission.ts with the following code. It reads your environment variables, instantiates a PraxaClient, submits a mission with a goal specification and resource budget, and then streams the resulting mission events to the console.mission.ts
createMission is your idempotency key — a stable UUID that ensures retrying the call never creates a duplicate mission. crypto.randomUUID() generates a fresh key each run; in production, generate and persist this key before the call so retries are safe.The resourceBudget fields cap what the mission may consume:4
Run it
Execute your file directly with You should see a
tsx (no compile step needed):runId and an initial status logged immediately, followed by a stream of structured events as the gateway executes your mission.Your gateway URL must use HTTPS. The Praxa SDK rejects HTTP origins at client construction time. If you see an error about an invalid base URL, check that
PRAXA_BASE_URL starts with https://.Next step: Read the Authentication guide to understand how to obtain short-lived OAuth tokens and refresh them in production applications.