autoviv
Autoviv gives a new chat its own folder the first time the chat talks to you. The chat can be a Slack channel, a Discord guild or a Telegram group. Onboarding admits a new person, which is a different case. Autoviv needs no new code. A catch-all route and one MCP tool call do the work, with no daemon and no environment variable.
Three existing parts make a folder per chat
- Catch-all routes send a platform to a world agent. Two rows with a high
seqsend every message from a platform into one folder, the “world” agent, here calledatlas:
Theseq match target 100 chat_jid=slack:*/channel/* verb=mention atlas 200 chat_jid=slack:*/channel/* atlas#observe#observerow stores every channel message, so the agent has context. The mention row starts a turn when someone writes@atlas. - The world agent sees a channel without a folder. When
atlasruns a turn, it sees thechat_jidof the inbound message. Assume that no child folder has a route for that JID and that the sender holds an operator grant. Then the agent calls the MCP toolregister_groupwith the JID and a sanitized folder name. register_groupwrites the group and the route.routdwrites the group row, adds the routeroom=<jid-room>to the new folder atseq=0, and runsgit initin the folder. The next message in that channel goes toatlas/eng-supportinstead ofatlas.
One Slack channel gets its own folder
A teammate invites the bot to a new Slack channel #eng-support with the JID slack:T1234/channel/C5678 and posts “@atlas can you help here?”
- The route table has no row for
C5678. The catch-all rule sends the message toatlaswithverb=mention. atlasruns a turn, sees the JID and the operator grant of the sender, and callsregister_group(jid="slack:T1234/channel/C5678", folder="atlas/eng-support").routdwrites the group and adds the routeroom=T1234/channel/C5678toatlas/eng-supportatseq=0.- The agent replies in the thread from
atlas. The next message in that channel goes directly toatlas/eng-support, with its own folder, its own session and its ownCLAUDE.md.
The world agent needs one paragraph of instructions
Paste a paragraph like this into the CLAUDE.md or PERSONA.md of the world agent:
When you receive a message from a Slack channel JID
(slack:*/channel/*) that does not yet have its own folder,
and the sender holds operator grant, call register_group
with folder="atlas/<short-name-derived-from-channel>" and
jid="<the channel JID>". Sanitize the channel name:
lowercase, replace spaces and punctuation with '-'.
Reply once in the new folder confirming the channel
is now registered. Do not register channels for non-operator
senders — ask the operator instead.
Autoviv has three limits
- The world agent needs a delegated grant
register_groupis not in the default role, soatlasneeds an explicitmcp:register_groupgrant. The scope glob of the row is the whole containment rule. Withatlas/**, the agent can registeratlas/eng-supportand any other folder underatlas, but notother/foo. To widen the reach, edit the glob. Do not move the folder.- A second call writes nothing new
- The route key is its
seq, match and target. So a secondregister_groupcall with the same JID and folder adds no second route. - The new folder gets no seed
register_groupdoes not callcontainer.SetupGroup. Checkgroups/<folder>/if the new agent lacks its expected workspace files.
Routing and grants explain the parts
routing covers route tables, glob matching and the #observe mode. grants reference covers grants, roles and delegation. mcp reference covers register_group and the other MCP tools. web-native agents covers the web folders that a folder with the web:publish grant gets.