Agentkit CLI
Install the Agentkit CLI, save your API key, and manage agents, knowledge sources, settings and conversations from your terminal.
The Agentkit CLI lets you manage your agents from a terminal. The same package includes an MCP server for Claude Code, Codex, Cursor and other coding assistants, described on the Agentkit MCP server page.
Both are open source under the MIT license: github.com/agikits/agentkit-cli. The current release is a beta.
Note: The CLI and MCP server use the REST API, which is included on every plan, including Free. Chat through the API uses your workspace's monthly credits. Compare plans →
What you can do
- List agents and read their AI, design, security and training settings
- Read conversations from the widget, API, Playground and Instagram
- List knowledge sources, add text and Q&A, and re-crawl web pages
- Test an agent's answers from the terminal without opening the dashboard
1. Install
You need Node.js 22 or newer.
npm install -g @agikits/agentkit agentkit --version
This installs two commands: agentkit (the CLI) and agentkit-mcp (the MCP server).
If your shell can't find agentkit afterwards, npm's global folder isn't on your PATH. Run npm prefix -g and add its bin folder (on Windows, that folder itself) to your PATH, or skip the global install and use npx -p @agikits/agentkit agentkit --version.
2. Add your API key
- In your workspace dashboard, open API Keys and click Create API Key.
- Copy the key.
- Save it for the CLI. The key is read from standard input, so it stays out of your shell history:
On macOS:
pbpaste | agentkit init --with-token
In Windows PowerShell:
Get-Clipboard | agentkit init --with-token
On Linux, run this, paste the key when the cursor waits, and press Enter:
read -rs KEY && printf '%s' "$KEY" | agentkit init --with-token; unset KEY
You can also set AGENTKIT_API_KEY in your environment instead of saving the key.
Check that it worked with agentkit agents list.
The key is saved to ~/.config/agentkit/config.json. On macOS and Linux only your user can read the file. On Windows it inherits your user folder's permissions. A key can reach every agent in the workspace, so treat it like a password. To stop using a key, revoke it on the API Keys page. agentkit logout only removes the local copy.
3. Run your first commands
# List the agents in your workspace agentkit agents list # Give one a short name (commands accept the name or the agent ID) agentkit projects --add support <agent-id> # Inspect it agentkit train support --status agentkit sources list support agentkit conversations list support --source widget # Ask it a question (uses the Playground channel and spends credits like any chat) agentkit chat support "What are your opening hours?"
JSON output and help
Add --json to any command for machine-readable output. Run agentkit <command> --help for every option, and agentkit capabilities for the full list of supported operations.
Changes and credits
Commands that change an agent, such as settings instructions or sources add-text, take effect immediately: new text and Q&A sources are used right away. train re-crawls the agent's web-page sources and uses training credits; train --status only reads progress. Deleting anything requires --yes.
Limitations in the beta
- Widgets, Center Stage, Backstage, email inbox setup, and changes to custom actions and secrets need a short-lived dashboard session token instead of an API key. These commands are experimental. An API key can read the email inbox and send reviewed drafts.
- Instagram connection and other channel sign-ins stay in the dashboard.
Report issues on GitHub.
Related
Connect a coding assistant. The agentkit-mcp command you just installed lets Claude Code, Codex and Cursor read your agents, settings and conversations with the key you saved. Set up the Agentkit MCP server →