flespi AI agents: autonomous AI workers in your account

A flespi AI agent is an autonomous AI worker living in your flespi account

Essentials

A flespi AI agent is an autonomous AI worker living in your account. You describe what you need in natural language. The agent plans the work, uses the systems you connected it to, reports back, and asks for your approval before sensitive actions. From the agent's perspective you are its principal — the controlling identity it works for, reports to, and asks for approval.

Compared to the AI assistant in the flespi support chat, an agent does more than answer questions: it acts on your behalf, monitors what you entrust to it, and keeps its own memory and working state across days of work. Compared to general-purpose AI agents, it knows flespi and telematics deeply out of the box. And it is safe by design: every account-changing action passes through the platform security layers and your approval rules.

Typical work to hand over:

  • keeping your flespi account in good shape;
  • discussing and implementing your telematics project;
  • watching the flespi changelog and surfacing only the changes that affect your setup;
  • running the correspondence with a device manufacturer's support on your behalf.

How flespi AI agents work

An agent lives in a sleep-wake cycle. It sleeps until something wakes it up: your message, an event in a connected system, a wake-up it scheduled for itself, or your decision on a pending approval request. A newly created agent is born asleep too: assigning connectors does not wake it up, the first message or event does. Talk to it the way that suits you — in the flespi panel chat, via POST /ai/agents/{selector}/messages, or right in Telegram and Slack when the corresponding connector is assigned.

Once awake, the agent thinks in reasoning steps. A reasoning step is one full turn of the AI model: the agent analyzes the situation, uses the tools of its connectors, and communicates the results. A typical task takes a single step. A complex one, or one requiring the agent to switch on additional capabilities, may take a few. A settled agent often handles several related requests in one step.

Within a step the agent works with data freely: it calls the flespi REST API, creates and runs scripts, and processes the results computationally. It can also bind scripts as handlers to MQTT topics or timers. A handler is not a reasoning step: it watches, filters, and computes on its own, and wakes the agent only when its condition is met. Computational processing is free — only reasoning steps consume AI credits.

Every action that changes the external environment — a modifying flespi API call, an outgoing email, a Wialon account change — passes through the agent operations ACL. Depending on the rule you set, the operation executes automatically, is denied, or becomes an approval request. Read-only operations run free: the agent explores as much as it needs, while you control everything it changes.

Connectors

A freshly created agent has no access to anything — connectors give it capabilities. A connector holds the credentials and configuration for one external system and brings the agent the tools and expertise to work with it. Connectors are created separately and assigned to the agent. You can assign and unassign them at any time.

Connector What it gives the agent
flespi Binds the agent to a flespi account: platform expertise plus API access with the provided token. The agent becomes a solutions architect and operator of the account.
telegram A Telegram bot identity: talk to the agent in a private chat or invite it to groups; the private chat also delivers approval prompts.
slack A Slack app identity: work with the agent in your Slack workspace, alone or with your team; direct messages also deliver approval prompts.
email An email account: the agent runs correspondence on your behalf and can watch the inbox for incoming mail.
wialon_hosting Access to a Wialon Hosting account: Wialon expertise plus direct work with the account data.

Each connector type is covered in detail in its dedicated article.

The flespi connector is the main one: it makes the agent an expert on the flespi platform and an operator of your account. Provide it with a token — a master token is appropriate here. The agent works on your behalf, and its account-changing API calls are guarded separately: reads run freely, every modifying call requires your approval by default.

How to create an agent?

Agents and connectors live in the AI section of the flespi panel left menu.

Start with a connector, so that the new agent has something to work with. Navigate to AI -> Connectors, click the "+" button in the bottom right corner, pick the connector type, and fill in the configuration it asks for: a name, the credentials of the connected system, and type-specific options. For the flespi connector the credential is a token of your account: pick an existing one with the key icon next to the field or paste a value:

create flespi AI connector

Now create the agent itself: navigate to AI -> Agents, click the "+" button, give the agent a meaningful name, and assign your connector on the Connectors tab of the same dialog:

create flespi AI agent

Assigning a connector sets the rule for each of its sensitive operation types: ask for approval each time, execute automatically, or reject always. The defaults are conservative. The Connectors tab of the saved agent manages the same bindings at any time: assign and unassign connectors and adjust the rules with the pencil button. An agent holds at most one connector of each type:

assign connector to flespi AI agent and set operation rules

Save, and the agent is provisioned: enabled, equipped with its connectors, and asleep. Send it the first message to set it on course.

Talking to your agent

Open the agent and switch to the Chat tab: this is your workspace with the agent. Write the way you write to a colleague, and attach files with the paperclip button or paste them from the clipboard with Ctrl+V. While the agent reasons, the chat shows the live status of the step and the activities it performs, so you always see what it is busy with:

chat with flespi AI agent

The reply lands in the same chat, and with no active task left the agent goes back to sleep. The Chat view keeps the pure conversation. Switch to All for the complete working history: the operations performed with their requests and responses, approval records, and the exchanges with other parties.

The same chats live in the Helpbox — the support chat behind the CHAT button in the top right corner of the panel. Switch to the AI agents tab at the top of the Helpbox: alongside the flespi team and the AI assistant you can talk to every agent of your account, in the very conversation you see in the panel.

And with a telegram or slack connector assigned you talk to the same agent right from your messenger.

Operation approvals

Approvals are the safety mechanism that keeps you in control. Each connector declares its sensitive operation types — for example, a modifying flespi API call or an outgoing email. For each one its configuration sets a rule: allow (execute silently), ask (request your approval), or deny. The defaults are conservative: account-changing operations ask for approval.

When an operation hits an "ask" rule, the agent pauses it and creates an approval request. Pending requests are visible in the flespi panel, in the "approvals" field of the agent, and as Approve/Reject prompts in the private Telegram chat or Slack direct messages of the linked principal. Decide in any of these places or with POST /ai/agents/{selector}/approvals: a request resolved anywhere is resolved everywhere. An agent waiting for your decision is easy to spot by the red "waiting approval" badge:

flespi AI agent approval request

A granted operation executes right away, between reasoning steps, without consuming one. A rejected one is discarded — the agent learns the outcome together with the reason you provide. A request left unresolved is rejected automatically once the approval window passes (one hour by default). The executed operation stays in the All view of the chat, unfolding into its full request and response:

executed operation record of flespi AI agent

Monitoring and logs

The agent continuously reports what it is up to in its runtime fields: the current task, what it is doing or waiting on, and when it wakes up next. Watch them in the flespi panel, request them via GET /ai/agents, or subscribe to the agent state over MQTT.

The agent history — the messages exchanged and the operations performed — is available with GET /ai/agents/{selector}/messages and streams live over MQTT. Each history record carries a type. Each connector adds its own record types, for example flespi_api_call_executed.

Every important event is recorded in the agent logs, available in Toolbox and via GET /ai/agents/{selector}/logs: configuration changes, connector assignments, each reasoning step with its charge and outcome, and the approval lifecycle. The logs also keep the agent activity journal — every script executed, every event received, every message sent, and every background handler run — so the log alone tells what the agent did and why. The Logs tab of the agent opens them right in the panel:

flespi AI agent logs

Connectors keep their own account of the agent's work. Every call the agent makes to a connected system, reads and changes alike, is recorded in the logs of the connector that served it, with the operation, its parameters, and the result. Review them in Toolbox or via GET /ai/connectors/{selector}/logs. Whatever the agent touches leaves a record:

flespi AI connector logs with the agent operations

Credits and limits

Each reasoning step costs 50 AI credits, charged before the step executes. Everything inside the step — AI model usage, tool calls, operations — costs no extra. The charge of a failed step is refunded automatically. Each charge is also recorded in the account AI logs, attributed to the agent.

When the account has no credits available, the agent does not lose its task: the step is delayed and retried until the charge succeeds. Reasoning steps also count toward the per-minute ai_calls rate limit.

The number of agents in an account is a plan limit — see how flespi pricing works.

Agents API

Agents and connectors are regular flespi platform items managed via the /ai/agents and /ai/connectors REST APIs — everything described above is available programmatically. See flespi API basics for general API usage.

Troubleshooting

  • The agent does not react: check that it is enabled and has connectors assigned — a freshly created agent without connectors has nothing to act with.
  • The agent went silent mid-task: look at its "approvals" field, it may be waiting for your decision. An unresolved request is rejected automatically after the approval window (one hour by default).
  • Steps are delayed: the account has no AI credits available. The agent retries automatically once the monthly counter recovers or the limit is raised.
  • Telegram or Slack does not answer: the chat is not linked — ask the agent for a fresh link code.
  • For anything else, the agent logs tell the story: each reasoning step, its outcome, and every action along the way.

What's next?

Subscribe to the flespi AI and MCP change log to stay in sync with any updates.


See also
Codi is the AI assistant in the flespi support chat: a flespi and telematics expert that answers your questions with your account data at hand.
The recommended way to authorize external AI agents in flespi: users sign in to a realm and approve MCP access, no token is created or shared.