Documentation

My Agents

Personal AI agents for every account: chat, memory, schedules, webhooks, approvals, app connections, teams, models and cost.

Availability

My Agents appears in the sidebar (Personal) once an operator switches the module on for the network. Agents can chat, remember, run on schedules and webhooks, ask before acting, use your connected apps, work in teams, use a folder on your computer and notify your phone, on the AgentMesh model or on your own deployment.

What My Agents is

My Agents gives every AgentMesh account (customer, provider or staff) personal AI agents that work for them. It is separate from AI Deploy, which only plans and runs model deployments, and it does not change how deployments, the gateway or provider machines work.

Create and configure an agent

  1. Open My Agents in the sidebar (/agents) and choose New agent.
  2. Give it a name (unique among your agents) and, if you like, a description.
  3. Write its instructions in your own words: what it is for and how it should work.
  4. Choose where it thinks, its autonomy and its limits (below), then create it.

Every saved change to the configuration becomes a new version, listed on the agent's page, so you can always see what it was set to. Renaming does not create a version. Pausing keeps everything but starts no new work. Deleting removes the agent and everything stored for it.

Chat and tasks

Open an agent and write to it. Each message is a task that runs in the background; the answer appears when it is done. Messages in the same conversation see the earlier exchanges of that conversation (up to six); a new conversation starts clean. You can cancel a task that is still running. Details shows every step: each model call and each tool call, with tokens and cost.

A task can take up to its agent's step limit and at most ten minutes. It ends as done, failed (with the reason), cancelled, or stopped because its budget is used up.

Built-in tools

ToolDoes
get_timeThe current date and time in a time zone (for example Africa/Lagos).
calculateExact arithmetic: numbers, + - * / // % ** and brackets. Nothing else is evaluated.
memory_searchSearch the agent's memories (when memory is on).
memory_saveSave one lasting fact or preference (when the agent may save memories). At most five per task.

Tools are an allowlist checked in code. What a tool returns is given to the model as data, with the instruction never to follow instructions found inside it. Tools with consequences outside AgentMesh, and the approval step for them, come with app connections.

Memory

Each agent keeps memories between conversations: short facts, preferences and notes. You can add them yourself on the agent's page, and the agent can save what you tell it (for example "I prefer short answers") with itsmemory_save tool. Every memory shows who wrote it, how often it was used and, for the agent's own, the task it came from. You can edit, pin, delete one, or clear them all.

  • Pinned memories are always given to the agent; the others when they share words with the task, then the most recently used, up to eight per task.
  • The agent is told that memories are information, not instructions. It follows the preferences you wrote, but never instructions found inside memories it saved itself.
  • An agent keeps at most its configured number of memories (200 by default, up to 1,000). When it is full, new memories are refused; nothing is dropped without you deciding.
  • Memory can be turned off per agent (it then neither sees nor saves memories), or the agent can be stopped from saving new ones itself. Deleting an agent deletes all its memories.

Schedules

A schedule gives an agent the same request on a timetable: every so many minutes (at least 15), or at a time of day in a time zone (Africa/Lagos unless you choose another), optionally only on some weekdays. Each run is an ordinary task with the same limits, budget and approvals, in a new conversation each time or one conversation for all runs. Run now starts one straight away without changing the timetable.

  • If AgentMesh was down when a run was due, it runs once when it is back, not once for every missed slot.
  • If your wallet cannot pay for a run, the schedule turns itself off and says why. Turn it on again after adding credit.
  • If the agent has reached today's spending limit, that run is skipped and the schedule carries on.
  • A schedule whose runs fail three times in a row turns itself off. A paused agent's schedules are skipped.

Webhooks

A webhook lets another service give an agent work: a new order, a form submission, a monitoring alert. You write the instructions ("summarise this order"); each call's body is handed to the agent as outside data under them. The agent is told never to follow instructions inside that data. The webhook URL and its secret are shown when you add it; the secret is shown only then (rotate it to get a new one).

Signed call (recommended)

BODY='{"order": 42}'
TS=$(date +%s)
SIG="sha256=$(printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')"
curl -X POST "$WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -H "X-AgentMesh-Timestamp: $TS" \
  -H "X-AgentMesh-Signature: $SIG" \
  -H "Idempotency-Key: order-42" \
  -d "$BODY"

Services that cannot sign can send Authorization: Bearer <secret> instead. Signed calls older than five minutes are refused, so a captured call cannot be replayed. An Idempotency-Key (8 to 50 characters) makes retries start one task. Bodies are limited to 64 KB and each webhook to 30 calls a minute. A call with a wrong secret, to a webhook that is off, or to one that does not exist gets 404; a call the wallet cannot pay for gets 402. The answer to a good call is 202 with the task id; the agent's result appears in your chat history.

Approvals

Some tools have consequences outside AgentMesh, such as sending a message. With autonomy set to Ask me first, the agent stops before using one and shows you exactly what it wants to do; it continues once you approve (the action runs) or reject (the agent is told, with your reason if you give one). Waiting does not use the task's ten minutes, but its budget stays set aside. Requests nobody answers expire after 24 hours. Pending requests appear on My Agents and in the chat. Tools that send or create something in a connected app (an email, a Slack message, an issue, a calendar event, a Notion page, a webhook call) are the ones that ask first.

Computers and phones

Devices (/agents/devices) connects a computer, so chosen agents can work with one folder on it, and turns on notifications on your phone or browser.

Your computer

  1. On Devices choose Connect a computer, name it and tick the agents that may use it. You get a one-time code (valid 15 minutes) and the commands to run.
  2. On the computer (Python 3.10 or newer): download the companion from /api/v1/agents/companion.py, pip install websockets, then python agentmesh_companion.py enroll --code CODE --folder ~/AgentMesh and python agentmesh_companion.py run.
  • Agents can list the folder, read text files in it (up to 200 KB) and show you notifications. Add --allow-write when enrolling to let them save files there too; writing asks first for agents set to Ask me first.
  • Nothing outside that folder is reachable: paths that climb out, absolute paths and links pointing elsewhere are refused by the companion itself. It has no way to run programs or commands.
  • The companion connects out to AgentMesh over one encrypted connection; nothing connects in to your computer. Its token is stored only on that computer (readable by you alone); AgentMesh keeps a hash. Remove the computer on Devices to cut it off at once.
  • When the companion is not running, agents are told the computer is offline.

Your phone

Open Devices on the phone and choose Turn on notifications here. You are notified when an agent waits for your approval and when scheduled or webhook work finishes; tapping opens the task. On iPhone and iPad, add AgentMesh to the Home Screen first (Share, then Add to Home Screen) and open it from there. Any phone can install AgentMesh this way to use it like an app.

App connections

Connect an app once on Connections (/agents/connections) and tick which agents may use it. Each connection gives those agents its tools; an agent that is not allowed does not even see them.

AppHow you connectTools (asks first = waits for approval)
Web pagesNothing to enter; optionally only some sitesfetch (read a public page)
Outgoing webhookAn https address (Zapier, Make, your server), optional signing secretsend (asks first)
Email (SMTP)Your mail server, user name and password (an app password for Gmail or Outlook); optionally only some recipientssend (asks first)
GoogleSign in with Googlegmail send (asks first), calendar list, calendar create (asks first)
SlackSign in with Slack, then add the app to channelslist channels, post message (asks first)
GitHubSign in with GitHublist issues, create issue (asks first)
NotionSign in with Notion and pick the pages to sharesearch, create page (asks first)
  • Passwords, secrets and app tokens are stored encrypted. They are never shown again, never returned by the API and never given to a model: agents use them only through their tools.
  • Agents reach the internet only through a guarded client: public addresses only (never private networks or cloud metadata), every redirect checked again, a size and time limit on each call.
  • Each connection allows at most ten actions with consequences a minute. Several connections of one app? The agent names the one it means (account).
  • A page or app result is given to the agent as data. An agent that can read the web and also send email could be tricked by a page into sending something: keep such agents on Ask me first, or limit the sites and recipients.
  • Removing a connection deletes its stored credentials. Deleting an agent removes it from every connection.

Teams

Put two to ten of your agents in a team (Teams, /agents/teams) and they can hand each other sub-tasks: a lead agent asks a researcher, the researcher answers, the lead carries on. Agents see their teammates' names and descriptions, so describe each agent clearly. The handed-over work appears in the teammate's own history ("From a teammate"), and the task page shows the whole tree with its total cost.

  • One budget: everything a team does for a request is paid from that request's budget, so a team never spends more than the per-task limit of the agent you asked. When that budget runs out, the teammate stops and the asking agent is told.
  • Hand-offs go at most one, two or three levels deep (two by default), at most five per task, and never back to an agent that is already waiting in the same chain.
  • Approvals still apply: a teammate set to ask first waits for you before acting, and the agents above it wait too.
  • Cancelling a task cancels everything it handed out. A teammate on its own deployment or with its own budget works the same way; an agent on its own deployment that hands work to one on the AgentMesh model gives that teammate a budget of its own.

Models and cost

ChoiceHow it is paid for
AgentMesh model₦5 per 1,000 tokens (what you send and what it answers, together), from your AgentMesh wallet, rounded up to whole kobo per step.
One of my deploymentsYour own running deployment. It is billed as compute exactly as today; the agent adds no charge.

When a task starts on the AgentMesh model, its budget is set aside from your wallet: the agent's per-task limit, or less if today's limit or your balance is lower. Each step is charged from it once, and whatever is left goes back to your available credit when the task ends. Before every step the agent checks that the rest of the budget covers the step at its largest; if not, the task stops. Usage on the My Agents page shows today's and the last 30 days' spending.

Wallets for every account

Customers pay from their usual Wallet. Provider and staff accounts get a wallet of their own for My Agents: openWallet under Personal in the sidebar (/agents/wallet) and add credit; it is created with the first deposit and is used only to pay for agents. It does not make the account a customer of the compute marketplace.

Only your own deployments can be chosen, and confidential deployments cannot be used by agents yet.

Autonomy and limits

Ask me first makes the agent wait for your approval before any action with consequences, such as sending a message.Act within my limits lets it go ahead with the actions you enabled. In both cases AgentMesh enforces the limits in code: spending per task, spending per day (a calendar day in Lagos), and steps per task. The per-task limit cannot be more than the daily one. Money still set aside by a running task counts against today's limit.

API

RequestDoes
GET /api/v1/agents/healthWhether My Agents is on
GET | POST /api/v1/agentsList or create your agents
GET | PATCH | DELETE /api/v1/agents/{id}Read, change (new version) or delete one
POST /api/v1/agents/{id}/pause | resumePause or resume
GET /api/v1/agents/{id}/versionsConfiguration history
POST /api/v1/agents/{id}/tasksSend a message (input, optional thread_id and idempotency_key); answers 202 and runs in the background
GET /api/v1/agents/{id}/tasksIts tasks, newest first; thread_id narrows to one conversation
GET /api/v1/agents/tasks/{task_id}Status, answer, cost
GET /api/v1/agents/tasks/{task_id}/stepsExecution history
POST /api/v1/agents/tasks/{task_id}/cancelCancel a running task
GET /api/v1/agents/usageSpending on the AgentMesh model, today and over 30 days, per agent
GET | POST /api/v1/agents/{id}/memoriesList (q searches) or add memories
PATCH | DELETE /api/v1/agents/{id}/memories/{memory_id}Edit, pin or delete one
DELETE /api/v1/agents/{id}/memoriesDelete all of them
GET | POST /api/v1/agents/{id}/schedulesList or add schedules (PATCH, DELETE and POST .../run per schedule)
GET | POST /api/v1/agents/{id}/triggersList or add webhooks (PATCH, DELETE and POST .../rotate per webhook)
POST /api/v1/agents/hooks/{trigger_id}Incoming webhook call, authenticated by the webhook's secret
GET /api/v1/agents/approvalsActions waiting for your approval
POST /api/v1/agents/tasks/{task_id}/approvals/{seq}Approve or reject one ({"approve": true | false, "note": "..."})
GET /api/v1/agents/connectorsApps that can be connected, and their tools
GET | POST /api/v1/agents/connectionsYour connections; POST connects an app without sign-in (connector, label, config, credentials, agent_ids)
PATCH | DELETE /api/v1/agents/connections/{id}Rename, change which agents may use it, replace settings; remove
POST /api/v1/agents/connections/oauth/{connector}/startBegin signing in with an app; returns the app's sign-in address
GET | POST /api/v1/agents/teamsYour teams (name, description, member_agent_ids, max_depth 1-3)
PATCH | DELETE /api/v1/agents/teams/{id}Change or delete a team
GET /api/v1/agents/tasks/{task_id}/treeThe task tree a task belongs to, with total cost
GET /api/v1/agents/devicesYour computers and phones
POST /api/v1/agents/devices/codesA one-time code for connecting a computer
PATCH | DELETE /api/v1/agents/devices/{id}Rename, choose agents; remove
POST /api/v1/agents/devices/pushRegister a browser's push subscription for notifications

Agents are private: no other account, staff included, can read or change yours.

For operators

The module is controlled by AGENTS_ENABLED. Left unset it is on in development and test and off in production, where every route except /agents/health then answers 404 and the sidebar hides the page. Switching it off deletes nothing.AGENTS_MAX_PER_USER (default 20) and AGENTS_CREATE_PER_MINUTE (default 10) limit agents per account. The AgentMesh model is Gemini (the GEMINI_* settings shared with AI Deploy) at AGENTS_PRICE_PER_1K_TOKENS_MINORkobo per 1,000 tokens (default 500, ₦5), credited to the ledger account platform:agent_usage:NGN. Other limits:AGENTS_MAX_OUTPUT_TOKENS (1024 per step), AGENTS_TASK_MAX_SECONDS (600), AGENTS_TASKS_PER_MINUTE (10),AGENTS_MAX_ACTIVE_TASKS_PER_USER (3). Finished tasks are deleted after AGENTS_TASK_RETENTION_DAYS (90); what was charged stays as a financial record. A task whose runner stops (for example a restart) is resumed by the background job after AGENTS_LEASE_SECONDS (180).

Sign-in apps work once you register an OAuth app with each provider and set its keys on the API:AGENTS_OAUTH_GOOGLE_CLIENT_ID / _CLIENT_SECRET, and the same for SLACK, GITHUB and NOTION. Use the redirect URI {PUBLIC_BASE_URL}/api/v1/agents/oauth/<connector>/callback (for examplehttps://api.agentmeshx.tech/api/v1/agents/oauth/google/callback). Scopes: Google openid email gmail.send calendar.events (Gmail sending needs Google's app verification before the public can use it); Slack bot scopeschat:write channels:read; GitHub repo; Notion a public integration. Until its keys are set, an app shows as not set up. Outgoing calls are limited by AGENTS_FETCH_MAX_BYTES (1 MB), AGENTS_TOOL_TIMEOUT_SECONDS (20) andAGENTS_ACTIONS_PER_MINUTE (10 per connection).

Phone notifications need a Web Push key pair: run python scripts/generate_vapid_keys.py on the server and setAGENTS_VAPID_PRIVATE_KEY (secret) and AGENTS_VAPID_SUBJECT (a mailto: or https: contact push services can reach); until both are set, notifications are off. Desktop companions connect to/api/v1/agents/devices/ws; a connection lives in one API process, so with several replicas a computer is reachable only through the replica it is connected to. AGENTS_DEVICE_CALL_TIMEOUT_SECONDS (30) and AGENTS_MAX_DEVICES_PER_USER(10) set the limits.

Shared limits protect the rest of AgentMesh: AGENTS_MAX_CONCURRENT_MODEL_CALLS (8 in flight per API process) andAGENTS_PLATFORM_CALLS_PER_MINUTE (60 across all agents, because the Gemini key is shared with AI Deploy and reports). Background agent work runs alongside, never inside, the monitor pass that watches provider machines. Operators see network figures (agents, tasks, spend, failure reasons, devices; never anyone's prompts or answers) onOperator > Agents usage (GET /api/v1/admin/agents/stats).

Switching the module on in production: add AGENTS_ENABLED=true (and, if wanted, the push and app keys above) to the production environment file and upload it with the deploy script's configure step (withALLOW_PAYOUT_TRANSFERS=true if payout transfers are meant to stay on), then check GET /api/v1/agents/healthand Agents usage. The new collections and indexes are created on startup. To switch it off again, setAGENTS_ENABLED=false: nothing is deleted, and the routes answer 404 until it is back on.