Feature · multi-agent

One chat. Many agents.

Stack multiple agents with different personas, triggers, and skills. Onboarding hands off to verification. Stalled checkouts trigger a rescue specialist. The user just sees one chat.

The shape

Each agent gets a name, a persona, a target (form/section), optional triggers, and optional skill restrictions. The handoff tool — auto-added when there are 2+ agents — passes control via the shared VFS, so the new agent has full context.

import { onExitIntent, combineTriggers } from "@linda/core";

const linda = new Linda({
  transport: { /* ... */ },
  config: {
    agents: [
      {
        name: "onboarding",
        persona: "Helpful, brief, never robotic",
        target: { type: "form", selector: "#signup" },
      },
      {
        name: "rescue",
        persona: "Empathetic, save-the-sale specialist",
        triggers: combineTriggers(
          onExitIntent(),
          { type: "hesitation", waitMs: 12000 }
        ),
      },
    ],
  },
});

Behavioral triggers

Linda ships 5 built-in triggers in @linda/core:

  • onExitIntent() — mouse leaves the viewport upward.
  • onHesitation({ waitMs }) — N ms of inactivity on a focused field.
  • onFieldFocus("selector") — a specific field gets focus.
  • onScrollDepth({ percent }) — the user reaches a scroll depth.
  • onPageHide() — tab is about to be backgrounded.

Compose with combineTriggers(...). Each trigger is a tiny function returning a teardown — write your own in 10 lines.

Three classic shapes

1. Specialist handoff

Onboarding agent handles intake. When the user mentions billing, it hands off to a billing-specialist agent that has a different system prompt and access to /host/billing/.

2. Checkout rescue

The default agent runs a checkout. onExitIntent triggers a "save the sale" agent with a different persona — warmer, empowered to offer a small discount, instructed to keep the conversation short. See the use case.

3. Multi-step intake

A long flow split into intake → verification → review, each its own agent. The handoff is explicit (the model calls it) or triggered (a section becomes visible).

🚀 See multi-agent live — the rescue demo shows onExitIntent handing off from intake to a save-the-sale agent.

Read the full multi-agent docs →

Ship an agent-driven flow this afternoon.

Install Linda, paste a config, and your form turns into an agent that fills its own inputs.