How to control AI agents from the CLI: a practical guide

Rama Adi Nugraha
Written by

Rama Adi Nugraha

Katelin Teen
Reviewed by

Katelin Teen

Last edited September 7, 2026

Expert Verified
Illustrated hero banner for a guide on controlling AI agents from the command line, with a terminal window motif

Why control an agent from the command line at all

I build integrations for a living, so I will admit my bias: I would rather run something from a terminal than click through a settings page I have to relearn every quarter. But the case here is bigger than personal taste.

A dashboard is a fine place to understand an agent. It is a poor place to operate one at any scale. The moment you want the same change applied to three agents, or a config that lives in a Git repo next to the rest of your infrastructure, or a rollout that a CI job can run without a human, the browser becomes the bottleneck. Everything you do by hand is a step you cannot repeat, review, or roll back cleanly.

The command line fixes that by turning agent operations into text. A command you can paste into a runbook. A config you can diff. A run you can trigger from a cron job or a webhook. And, increasingly, a surface that another AI agent can drive, which is exactly why eesel's docs tell coding agents to use the CLI rather than trying to click around the dashboard in a browser.

A control loop showing the six stages of driving an AI support agent from the terminal: install and log in, connect helpdesk, set instructions, simulate on past tickets, trigger a run, and watch activity and approve
A control loop showing the six stages of driving an AI support agent from the terminal: install and log in, connect helpdesk, set instructions, simulate on past tickets, trigger a run, and watch activity and approve

The rest of this guide walks that loop step by step. I will use eesel's CLI for the concrete commands because it is the one I know is real and can point you at the docs for, but the shape applies to any agent platform that takes the terminal seriously.

What you need before you start

Three things, and none of them take long.

  • A recent Node.js. eesel's CLI needs Node 18.17 or newer. Most machines built in the last couple of years already have it.
  • An agent platform with a real CLI. This is the one to check carefully. Plenty of tools advertise "developer-friendly" and then hand you a settings page. Look for published CLI docs with an actual command list before you commit.
  • A data source to connect. For a support agent that means a helpdesk, a knowledge base, or past tickets. The agent is only as good as what it can read.

You do not necessarily need an account to start. eesel's CLI can spin up an anonymous workspace so you can test a bubble on a website with no signup, which is a nice way to see the whole flow before you decide anything.

Step 1: install the CLI and log in

There are three ways to get eesel's CLI, and they map to three different situations.

If you just want to try it against a website with zero commitment:

Bash
npx @eesel/cli init chat-bubble --site https://your-site.com

That runs without an account and stands up an anonymous workspace. If you want it installed for real, either grab it globally from npm:

Bash
npm i -g @eesel/cli

or use the install script:

Bash
curl -fsSL https://dashboard.eesel.ai/eesel-cli/install | sh

Once it is installed, authenticate:

Bash
eesel login
eesel whoami

eesel login opens the browser once to link the terminal to your workspace, and whoami confirms which account and agent you are pointed at. From here on you can stay in the terminal.

The eesel CLI documentation page, which describes installing the command-line tool and the full command set, as taken from eesel docs

A detail worth calling out for anyone scripting this: every command prints JSON, and lists print one object per line. That means you can pipe output straight into jq or a script without scraping human-readable text. You can also narrow the output with --fields (for example --fields id,status) so a script only sees the keys it needs.

Step 2: connect a helpdesk or data source

An agent with nothing to read is a party trick. The first real thing you do is give it a source.

Bash
eesel integrations connect zendesk

Swap zendesk for whichever platform you run. eesel connects to Zendesk, Freshdesk, Gorgias, Front, Help Scout, HubSpot, Salesforce, and Jira Service Management, among others. The command handles the OAuth handshake and reports back when the source is live.

Check the state at any point:

Bash
eesel status

status tells you what is connected, what the agent knows about, and whether anything is still syncing. It is the command I run most, because it answers the only question that matters mid-setup: is this thing actually ready.

Step 3: set the agent's instructions

This is where "control" gets real. The instructions are the standing rules the agent follows: tone, what it is allowed to answer, when it should escalate, which actions it can take on its own.

Bash
eesel instructions

That reads the current instructions so you can see exactly what the agent is operating under, and lets you edit them. Because it is text, you can keep your instructions in a file in version control and treat a change to how the agent behaves like any other reviewed change, with a diff and a history, instead of a mystery edit someone made in a settings panel three weeks ago.

If you take one habit from this guide, take that one. An agent's behaviour drifting because nobody can see who changed what is the single most common way these rollouts quietly go wrong.

Step 4: simulate before you let it loose

Here is the part most people skip, and it is the part I would fight for.

We have spent years putting AI agents on live support queues, and the lesson that stuck is that a confident-sounding bot is not the same as a correct one. A model will happily give a wrong answer in a reassuring voice. The only way to catch that before a customer does is to test it against reality first.

eesel does this as a simulation that replays your past tickets and scores the agent's answers against what your team actually sent. You invoke it by asking, for example, to run a simulation on your recent tickets. It hands back where the agent would have matched your team, where it would have missed, and what to change in the instructions. One thing it deliberately does not do is invent a resolution rate or a cost forecast, and I would be wary of any tool that claims to, because that number is a guess dressed up as a measurement.

Run the simulation, read the gaps, fix the instructions from Step 3, and run it again. That loop is the whole point of doing this from the terminal: each pass is a command you can repeat, not a click-through you have to remember.

Step 5: trigger runs and read the activity log

Now you operate it. Talk to the agent directly:

Bash
eesel chat "Where is my order #DL-4821?"

And read what it has been doing, newest first:

Bash
eesel activity

eesel activity is the observability surface. It lists runs so you can spot patterns, and you can open a single run to see exactly what the agent read, decided, and did. When something looks off, this is where you look before anything else. Errors are structured too: a failed command prints a single JSON line to stderr with an error, a hint, and whether it is retryable, and exits non-zero. That is what makes the CLI safe to wire into a CI job. A script can tell the difference between "you typed the command wrong" and "the service had a hiccup, try again."

Step 6: gate actions with approvals

You do not have to choose between a fully autonomous agent and a useless one. The middle ground is a human-in-the-loop approvals queue, and it is a first-class thing on the command line.

Bash
eesel approvals list
eesel approvals approve <id>
eesel approvals deny <id>

When the agent wants to take an action you have not fully trusted yet, it lands in the approvals queue instead of just happening. You review it from the terminal and approve or deny. Once a particular kind of action has earned your trust, promote it to automatic:

Bash
eesel approvals approve <id> --always
An approvals flow: an agent action enters the approvals queue via eesel approvals list, then branches into approve, deny, or approve with the always flag for automatic handling from then on
An approvals flow: an agent action enters the approvals queue via eesel approvals list, then branches into approve, deny, or approve with the always flag for automatic handling from then on

This is how you dial autonomy up gradually rather than flipping a scary switch. Start with everything gated, watch what the agent proposes, and use --always to hand over the actions you have seen it get right, one category at a time.

Beyond the CLI: the other three control surfaces

The CLI is the surface you will live in, but it is not the only way to drive the agent. It helps to see the full set, because each one answers a different question.

Four control surfaces feeding one AI agent: the CLI for terminal commands, an MCP server for AI clients, webhooks so an external event can wake it, and Network Access so the agent can call any REST API
Four control surfaces feeding one AI agent: the CLI for terminal commands, an MCP server for AI clients, webhooks so an external event can wake it, and Network Access so the agent can call any REST API
  • MCP server, for when another AI is the operator. Every eesel workspace is also an MCP server. Running npx @eesel/cli mcp token prints a URL, a 30-day token, and a paste-ready claude mcp add command, so a client like Claude can call the same operations as tools. This is how you let a coding agent manage your support agent.
  • Webhooks, for when an outside event should drive the agent. A unique webhook URL wakes the agent when something happens elsewhere in your stack, so a new order or a form submission can kick off a run without anyone typing a command.
  • Network Access, for when the agent needs to reach out. You allowlist a domain and attach an auth header, and the agent can then call that REST API with GET, POST, PATCH, or DELETE during a run. Credentials are stored as headers and never shown to the model, which is the detail your security team will ask about.

For headless environments, you skip the interactive login entirely: set EESEL_API_URL and EESEL_API_TOKEN (and EESEL_AGENT_ID to pin a specific agent) as environment variables, and the CLI authenticates from those. That is what makes it drop cleanly into a CI pipeline.

Common mistakes to avoid

A few things I have watched trip people up, so you can skip the lesson:

  • Going live without simulating. The most expensive mistake on this list. Run Step 4. Every time.
  • Editing instructions by hand in a hurry. If your agent's behaviour is not in version control, you will eventually have an outage nobody can explain. Treat eesel instructions output like code.
  • Turning on full autonomy on day one. Start with everything in the approvals queue and earn each --always promotion. Trust is built one action category at a time.
  • Ignoring the exit codes. The CLI returns structured errors and non-zero exits for a reason. A script that does not check them will happily march past a failure.
  • Assuming a REST API exists. If you are evaluating a vendor and your plan depends on a documented REST endpoint, confirm it exists before you build on it. With eesel the honest answer is that the CLI, MCP, webhooks, and Network Access are the surface, and that is plenty for controlling an agent, just not the same as a REST product.

Try eesel

If you want a support agent you can genuinely run from the terminal, eesel is built for it. The CLI installs in one command, connects to the helpdesk you already run, simulates against your real past tickets before it touches a live conversation, and keeps every action behind an approvals queue until you say otherwise. Pricing is usage-based at 40 cents per ticket handled, and the free trial includes 50 dollars of usage with no credit card, so you can script the whole rollout and see it work before you spend anything.

The eesel homepage, showing AI agents that live inside the apps and helpdesks you already use

Frequently Asked Questions

How do I control an AI agent from the CLI?
Install a command-line tool that talks to your agent platform, authenticate once, then use commands to connect data sources, edit the agent's instructions, trigger runs, and read its activity log. With eesel that means installing @eesel/cli, running eesel login, and driving everything else from the terminal. The CLI docs spell out the full command set.
Can you run an AI support agent without a dashboard?
Yes. eesel's docs state that everything on the site can be done from the terminal, and the CLI is meant to be the primary surface for scripts and other AI agents rather than a browser. You connect a helpdesk, set instructions, and read activity entirely from the command line.
Is there a REST API for controlling AI agents?
It depends on the vendor. eesel does not publish a separate versioned REST product, but it exposes a real programmable surface: a CLI, an MCP server, webhooks, and Network Access for calling any REST API from inside the agent. For most control tasks the CLI is the fastest path.
How much does it cost to run an AI agent from the command line?
The CLI itself is free to install. You pay for the work the agent does. eesel's pricing is usage-based at 40 cents per ticket or chat handled, with a free trial that includes 50 dollars of usage and no credit card, so you can script and test a rollout before spending anything.
How do I keep an AI agent from taking the wrong action?
Gate its actions behind an approvals queue and simulate before you go live. From the CLI you can run eesel approvals list to see pending actions, then approve or deny each one, and simulate the agent against your past tickets first so you see how it would have answered. Adding --always to an approval promotes a repeated action to automatic once you trust it.

Share this article

Rama Adi Nugraha

Article by

Rama Adi Nugraha

Rama is a software engineer at eesel AI with two years of experience writing about B2B SaaS, AI tools, and customer support technology. Based in Bali, Indonesia, he brings a developer's perspective to product comparisons — cutting through marketing copy to what the integrations and APIs actually do.

Related Posts

All posts →
What are autonomous AI agents: A guide for businesses
Guides

What are autonomous AI agents: A guide for businesses

Autonomous AI agents can handle complex tasks on their own. Here’s how they work and how eesel AI helps teams use them in real-world support.

Kenneth PanganKenneth PanganJun 9, 2025
A complete overview of Hippocratic AI pricing and its AI healthcare agents
Guides

A complete overview of Hippocratic AI pricing and its AI healthcare agents

Nvidia and Hippocratic AI are making waves with their AI healthcare agents, but how does their pricing actually work? We dive into the technology, the controversial $9/hour cost, and what it means for businesses looking at AI agent solutions.

Kenneth PanganKenneth PanganOct 1, 2025
A complete guide to Shift4Shop pricing in 2025
Guides

A complete guide to Shift4Shop pricing in 2025

Thinking about using Shift4Shop? Before you commit, it's crucial to understand the full picture. Our guide breaks down the official Shift4Shop pricing tiers, transaction fees, and the often-overlooked operational costs like customer support that can impact your bottom line. Discover how to build a realistic budget for your e-commerce store in 2025.

Kurnia Kharisma Agung SamiadjieKurnia Kharisma Agung SamiadjieSep 14, 2025
Reka AI pricing: A complete 2025 overview
Guides

Reka AI pricing: A complete 2025 overview

Thinking about using Reka AI for your business? We break down the complete Reka AI pricing structure for its Chat and Research products, explore its features, and discuss why a raw AI model might not be enough for your support team.

Stevia PutriStevia PutriOct 1, 2025
AI pretraining
Guides

AI pretraining

Ever heard that AI is "trained on the whole internet"? That's AI pretraining, the foundational step for models like GPT. But for customer support, this general knowledge isn't enough. This guide breaks down what pretraining really is and explains why specializing an AI on your company's knowledge is the key to unlocking its true potential.

Kenneth PanganKenneth PanganOct 23, 2025
A complete overview of Applaud HR AI in 2025
Guides

A complete overview of Applaud HR AI in 2025

Thinking about using Applaud HR AI? We review its agentic AI, knowledge management, and case triage features. Discover its limitations and why a more flexible AI layer might be a better fit for your support team in 2025.

Stevia PutriStevia PutriOct 9, 2025
Nouple io: A complete 2025 overview of Coupler.io
Guides

Nouple io: A complete 2025 overview of Coupler.io

Explore our deep dive into Coupler.io (nouple io), the no-code platform for data reporting. Learn about its features, pricing, and see how it compares to action-oriented AI tools.

Kenneth PanganKenneth PanganOct 19, 2025
A guide to agentic coding CLI tools in 2025
Guides

A guide to agentic coding CLI tools in 2025

Dive into our 2025 guide on agentic coding CLI tools. We break down what they are, compare the leading options, and discuss the critical trade-offs between cost and efficiency. Learn how the principles of agentic AI are moving beyond code to revolutionize customer support and IT workflows.

Stevia PutriStevia PutriSep 29, 2025
A complete guide to Customer.io pricing in 2025
Guides

A complete guide to Customer.io pricing in 2025

Thinking about using Customer.io? Our complete guide to Customer.io pricing covers everything you need to know about their plans, overage fees, and the real cost of their platform, helping you make an informed decision for your business in 2025.

Kenneth PanganKenneth PanganOct 8, 2025

Ready to hire your AI teammate?

Set up in minutes. No credit card required.

Get started free