By sarah

How Always-On AI Bots Work: Tools, Channels, Memory, Proactivity and Permissions

Sarah from Composio breaks down how state-of-the-art always-on agents are built, from the LLM loop and tools to iMessage channels, memory and dreaming, proactive triggers, and permission scoping.

From LLM to chatbot to agent
  • 1From LLM to chatbot to agent
  • 2Give your agent a terminal and a browser
  • 3Use Composio for APIs and authentication
  • 4Channels: talk to your agent over iMessage
  • 5How agent memory is built
  • 6Make bots proactive with schedules and triggers
  • 7Permissions and safety for agents
0:00 / 1:16

Chapter 1

From LLM to chatbot to agent

How a tool-calling loop and a harness turn a plain model into an agent.

About this chapter

Sarah explains that every bot is an LLM, and that prepending output to the next prompt gives chat and context. Feeding output back into the model, with a stop token to end the loop, turns chat into an agent. Tool calls are a hack: the model names a function and arguments, the system executes it and feeds the result back. Context plus tools is called the harness.

  1. The dotted return path feeds the model’s output back into its context.

  1. The model outputs send_email and the recipient argument for the harness to execute.
    The model outputs send_email and the recipient argument for the harness to execute.

  1. The dotted harness surrounds the context window, model and tools.
    The dotted harness surrounds the context window, model and tools.

Chapter 2

Give your agent a terminal and a browser

Terminals, sandboxes and browsers as ways for an agent to act.

About this chapter

A terminal lets the agent do almost anything on a computer, either on the user's machine or in a sandbox or VM such as E2B and exe.dev, which Composio uses internally. Browsers can come from BrowserBase or BrowserUse, or the user's own via Chrome DevTools MCP. Browsers are slow, iterative work, so she recommends direct API access via MCP or CLI when one exists.

  1. The API route reaches the same request directly beneath the longer browser route.
    The API route reaches the same request directly beneath the longer browser route.

Chapter 3

Use Composio for APIs and authentication

Why API keys and OAuth are hard, and how a managed layer exposes 1,700+ apps.

About this chapter

Most APIs authenticate through API keys or OAuth, and OAuth often requires a developer app, payment or approval. Sarah recommends Composio, which offers over 1,700 apps, manages tokens and keys, and has a free tier of 100,000 tool calls monthly. A search tool and an execute tool keep thousands of tools out of the context window.

  1. An API-key field sits beside an OAuth consent screen for a Google account.
    An API-key field sits beside an OAuth consent screen for a Google account.

  1. Tool definitions pile up beneath the red context-window limit.
    Tool definitions pile up beneath the red context-window limit.
  2. The agent searches for GMAIL_SEND_EMAIL, then uses the execute tool to send the message through Gmail.
    The agent searches for GMAIL_SEND_EMAIL, then uses the execute tool to send the message through Gmail.

Chapter 4

Channels: talk to your agent over iMessage

Photon, Linq and CopilotKit make messaging and chat interfaces easy.

About this chapter

Sarah says she regrets not setting up iMessage for her own bot, since Photon Spectrum, Linq and SDKs handle the complexity. For a web chat UI she would start with CopilotKit rather than build from scratch. Agents like Poke and Instinct have no web interface and feel like their own entity through text, email or phone apps.

  1. A calendar request and reply appear in a message thread alongside two iMessage SDKs.
    A calendar request and reply appear in a message thread alongside two iMessage SDKs.

Chapter 5

How agent memory is built

Storage, search and higher-level layers like dreaming, using OpenClaw as an example.

About this chapter

Memory usually combines automatic per-turn context with tools for exploring more. It has three layers: storage (file system or database), search (keyword or vector), and extras like dreaming or graphs. OpenClaw loads soul.md, identity.md, user.md and memory.md each session, keeps daily notes searched via terminal, and dreams at 3am to update memory.md. She also mentions using Glen with Claude Code.

  1. A managed memory service encloses storage, search, dreaming and graphs.
    A managed memory service encloses storage, search, dreaming and graphs.

  1. IDENTITY.md gives the bot a name, a character and a tone of voice.
    IDENTITY.md gives the bot a name, a character and a tone of voice.
  2. Four OpenClaw files flow into the session’s context window.
    Four OpenClaw files flow into the session’s context window.

  1. A terminal search for “dentist” can retrieve the appointment from the dated daily log.
    A terminal search for “dentist” can retrieve the appointment from the dated daily log.
  2. At 03:00 the nightly process promotes a lasting preference to MEMORY.md and combines the dentist notes.
    At 03:00 the nightly process promotes a lasting preference to MEMORY.md and combines the dentist notes.

Chapter 6

Make bots proactive with schedules and triggers

Cron wake-ups and event triggers let an agent act without being prompted.

About this chapter

Proactivity is what makes an agent always-on. OpenClaw originally used a cron job to wake the agent about every 30 minutes. Alternatively, event triggers such as Composio Triggers can wake an agent when a support ticket arrives. Most popular bots allow both, though by default they wake on a regular cadence.

  1. A new support ticket travels through a trigger and wakes the bot.

Chapter 7

Permissions and safety for agents

Why full terminal and browser access is risky and how scopes limit it.

About this chapter

Full access means an agent logged into Google could delete your account as you could. One mitigation is a separate computer or browser logged into accounts you don't care about. For sensitive services like email and Slack, API scopes help, such as read but not delete, and Composio can block specific tools. She closes by inviting comments.

  1. Fetch and send are enabled. The delete-message tool is crossed out.
    Fetch and send are enabled. The delete-message tool is crossed out.

Browse

See all

You

Turn any video into an easy-to-follow guide.

© 2026PrivacyCreators