Describe a world
Write a seed file that says what is on the calendar and in the mailbox when a world starts.
Write a seed file; twin world create turns it into a private world with exactly that data in it.
Twins
Google Calendar · Gmail
You write
a seed file (seed.md): a ## Setup section and one World section per twin
You get
a private world, from twin world create seed.md --folder world
Watch out
the clock pins a weekday, not a date. Name days as weekdays (Thu, Thu+1)
Prerequisites
The
twinCLI. See Quickstart.A sign-in: run
twin login, or setTWINS_API_KEY. See Keys and limits.
Copy this
A complete seed file, with a calendar and a mailbox:
## Setup
twin: calendar, gmail
now: Mon 09:00
## World: calendar
every weekday 10:00-10:30 Standup
Wed 15:00-16:00 Dentist
Thu 09:00-09:30 Team sync (priya@acme.test)
## World: gmail
Fri 16:42 Priya Shah <priya@acme.test> -> me "Call on Thursday" #priya-call // Could we find an hour on {Thu}, any time between 2pm and 4pm?Make the world from it:
The rest of this page covers each part.
Setup
## Setup holds settings, one key: value per line.
twin:
names the twins the file uses. It is for people reading the file: the World sections decide what is seeded
twin: calendar, gmail
now:
pins the world's clock to a weekday and time
now: Mon 09:00
The world's clock
now: Mon 09:00 pins the world's "now". Every day in the file is read against it, so "Thursday" always means the same day, whenever you make the world.
On the calendar,
Wedis the coming Wednesday after the clock, never the same day.Wed+1is the Wednesday a week later.In the mailbox,
Friis the most recent Friday before the clock.Fri-1is the Friday a week before that.today 08:30is the clock's own day.Times are UTC. Write two-digit hours:
09:00, not9:00.
When you run an agent with twin world run, it gets the world's "now" in TWIN_NOW (for example 2026-09-28T09:00:00Z). Have your agent read it, so its "today" matches the world's. See Run your agent.
World: calendar
## World: calendar lists the calendar before your agent starts, one event per line.
day and time
the day (against the clock) and the start and end, in UTC
Wed 10:00-11:00
all day
an all-day event, in place of the times
the Offsite line above
title
the event's title, after two spaces
Q4 planning sync
(...)
attendees. A reply after an address sets it: accepted, declined, tentative, invited (no reply yet)
(sam@acme.test declined)
private
at the end of the line, after two spaces: a private event
the 1:1 line above
[...]
details, separated by ; (see below)
[location: Board room; tentative]
// text
the event's description. Your agent only sees it by opening the event
// Agenda: Q3 numbers
The details in [...] can be:
location: Board room
sets the location
tentative
marks the event tentative
free
shows the time as free
color: Tomato
one of Lavender, Sage, Grape, Flamingo, Banana, Tangerine, Peacock, Graphite, Blueberry, Basil, Tomato
reminder: 10
a reminder, in minutes before
focus time
a focus-time block (needs times, not all day)
out of office
an out-of-office block (needs times, not all day)
In a file with only a calendar, plain ## World means the calendar. When the file also has a mailbox, name each section: ## World: calendar and ## World: gmail.
Recurring events
Start a line with every to make a recurring event:
every Mon (any weekday)
weekly, on that day
every weekday
Monday to Friday
every day
daily
The series starts on the next such day after the clock.
Other calendars and sharing
A world can hold more calendars than the primary one. A calendar: line starts a calendar, and the event lines under it go on it. Put who it is shared with in brackets, each with a role:
Roles:
free/busy,reader,writer,owner.calendar: primaryshares the primary calendar.A calendar's own details go in
[...]after it:
World: gmail
## World: gmail lists the mailbox, one email per line:
when
the most recent such weekday before the clock; Tue-2 two weeks before that; today 08:30
Sat 10:15
from / to
Name <address>, or me for the mailbox owner
me -> Mira <mira@acme.test>
cc
optional, after to
cc mira@acme.test
labels
optional. Received mail defaults to INBOX, UNREAD; mail from me to SENT. System labels by id (INBOX, STARRED, IMPORTANT, DRAFT); any other name becomes a label of the user's own
[INBOX, STARRED], [INBOX, Project X]
#thread
lines with the same key share a thread
#offsite
+file
an attached file, by name (no spaces). The content is a stand-in
+invoice-4471.pdf
body
the text after //
// Free {Thu} 2-4pm
Drafts. A line from me labelled [DRAFT] is a draft already waiting. Your agent can list it, edit it and send it:
Dates in a body. Write days in a body as {Thu} or {Thu+1}. They become dates, such as "Thursday 15 October", when the world is made. "Next week's Thursday" in an email sent on a Saturday reads two ways; a date does not.
Mail that arrives mid-task
A line that starts after message.send#1: is hidden when the world starts. It lands in its thread, unread, when your agent sends its first email:
Use it for a change of plan your agent should notice before it reports back. To make mail arrive at a moment you choose instead, use twin world trigger (see Run your agent).
Mailbox settings
Mailbox settings go among the emails, one per line:
A filter matches
from,to,subjectorquery. It canlabel X,archive,mark read,star,important,delete,spamorforward a@b.[smime]on a send-as line gives that address an S/MIME certificate (a stand-in).cse:gives an address a client-side encryption identity.
People
The people in a world are the addresses in it:
Attendees in an event's
(...), each with an optional reply.Senders and recipients in the mailbox, as
Name <address>.meis the mailbox owner, the person your agent acts as.People a calendar is shared with, each with a role.
Use example domains such as acme.test for made-up people.
Faults
A seed file can also make some of your agent's calendar calls fail on purpose, in a ## Faults section. See Inject faults.
Write a seed file from a world
twin world save writes any world as it stands, as a seed file. Use it to keep the state your agent left, or to start a new seed file from a world you set up by hand.
Common mistakes
Wed on the calendar, with the clock on a Wednesday
It means the coming Wednesday after the clock, never the same day
"Next week's Thursday" in an email body
In an email sent on a Saturday, it reads two ways. Write {Thu} or {Thu+1}: it becomes a date
Next
Connect your agent to the world.
Run your agent in it.
Google Calendar twin: what the calendar twin covers.
Last updated: 27 October 2026
Was this helpful?