Start / 301 · Agents at work
301 · Agents at work
Thirty minutes. At the end, you'll have:
- a hosted agent that you, and the teammates you choose, can send captures to;
- its side effects waiting for your approval;
- agents that can show each other what they see.
You need 201 done on the machine that will host the agent.
1. Write a profile
A hosted agent is a profile that lwisd runs for you on demand, with no session open. This one helps whoever is on call: it reads the runbooks in its folder and answers with the next step.
# ~/.config/lwis/agents/oncall.toml
name = "oncall"
runtime = "claude-sdk"
cwd = "~/agents/oncall"
tools = ["Read", "Glob", "Grep"]
system = """
You help the on-call engineer. The capture is a screenshot of an alert, a graph or an error.
Find the matching runbook in this folder and answer with the next step, in three lines at most.
"""
mkdir -p ~/agents/oncall && cp runbooks/*.md ~/agents/oncall/
lwis agents check ~/.config/lwis/agents/oncall.toml # validates it, and prints the exact claude command
lwis agents reload
Other runtimes run any program (command) or call a local webhook (webhook). See Hosted agents and Agent profile format.
2. Send it a capture
On your phone, capture an alert, circle the graph, and choose oncall as the target. lwisd starts the agent and keeps it warm for 5 minutes. Its answer comes back to your phone as a plain-text reply.
3. Keep it in check
- Strict by default. Read-only tools run straight away. Any other tool call waits for you, with a desktop notification and a notice on your phone. Review it with
lwis agents list, then runlwis agents approve a_…orlwis agents deny a_…. - Confined. The agent runs in its own folder, with only the tools you list and none of your plugins, hooks or MCP servers.
- One switch.
lwis pausestops every delivery, to sessions and agents, untillwis resume.lwis logrecords everything.
See Agent safety.
4. Let your team reach it
Teammates you follow (from their card link, see Contacts) can send you captures. By default, those land in your inbox, and you decide what goes further:
lwis inbox
lwis forward c_… --to oncall --note "is this the same incident as this morning?"
To let one teammate reach the agent directly, name them in accept_from (by identity id or fingerprint), and turn on their agents policy:
accept_from = ["self", "<their identity id>"]
lwis contacts policy <their petname> --agents on
lwis agents reload
Their captures always run strict, in a fresh process that never sees your own conversations with the agent.
5. Agents reporting to each other
A QA agent on one machine can wake the coding agent on another with what it saw. Pair the machines once (lwis pair --agent qa-bot on the coding machine, lwis peer add prod '<link>' on the QA machine), let a session accept it, then:
lwis attach <sid> --wake --from-agent qa-bot --agent-instruction "Investigate and answer; ask me before any change." # coding machine
lwis send-agent prod checkout.png --to api-service --note "503 since 14:02" --yes --wait-reply 900 # QA machine
The report arrives fenced as another program's data, under your instruction, and the answer comes back to the QA agent. For a one-off, or an agent without lwis, lwis share makes a one-time link instead. See Agent to agent.
Several machines
One phone can pair with every machine you use: your laptop, a devbox, a server that hosts agents. Each machine's sessions and agents appear under its label. The app's Machines screen has a Pause delivery switch for each one. See Remote machines and containers.