# How it fits together

> The map of Manykind — the agents you build (in your Agent Service), the vault your customer owns, the connection between them, and how one run happens end to end.

Source: https://developers.manykind.ai/get-started/how-it-fits-together/

Manykind has two sides and one connection between them. Everything else in these docs
is a detail of one of the three.

```text
  DEVELOPER SIDE                          CUSTOMER SIDE
  Agent Service (your account)
  ┌────────────────────────────┐          ┌──────────────────────────────┐
  │ ┌────────────────────────┐ │          │ Vault                        │
  │ │ Agents                 │ │ connect  │                              │
  │ │  workflows             ├─┼─────────►│  scopes ── events, objects   │
  │ │  LLM agents            │ │ (signed, │  Memory Bank                 │
  │ │  code agents           │ │  scoped, │  connectors (Slack, email…)  │
  │ └────────────────────────┘ │ revocable│  members                     │
  │  cubbies  widgets          │          │                              │
  │  models   members          │          │                              │
  └────────────────────────────┘          └──────────────────────────────┘
               │                                     │
               └──────────── a run ◄─────────────────┘
          event lands in a scope → Job → steps / handlers
          → models, cubbies, Memory Bank, connector actions
          → results back into the vault
```

## The developer side: your agents

An **[agent](https://developers.manykind.ai/agents/overview/)** is what you build, what a customer connects,
and what runs on their data. It comes in three kinds, on the same level:
**workflows** (a typed graph of steps), **LLM agents** (instructions, a model,
tools, and connections), and **code agents** (TypeScript). A workflow can use an
LLM agent or a code agent as a step; LLM agents and code agents are peers.

Your agents live in your [Agent Service](https://developers.manykind.ai/get-started/agent-service/): your
account on Manykind, the way a cloud account is. You create it once in ROC, the
Manykind web console, and next to your agents it holds what they share:

- **[Cubby schemas](https://developers.manykind.ai/agents/building-blocks/cubbies/).** SQLite databases every agent of the
  service shares, one copy per vault.
- **[Widgets](https://developers.manykind.ai/agents/building-blocks/widgets/).** UI the service publishes.
- **[Models](https://developers.manykind.ai/agents/building-blocks/models/).** Aliases bound to models from the
  platform's catalogue, called by workflows and code agents alike.
- The [**members**](https://developers.manykind.ai/get-started/team/) who work in the service.

Every agent you publish is identified as `<agentServicePubkey>:<alias>`: the
service's public key, then the agent's name.

## The customer side: the vault

A [vault](https://developers.manykind.ai/vaults/overview/) belongs to a customer: one person, or an organization
with [members](https://developers.manykind.ai/vaults/members/). It holds:

- **Scopes.** Named partitions of the vault. Events and objects live in a scope,
  and every connection is granted per scope.
- **[Memory Bank](https://developers.manykind.ai/vaults/memory-bank/).** The vault's durable, privacy-classified
  record of what its agents and workflows learned.
- **[Connectors](https://developers.manykind.ai/vaults/connectors/).** Connections to outside systems (Slack,
  email, Telegram, MCP servers) whose credentials are sealed in the vault.

## The connection

An agent reaches a vault only after the vault owner
[connects](https://developers.manykind.ai/vaults/connections-and-consent/) it. Connecting signs an
**agreement** with the owner's wallet that names the agent service, the vault,
and the scopes. The vault checks the agreement and provisions what the agent
declares. A connected vault runs the agent's current deployment, so a new
version reaches it without reconnecting. Revoke the agreement and the access
ends.

## How a run happens

1. **Build.** You build a workflow in the ROC Workflow Builder, or write an
   agent or workflow in code with `@manykind-ai/agent-sdk`.
2. **Ship.** You publish it to your Agent Service and deploy a version. See
   [Push and deploy](https://developers.manykind.ai/agents/ship/push-and-deploy/).
3. **Connect.** The vault owner connects it to one or more scopes and signs the
   agreement. See [Connect to a vault](https://developers.manykind.ai/agents/ship/connect-to-a-vault/).
4. **Trigger.** An event lands in a connected scope: a person runs the workflow,
   your app publishes, a schedule fires, a webhook is called, a Slack message
   arrives through a connector, or another agent publishes.
5. **Run.** The platform finds or opens a **Job** for that agent and stream, and
   each event becomes a **Task** in it. A workflow walks its steps; a code agent
   runs the matching handler in a sandbox. See
   [Runs and events](https://developers.manykind.ai/agents/how-agents-run/).
6. **Work.** The run calls [models](https://developers.manykind.ai/agents/building-blocks/models/) by alias, reads and
   writes cubbies, files records into the Memory Bank, and takes connector
   actions, all under the connection's grant.
7. **Results.** Output lands back in the vault: events in the scope, cubby rows,
   Memory Bank records. People see it in ROC, in your widgets, or in your own
   app through the Vault SDK.

## Where each part of these docs fits

Everything belongs to one owner, and the docs follow the owners.

| Part | Covers | Side |
|---|---|---|
| **Get started** | This map, [your Agent Service](https://developers.manykind.ai/get-started/agent-service/) and its [team](https://developers.manykind.ai/get-started/team/), [installing](https://developers.manykind.ai/get-started/install/) the CLI and SDKs, and the [Quickstart](https://developers.manykind.ai/get-started/quickstart/). | Both |
| **[Agents](https://developers.manykind.ai/agents/overview/)** | How runs happen and everything your Agent Service runs: [workflows](https://developers.manykind.ai/agents/workflows/overview/) (with testing, evaluation, and monitoring), [LLM agents](https://developers.manykind.ai/agents/llm-agents/overview/), [code agents](https://developers.manykind.ai/agents/code-agents/overview/), the [building blocks](https://developers.manykind.ai/agents/building-blocks/models/) they use, and how to [ship](https://developers.manykind.ai/agents/ship/push-and-deploy/) them to a vault. | Developer |
| **[Vaults](https://developers.manykind.ai/vaults/overview/)** | What a customer owns: the vault, its connections, Memory Bank, connectors, and members, and how your own apps [build on a vault](https://developers.manykind.ai/vaults/build-on-a-vault/data-onboarding/) with the Vault SDK. | Customer |
| **[Reference](https://developers.manykind.ai/reference/cli/)** | Every CLI command, SDK export, limit, and error code, and the glossary. | Both |

## Where the tools fit

| Tool | What you do with it |
|---|---|
| **ROC** | Create an Agent Service; build and run workflows in the Workflow Builder; try agents against a vault in the Sandbox; browse Agents, Cubbies, Widgets, Connectors, Models, and the Memory Bank; manage Members; run Evaluations. |
| **Manykind CLI** (`mk`, from `@manykind-ai/cli`) | Scaffold, build, push, and deploy code agents and workflows; register A2A agents you run elsewhere; push service cubbies and widgets; run evaluations. See [CLI reference](https://developers.manykind.ai/reference/cli/). |
| **Agent SDK** (`@manykind-ai/agent-sdk`) | Write code agents (`@Engagement`, `@OnEvent`, `ctx`) and workflows in code (`defineWorkflow`). See [Agent SDK reference](https://developers.manykind.ai/reference/agent-sdk/). |
| **Vault SDK** (`@manykind-ai/vault-sdk`) | Talk to a vault from your own app or server: publish events, upload objects, connect agents, read cubbies and the Memory Bank. See [Vault SDK reference](https://developers.manykind.ai/reference/vault-sdk/). |
| **Widget runtime** (`@manykind-ai/widget-runtime`) | The browser half of a widget. See [Widget runtime reference](https://developers.manykind.ai/reference/widget-runtime/). |
| **Testing and eval** (`@manykind-ai/testing`, `@manykind-ai/eval`) | Test agents offline; build datasets and experiments for workflows. |

## Related

- [Next: Your Agent Service](https://developers.manykind.ai/get-started/agent-service/)
- [Sovereign data](https://developers.manykind.ai/vaults/sovereign-data/)
- [Agents and workflows](https://developers.manykind.ai/agents/overview/)
- [Connections and consent](https://developers.manykind.ai/vaults/connections-and-consent/)
- [Runs and events](https://developers.manykind.ai/agents/how-agents-run/)
