Nodes that
run themselves.
A contract is just a node. Give it a {{webhook}} title and a little code, and it runs whenever something in its scope changes — under your authorization.
A node, plus a little code.
Name a node {{webhook:…/contracts/sandboxed}}, point its config at a code node, and it’s live — re-running on every change inside it.
#contracttitle: {{webhook:…/contracts/sandboxed}}
config: { "codeNodeId": "<code node>",
"nodeId": "<where to post>" }// injected: eventType, event, entityId, contractConfig, graph, fetch
if (eventType === 'ItemCreatedEvent') {
const item = await graph.getItem(entityId)
await graph.addMessage(contractConfig.nodeId,
`📋 New: ${item.title}`, { lifebot: 'off' }) // off = just log
}The code is just another node — pointed at by id, so keep your code and data laid out across the project however you like (a node can be a task, a doc, a marker, or a program). Keep it outside the watched branch so edits don’t re-trigger the contract — and it runs with your permissions, touching your graph the way you can.
Every change is an event.
Nothing is overwritten in place — each edit is an event that bubbles up the tree. The same events that build a node’s history also wake the contracts above it. So you never copy data in: drop a reference to what you care about — a project, a teammate, a whole branch — and its events flow up to your contract.
Four kinds of contract.
Run your code
sandboxed — runs JavaScript from any node you point at, with the graph SDK and the event injected.
Ask Lifebot
lifebot-prompt — hands the event to Lifebot with your prompt, and it decides and acts.
Stream anywhere
twitter / webhook + fetch — push a slice of your graph out to Slack, your own API, or the world when something changes; pull data back in.
Log everything
logger — stream every event into the node’s chat, for a full audit of what happened.
Today contracts fire on events (created · edited · moved · messaged). Next: on a schedule, by name (@bot), and from full AI agents — coming.
It can think — not just react.
Inside the code you can ask Lifebot — and it answers as you, reasoning and searching across your own graph. Then you act on what it found: file it where it belongs, stream it out to Slack or your API, or spin up a new node. Or post a plain-language instruction and let it carry that out too.
// a new idea lands → Lifebot finds its home, you file it there
if (eventType === 'ItemCreatedEvent') {
const idea = await graph.getItem(entityId)
const r = await graph.askLifebot(contractConfig.nodeId,
`One line: which project does "${idea.title}" belong to?`)
await graph.addItem(contractConfig.projectsId,
{ title: idea.title, description: r.content })
// …or stream it out: await fetch(contractConfig.slackUrl, …)
}// a message with Lifebot ON is an instruction it runs as you
await graph.addMessage(entityId,
'The title holds a counter — set it to one higher.')Tune it per node, per person: point Lifebot at one branch or your whole life, and pick a cheap model for high-frequency automation or a smart one for the hard calls.
You don’t even write it.
Lifebot knows the contracts docs by heart — every event, every injected variable, the config shape. Ask in plain language and it assembles the whole thing: the contract node, the code node, the wiring — then switches it on.
It repairs its own automation.
When the code breaks, the contract pauses and posts the error into its code node’s chat. If that node has assist on, Lifebot reads the error, fixes the code, and switches the contract back on — automation that heals itself. And no one slips code past you: if someone else edits it, the contract pauses until you re-approve — nothing unreviewed ever runs as you.
Or automate in plain words.
A node can simply be the bot. Write its job in the description, in plain language, switch on assist — and Lifebot runs it on every message, as you. Code when you want precision; words when you don’t.
The behavior lives in the description — editable by anyone who can write a sentence, no deploy. And a code contract can post that trigger itself, so words and code compose.
Build a digital twin of almost anything.
Think of the graph as shared folders — like a drive you and your team already know — that keep themselves in sync. A graph that mirrors something real is a digital clone: the events are its heartbeat, the contracts its reflexes, Lifebot its judgment.
A digital company
Departments, people and projects as nodes. Contracts route work, nudge owners, and roll up reports — the org runs itself while you replay its history.
A robot or device
Its state is a set of nodes; every reading is an event streaming in. Contracts react in real time — a live twin you can replay, inspect, and drive.
An event-sourced ledger
Every transaction an immutable event. Contracts post balances, reconcile, and flag anomalies — books that can’t lose a number and explain themselves.
A second brain
Your whole life as a graph that remembers everything, summarizes on demand, and quietly acts for you — the first digital twin worth having: you.
Let your graph work for you.
You set the intent. The nodes do the rest — and fix themselves.
Start your graph →