CLI
Script and automate your assistant from the command line, or use the same client as an SDK in your own code.
Install
The CLI ships as an npm package scoped to your account, and installs a binary named after your account:
npm install -g @agnt-sdk/openassistant
This installs the openassistant binary. Run openassistant --help to see every available command.
Authenticating
The fastest path is a headless login — no browser needed:
openassistant login --email [email protected]
This works whether [email protected] is a brand-new address (it creates the account) or an existing one (it logs in) — the backend figures out which. You'll be emailed a verification code and prompted for it. Each login mints its own separately-labeled, separately-revocable API key, so run it again on a different machine or for a different agent rather than copying credentials around.
If you already have an API key (minted by login elsewhere, or issued from your account's dashboard), wire it into a named profile instead:
openassistant configure --profile staging --api-key ak_live_... --api-url https://staging-api.agnt.ai
Pass --profile <name> on any command to use a profile other than the default.
Basic usage
openassistant tasks list
openassistant tasks create --assistant <assistantId> --message "Draft a follow-up to yesterday's call with Acme"
openassistant tasks get <taskId>
Every resource in the API reference has a matching CLI surface — assistants, chats, contacts, calendars, connections, memories, skills, and more. Run openassistant <resource> --help to see what's available for any of them.
Using it as an SDK
The same package works as a typed client in your own Node.js code, not just as a terminal tool:
import { PortalClient } from '@agnt-sdk/openassistant';
const client = new PortalClient({ apiKey: process.env.AGNT_API_KEY });
const { tasks } = await client.tasks.list();
This is the same client the CLI itself is built on, so anything you can do with a command you can also do programmatically — useful for wiring your assistant into scripts, CI jobs, or your own internal tools.
JSON output
Add --json to most commands to get machine-readable output instead of the formatted terminal view — useful for piping into jq or another script.
openassistant tasks list --json | jq '.tasks[] | select(.status == "needs_clarification")'