> For the complete documentation index, see [llms.txt](https://docs.drizz.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drizz.dev/twins/using-twins/several-twins.md).

# Several twins as one unit

Raise several twins as one environment from a blueprint, so they reset, renew and lapse together.

An environment raises several twins as one unit, from a blueprint. They reset, renew and lapse together.

|                   |                                                                                             |
| ----------------- | ------------------------------------------------------------------------------------------- |
| **Twins**         | the apps on **New twin**, as named instances such as `inbox` and `calendar`                 |
| **Where it runs** | **New twin** in the web console (pick two or more apps), or a blueprint's row on **Setups** |
| **You need**      | two or more apps, or a blueprint: one kept in **Setups**, or one you compose on the page    |
| **Watch out**     | tokens are shown only once, when they are made. Copy them before you leave the page         |

## Prerequisites

* A sign-in to the [web console](https://docs.drizz.dev/twins/using-twins/web-console.md).

## How it works

Some agents work across several apps at once: they read a mailbox, book on a calendar, and file a ticket. An **environment** raises several twins as one unit, from a **blueprint**. The members reset together, renew together and lapse together, so the whole set always stands in the same state.

```mermaid
flowchart LR
    BP["Blueprint<br/>instances · links · budget · principal"] -->|"raise"| ENV["Environment"]
    ENV --> I1["inbox<br/>(gmail)"]
    ENV --> I2["calendar<br/>(calendar)"]
    I1 -. "link" .- I2
    AG["Your agent"] -->|"one person's tokens"| ENV
```

## What a blueprint declares

| Part        | What it is                                                                                         |
| ----------- | -------------------------------------------------------------------------------------------------- |
| `instances` | the named twins the unit composes, such as `inbox` (a Gmail twin) and `calendar` (a calendar twin) |
| `links`     | a value in one twin must resolve against a row in another                                          |
| `budget`    | the total calls the unit may spend. Zero means unbounded                                           |
| `principal` | the identity a session acts as across the instances                                                |

**Links** are checked when the environment is raised. They are read again whenever you ask for them, so you always see how the unit stands now.

**A blueprint is copied** into the environment when you raise it. An environment that is already running stays the same, even if the blueprint it came from changes later in **Setups**.

## Steps

The quickest way: on **New twin**, pick two or more apps, for example Calendar and Gmail. They start together as one environment, with the same people in each, and show as one row on **Runs**.

To raise one from a blueprint, open the blueprint's row on **Setups**. It opens **Start several apps together**:

{% stepper %}
{% step %}

### Pick or compose a blueprint

Choose **From a kept blueprint** to use one from **Setups**. Or choose **Compose one here** and add the instances: each needs a name (lowercase, such as `inbox`) and a twin type. Instance names must differ.
{% endstep %}

{% step %}

### Set the budget and the people

Set a **call budget**, or leave it empty for none. Name the **people** to issue tokens to, such as `mira, priya`.
{% endstep %}

{% step %}

### Raise it

Select **Start**. For each instance, every person you named gets an MCP address and a token. Copy the tokens now: they are shown this once. Give each person's address and token to the agent that acts for them.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Tokens are shown only once, when they are made. Keep them somewhere safe before you leave the page.
{% endhint %}

## Work with a running environment

A running environment shows as one row on **Runs**. Open the row to see:

* when it was made, and when its first member lapses;
* whether its links all resolve;
* the calls its members have recorded;
* its people. Add a person (which issues them tokens in every member), or end a person's access to every member at once.

You can act on the environment as one unit:

| Action               | What it does                               |
| -------------------- | ------------------------------------------ |
| **Reset**            | starts every member over, as it was seeded |
| **Renew for 7 days** | gives every member more time               |
| **Remove**           | deletes the environment and its members    |

## Reading what happened

Every world records every call. For an environment, that is every call made in any of its members. In the web console, open the environment's row on **Runs** to see its calls.

From the `twin` CLI, `twin world calls <folder>` reads a world's record. `--follow` watches it live, and `--follow --json` prints one JSON object per line. See [See what your agent did](https://docs.drizz.dev/twins/using-twins/see-what-your-agent-did.md#watch-calls-live).

For your own tools, the twins server API serves the record of calls three ways:

| Way                                 | Good for                     |
| ----------------------------------- | ---------------------------- |
| A page at a time, with a cursor     | reading a finished run       |
| One JSON object per line            | piping into your own tools   |
| A live stream of server-sent events | watching a run as it happens |

The live stream holds one connection open and sends each call as it lands. Each event's id is the call's sequence number. If the connection drops, a client sends the last id it saw as `Last-Event-ID`, and the stream resumes at the next call. A sequence number is never reused, so a reader resumes correctly even after the oldest calls have been discarded. When nothing happens for 20 seconds, the stream sends a comment to keep the connection open.

## Who can see what

Every read is narrowed to what your key may reach. A world in another organization does not appear. An environment you may not see is answered as if it does not exist.

## Next

* [Web console](https://docs.drizz.dev/twins/using-twins/web-console.md): New twin and Setups.
* [See what your agent did](https://docs.drizz.dev/twins/using-twins/see-what-your-agent-did.md): read the calls in one world.
* [Glossary](https://docs.drizz.dev/twins/reference/glossary.md): environment, blueprint, instance.

***

*Last updated: 24 November 2026*
