# Momoto guides Every guide of the Momoto docs as plain Markdown. The same guides, with their videos, are at https://momoto.io/docs/. Momoto is in private beta: request access at https://momoto.io/#beta. ## Getting started Your first hour: install, your account, your first conversation and where everything lives. ### Connect your AI https://momoto.io/docs/#/p/start/connect-your-ai Your agents think with an AI you connect here: Anthropic, Z.ai, OpenRouter, or a compatible endpoint your admin set up, using an API key from that provider. Momoto checks the key with the provider before it saves it, so a wrong key never reaches your agents. #### Before you start - Get an API key from the provider. For Anthropic, use a Console API key, which starts with `sk-ant-`. - A Claude subscription token is refused. Anthropic's terms do not allow using it outside its own apps, and Momoto says so and asks for a Console API key instead. - The key is stored in OneCLI, not in Momoto's database. #### What each option means - **Anthropic**: Recommended. Use a Console API key. - **Z.ai**: GLM models. Use a z.ai API key. - **OpenRouter**: OpenAI, Gemini and more. Marked experimental. - **Compatible endpoint**: LiteLLM, DeepSeek, Kimi or a company gateway: any service that speaks Anthropic's API. It shows up only after your admin sets its address and models in «Your account» › «AI». Use the key that service gives you. Paste the key and Momoto checks it at once, without another click. If the provider rejects it, you see why and the key is not saved. If the account behind the key has no balance, the key is refused and not saved. The one exception is OpenRouter: a key on the free tier, or one that reached its own spending limit, still connects, with a notice. For OpenRouter it also shows the key's balance: read it before you continue. If the AI is already connected, the screen says so and you just continue. Where the screen offers **Connect later**, you can skip this step and connect the AI afterwards. #### Confirm it is you Connecting an AI is a sensitive action. Momoto asks you to confirm it is you first: with the 6-digit code from your authenticator app, or with your password if your account has no second factor yet. Then the connection goes through. #### How it works (technical) The screen is `packages/momoto-web/src/components/onboarding/ConnectAi.tsx`. It is the same component for the installation's AI (`/llm/connections`) and for your own AI (`/llm/mine`, with `mine` set). ``` POST /api/v1/llm/connections { "provider": "anthropic", "credential": "sk-ant-…" } # 201 → the connection, with the models the provider lists # 409 already_connected → the installation already has an AI. Replacing it is a PUT, outside the wizard ``` - `_clean_key` in `momoto_api/routers/llm_auth.py` checks the prefix: an Anthropic key must start with `sk-ant-`. The OAuth and session tokens (`sk-ant-oat`, `sk-ant-ort`, `sk-ant-sid`) and the Console admin keys (`sk-ant-admin`) are refused with their own message. - `_validate_live` makes one request to the provider's catalog before anything is written. A 401 or 403 gives `invalid_key`, a 402 or an exhausted balance gives `no_credit`, and an unreachable provider gives `provider_unreachable` (502). A bad key never reaches OneCLI. - The installation's connection is for the whole installation: its agents in every organization use it. It needs the platform admin role and the `MODELS:UPDATE` permission. - `POST /llm/mine` saves your own AI for your agents. It needs a recent step-up. The new key is created before the old one is deleted, so a failure keeps the agents on the key they had. - A compatible endpoint has no standard model list, so `_validate_compatible` sends one message of one token to its first model instead. A refusal there gives `endpoint_refused`, with the endpoint's own words. The option is listed only while `GET /llm/connections` returns a `compatible` row, which happens once `PUT /llm/endpoint` has set it. - Each connection writes an audit event, with the result code and never the key. The provider's model list is saved in the key-value store for the pickers (`GET /llm/models`) (the Anthropic and Z.ai lists refresh once a day). #### Videos of the real product - **Connect your AI** (0:23): https://momoto.io/docs/proof/act-01/1.04-connect-ai/clip.mp4 1. Agents use each person's own AI. Marisol picks her provider 2. A wrong key: Momoto checks it with the provider and refuses it 3. A Claude subscription token is refused too: it says why and what to paste 4. With the right key she lands on her first agent ### Create your organization https://momoto.io/docs/#/p/start/create-organization An organization groups your people, projects and agents. You create the first one when you set up Momoto: an email, a password, the organization's name and the first project. #### Before you start - You need the setup link. It carries a one-time setup code, which is in the `momoto-api` log. If nobody can read the log, the admin of the machine can run `momoto admin setup-token` to get a new one. - Setup works only on an installation that has not been set up yet. Otherwise the page sends you to sign in. - On a hosted installation, which is for teams, you can only create an organization account. A personal account is refused there. #### What you fill in - **How you will use Momoto**: «Use it by myself» (a personal account), «Create an organization», or «Join with a QR» if someone invited you. Choose one: nothing is marked by default. - **Email**: Required. It is how you sign in. - **Password**: Required. At least 8 characters, with an uppercase letter, a lowercase letter, a number and a symbol. Each rule ticks as you meet it. - **Your name**: Optional. Without it, the account shows the part of your email before the @. - **Organization name**: Required for an organization. Example: «Quetzal Roasters». - **Account name**: Optional. It groups your organizations. If you leave it empty, the organization's name is used. - **First project**: Required. Your organization starts with this project. A personal account asks for nothing else. Behind the scenes Momoto creates one organization and one project, and you do not see them. You can change from personal to organization later. The reverse is not possible. #### After you create it Momoto signs you in. If you are the first admin, it then asks you to protect the account with a second factor, and to connect your AI. See [Protect the account with a second factor](https://momoto.io/docs/#/p/start/second-factor) and [Connect your AI](https://momoto.io/docs/#/p/start/connect-your-ai). #### How it works (technical) The screen is `packages/momoto-web/src/views/Setup.tsx`. It sends one request to `POST /api/v1/setup`, then signs in with the same password. ``` POST /api/v1/setup { "token": "…setup code…", "email": "ana@acme.com", "password": "…", "account_type": "organizational", "company_name": "acme", "project_name": "…", "organization_name": null, "name": "Ana" } # 201 → the first admin is created. 410 setup_done → the installation is already set up # 503 setup_not_ready → migrations or services are missing # 409 setup_personal_not_allowed → a hosted installation refuses a personal account ``` - `momoto_api/routers/setup.py::setup` checks that the installation needs setup, then hands the request to the bootstrap use case. A bad token gives the same error whatever the reason. - The password is checked by `momoto_core.services.password_policy:validate_password`. The default policy (`PasswordPolicy` in `momoto_core/domain/credentials.py`) is 8 characters, with uppercase, lowercase, a digit and a symbol. It returns every violation at once. - `company_name` and `project_name` are required for an organizational account. The organization name in the form becomes `company_name`. #### Videos of the real product - **Create your organization** (0:23): https://momoto.io/docs/proof/act-01/1.02-create-organization/clip.mp4 1. Momoto asks how you will use it: by yourself, with an organization, or joining with a QR 2. Marisol chooses «Create an organization» 3. She types her email and a password; each rule ticks as she meets it 4. The name of her organization: «Quetzal Roasters» 5. She creates the account. Next comes protecting it ### Your first conversation with an agent https://momoto.io/docs/#/p/start/first-conversation Momoto creates your first agent for you, so there is nothing to set up. You open its conversation and write to it the way you would write to a person. #### Before you start - Connect your AI first. The agent runs on its owner's AI, so Momoto creates the agent once the AI is connected. See [Connect your AI](https://momoto.io/docs/#/p/start/connect-your-ai). - Momoto writes a greeting in the message box but does not send it. Press Enter to send it, or change it first. #### Writing to it - Enter sends the message. Shift+Enter starts a new line. - The first screen offers three ideas as buttons, chosen for your role. You can click one to fill the box, then change it. - Your agent's name has your name and four characters from your ID, such as «Assistant for Ana · 3f9a», so two people with the same first name do not get the same agent. - A message can be up to 1,000,000 characters long. #### How it works (technical) The hook is `packages/momoto-web/src/components/onboarding/useFirstAgent.ts`. It runs when the wizard closes or an invitation is accepted. It reuses your agent if you already have one. Otherwise it creates one with `POST /api/v1/agents/`, opens a workspace for it with `POST /api/v1/chat/agents/{agent_id}/workspace`, and sends you to the chat with the greeting in the box. When you send, the message goes to `POST /api/v1/chat/threads/{thread_id}/messages`, which answers `202`. The replies arrive on the thread's event stream, `GET /api/v1/chat/threads/{thread_id}/events`. If the agent cannot be created, the screen says so and offers a retry. A 409 from the create call is taken as a retry of the same agent, because the name is unique in each organization. #### Videos of the real product - **Your first conversation with an agent** (0:29): https://momoto.io/docs/proof/act-01/1.05-first-conversation/clip.mp4 1. Momoto already made her an agent. Marisol opens its conversation 2. She writes to it as she would to a person 3. The agent answers with what it can do for her organization ### Protect the account with a second factor https://momoto.io/docs/#/p/start/second-factor A second factor is a 6-digit code from an authenticator app on your phone, asked for in addition to your password. Turn it on right after you create the account, or later in *Your account → Security*. #### Before you start - You need an authenticator app, such as Google Authenticator, 1Password or Authy. - You need your current password. Momoto asks for it before it shows the QR code. - Who has to turn it on: an admin of the installation must. An admin of one organization is strongly advised to. Everyone else may decide, unless an admin requires it for that person. #### The steps - Momoto shows a QR code. Scan it with your authenticator app, or type the key shown under «Can't scan? Type the key». The code is shown **only once**. - Type the 6 digits the app shows and confirm. Until you confirm, the factor you had before (if any) is still the one that works. - Momoto gives you 10 recovery codes, also shown **only once**. Each one works once, if you lose your phone. Copy them, download the `.txt` file, and keep it somewhere safe, such as a password manager. Then press «I've saved them». #### Later - To make new recovery codes, go to *Your account → Security*. The new set replaces the old one, and the old codes stop working. - If your role requires the second factor, Momoto does not let you turn it off. - After too many wrong codes in a row, Momoto asks you to wait a few minutes. #### How it works (technical) The screens are `packages/momoto-web/src/components/onboarding/MfaEnroll.tsx` and `RecoveryCodes.tsx`. The routes are in `momoto_api/routers/auth.py` and `auth_mfa.py`. - **`POST /api/v1/auth/mfa/enroll`**: Creates the factor and returns the secret once. The first enrollment needs `current_password`. Enrolling again needs a recent step-up and the password. - **`POST /api/v1/auth/mfa/confirm`**: Checks the first code. Only then is the factor marked verified, and the previous one is replaced in the same step. - **`POST /api/v1/auth/mfa/verify`**: Asks for the code at sign-in. It takes either `code` or `recovery_code`, never both. - **`POST /api/v1/auth/mfa/step-up`**: Re-confirms the factor for a sensitive action. A 403 `mfa_not_enrolled` means the account has no factor yet. - **`POST /api/v1/auth/step-up/password`**: For an account without a factor, the password does the step-up. - **`POST /api/v1/auth/mfa/recovery-codes`**: Creates 10 new codes and stores only their argon2 hashes (`momoto_api/recovery.py::new_set`). - **`POST /api/v1/auth/mfa/disable`**: Turns the factor off and deletes the recovery codes. Refused with `mfa_required_by_role` when the role requires it. - Who must have a factor is decided by `_requires_mfa` in `routers/auth.py`: the platform owner, or a person an admin made mandatory. - A sensitive action asks for a step-up again when the last one is older than `MOMOTO_STEP_UP_MAX_AGE_MIN` minutes. The default is 15. #### Videos of the real product - **Protect the account with a second factor** (0:21): https://momoto.io/docs/proof/act-01/1.03-second-factor/clip.mp4 1. The code is shown only once: to see it, Momoto asks for her password 2. Marisol scans the code with the authenticator app on her phone 3. She types the 6 digits the app shows 4. Momoto gives her the recovery codes, once. She downloads them 5. She confirms she has kept them ### A walk through Momoto: the menu, the language and the theme https://momoto.io/docs/#/p/start/tour The left bar holds the places you use every day. This page walks through them, then shows how to change the language and the theme. #### Where things are - **Dashboard**: What is running now, and in which organization. See [Overview](https://momoto.io/docs/#/p/dashboard/overview). - **Sessions**: One conversation per agent. Each one picks up where you left it. - **Agents**: The agents you can ask for work. - **Memory**: What the organization knows, and what its agents consult. - **More → Tools**: Swarms (jobs shared among several agents), Sandbox (throwaway databases and your agents' Docker), Network (the organization's private network), Store (the apps your organization's agents make). - **More → Administration**: Audit log (who did what, and when), People (who comes in and with which role), Roles (what each person may do), Sensitivity (how delicate each organization's information is), System (how the platform is right now), Integrations (Slack, an ERP, or any API for your agents). You only see what your role allows. The Network stays empty until someone creates it. #### Language and theme Open the account menu at the top right. Under **Appearance** are two buttons: the language (it names the other language, «English» or «Español») and the day or night mode. - The language is kept in the browser you use. Another browser or device keeps its own choice. The page reloads when you switch. - The theme is saved to your account, so it follows you to other devices. #### How it works (technical) The menu is built in `packages/momoto-web/src/components/SideNav.tsx` (the groups `MAIN` and `SECONDARY`), and the page titles in `TopNav.tsx`. In the new interface the four main places are under `/v2`: the Dashboard is `/v2/overview`. - The theme button calls `PATCH /api/v1/me/preferences` with `theme` set to `light` or `dark`. - The language button calls `changeLanguage` in `i18n.ts`, which stores the choice in `localStorage` and reloads the page. Nothing is sent to the server. #### Videos of the real product - **A walk through Momoto: the menu, the language and the theme** (0:51): https://momoto.io/docs/proof/act-01/1.06-tour/clip.mp4 1. The Dashboard: what is running now and in which organization 2. Sessions: one conversation per agent, which continues where she left it 3. Agents: who she can ask for work 4. Memory: what the organization knows and its agents consult 5. Under «More» are the tools. Swarms: jobs shared out among several agents 6. Sandbox: throwaway databases and her agents' Docker 7. Network: the organization's private network, not created yet 8. Store: the apps the organization's agents make 9. Administration. The audit log: who did what, and when 10. People: who comes in and with which role 11. Roles: what each person may do 12. Sensitivity: how delicate each organization's information is 13. System: how the platform is right now 14. Integrations: Slack, her ERP or any API for her agents 15. In her account menu she changes the language to Spanish: the whole interface changes 16. She reloads the page and the language stays 17. She goes back to English 18. Night mode, in one click 19. And back to day mode ### Using Momoto on your own https://momoto.io/docs/#/p/setup/on-your-own You can use Momoto on your own. A personal account has no organizations, projects or people to manage: it is you and your agents, thinking with your own AI. You can join an organization later without losing anything. #### Before you start - On the first screen, choose «Use it by myself». You then give an email and a password. - Then connect your own AI. See [Connect your AI](https://momoto.io/docs/#/p/start/connect-your-ai). - The first agent already exists. Open it in *Agents* to give it the name you want. #### Choosing the model In the agent's **Customize** screen, under **Model chain**, you pick the **Model** it thinks with and a **Fallback**. The fallback is used when the provider says the model is overloaded. The choices are Haiku 5.5, Sonnet 5.5 and Opus 5.5, or no fallback. A change applies when the agent's container starts again. A container that is already running keeps the model it started with. #### If you install Momoto this way (for admins) Whoever installs Momoto with a personal account also manages the installation. Other people on it can see that your account exists, but not your agents, conversations or memory. #### How it works (technical) The choice is made on the setup screen, `packages/momoto-web/src/components/account/ChooseAccountType.tsx`, with its texts in `accountStrings.ts`. It sends `account_type: "personal"` to `POST /api/v1/setup`, which skips the organization fields. On a hosted installation this is refused with `setup_personal_not_allowed`. - Your own AI is saved with `POST /api/v1/llm/mine`, which needs a step-up. - The model and the fallback are saved with `PATCH /api/v1/agents/{agent_id}/model-chain`. The API checks the model's provider against the agent's, so a model from another provider is saved but not applied. #### Videos of the real product - **Using Momoto on your own** (2:11): https://momoto.io/docs/proof/act-03/3.14b-renata-alone/clip.mp4 1. Of the three ways on the first screen she picks «Use it by myself»: her email and a password 2. She leaves the second factor for later and connects her own AI 3. Her first agent already exists. In Agents she gives it the name she wants 4. In «Customize» she chooses which model it thinks with: Haiku, the cheapest, with Sonnet as fallback 5. And she works with it ### The agent asks before going on https://momoto.io/docs/#/p/chat/agent-questions Sometimes an agent stops to ask you something before it goes on: a choice, a tone, a missing detail. It shows the question as a card with options, and it waits for your answer. #### What you see - A card titled «The agent asks you», or the title the agent gave it, with one button for each option. - Press an option. The card then says «Response sent ✓», and the agent goes on in the same conversation. - The question also appears in the inbox on the bell, marked «Question». See [The two inboxes](https://momoto.io/docs/#/p/inbox/approvals-and-notices). #### Things to know - A question does not expire. It stays until you answer it, or until its session ends or is deleted, or its agent is archived. - Long text is cut short with «…». An option that cannot be sent back exactly as the agent wrote it is not shown. - Answering needs access to the agent, because it makes the agent work. #### How it works (technical) While the agent is running, its container writes the question into its session. The API reads it from the session's signal snapshot. - `GET /api/v1/inbox` returns the live questions of your sessions, oldest first, at most 200. Each carries its `question_id` and its options. Text is capped at 4,000 characters for the question and 200 for each option, with at most 20 options. - `POST /api/v1/sessions/{session_id}/answer` takes `question_id` and `value`, and answers `202`. The answer is written to the container, which picks it up. #### Videos of the real product - **The agent asks before going on** (0:35): https://momoto.io/docs/proof/act-02/2.05-question/clip.mp4 1. She opens the conversation with her coordinator 2. She asks for a text, and to be asked the tone first 3. A card appears with the options. She picks «Friendly» 4. The text arrives in the tone she chose, in the same conversation ### A whole conversation with an agent https://momoto.io/docs/#/p/chat/conversation A conversation is your chat with one agent. It keeps the history, the agent's plan and its files. You can come back to it later, and you can pick a different model for a single message. #### Writing and following along - Enter sends. Shift+Enter starts a new line. Type `/` to open the menu of actions and commands. - While the agent works, the **Now** line says what it is doing. The plan opens from the step count, with the current step marked. - **Stop** interrupts what the agent is doing now. The conversation stays open and you can keep typing. The turn in progress is discarded, and your next message continues the conversation with a fresh container. - **Context** shows what the agent works with: its budget, its capabilities, its folders, the evidence it gathered, the files it touched and its artifacts. #### One message with another model Next to **Attach file** is the selector **Model for this message**. The agent keeps its own model. Set the selector back to **Default** to use the agent's model again. - The selector shows only to the agent's owner, and to people who may update agents. - Your choice stays for the messages after it, while the conversation is open, until you set it back to **Default**. #### More actions The **More actions** menu has **Start a new conversation**, **Give a task**, **Customize**, **Artifacts**, **Favorite** and **Restart container**. Restart stops the agent's container and starts it again. The conversation continues where it was, and the agent's startup hooks run again. #### How it works (technical) The screen is `packages/momoto-web/src/v2/chat/ThreadV2.tsx`. Its parts are `ComposeV2.tsx` (the message box), `NowStrip.tsx` (the status line and the plan), `ContextV2.tsx` (the Context panel) and `ThreadHeader.tsx` (the menu). - **`POST /api/v1/chat/threads`**: Starts a conversation with an agent. - **`POST /api/v1/chat/threads/{thread_id}/messages`**: Sends a message. Body: `message` (up to 1,000,000 characters), `agent_id`, `files` (each with `name` and `upload_id`) and `model`. An empty `model` means the agent's model. Answers `202`. - **`GET /api/v1/chat/threads/{thread_id}/events`**: The live stream of the turn. - **`GET /api/v1/chat/threads/{thread_id}/context`**: The budget, capabilities and files of the Context panel. - **`POST /api/v1/sessions/{session_id}/stop`**: Interrupts the turn in flight. Idempotent. The session stays live. - **`POST /api/v1/sessions/{session_id}/restart`**: Restarts the container, keeping the thread. The API leaves a signal that the host daemon acts on. - The model selector sends `model` for that turn only. Its options come from `GET /api/v1/llm/models`. - Stop works even if the caller no longer has access to the agent, so a running turn can always be cut. #### Videos of the real product - **A whole conversation with an agent** (1:39): https://momoto.io/docs/proof/act-02/2.02-conversation/clip.mp4 1. In Sessions she opens the conversation with her coordinator 2. A slash opens the menu of actions and commands 3. She asks for a job of several steps. While it works, the «Now» strip says what it is doing 4. The agent's plan opens right there, with the current step marked 5. It finishes, and every step it took stays in the conversation 6. «Context» shows what it works with: its budget, its capabilities and the files it touched 7. She asks for something long and stops it halfway with «Stop» 8. For a single message she picks another model, Sonnet. The agent stays on Haiku 9. The selector stays on Sonnet for the messages that follow: she sets it back to «Default» 10. And from «More actions» she restarts its container: the conversation continues where it was ### Download the files an agent makes https://momoto.io/docs/#/p/chat/download-a-file When an agent makes a file, such as a spreadsheet or a PDF, it arrives in the conversation as a download. You save it to your computer with one click. #### How it works - The file is listed under the agent's message, with a **Download** button and its name. - Only the owner of the conversation can download its files. - The files stay in the conversation until you [delete its session](https://momoto.io/docs/#/p/sessions/find-and-delete). Deleting a session erases its files, and they can no longer be downloaded. #### How it works (technical) The button calls `GET /api/v1/chat/threads/{thread_id}/artifacts/{message_id}/{filename}`, which is served by `download_artifact` in `momoto_api/routers/chat.py`. It checks that you own the thread, then reads the file from the copy the runtime keeps in the session. The read refuses path traversal and does not follow links, because the agent writes that folder. The file is the one the agent produced with its `send_file` tool. The bytes never travel through the event log. #### Videos of the real product - **Download the files an agent makes** (0:25): https://momoto.io/docs/proof/act-02/2.04-download/clip.mp4 1. She opens the conversation with her coordinator 2. She asks for a spreadsheet and a one-page PDF with the data of clientes.csv 3. The files arrive on the agent's messages. She downloads each with one click 4. She opens them on her computer: the sheet with a row per city and the one-page summary ### Upload a file to the conversation https://momoto.io/docs/#/p/chat/upload-a-file You can send a file to an agent with your message, so that it reads it. The file is uploaded first, and it goes with the message. #### How to attach - Press **Attach file** and pick the file in the window of your operating system. - The file appears as a chip with its name, marked «uploading…» until it is ready. A chip that shows an error did not go through: remove it with × and try again. - Remove a file with × before you send, if you picked the wrong one. #### Limits - Each file can be up to 20 MB. - The files of one message together stay within 20 MB. A file that does not fit is refused, and the screen says so. #### How it works (technical) `POST /api/v1/chat/threads/{thread_id}/uploads` takes the file as `multipart/form-data` in the field `file`. It answers `201` with `upload_id`, `name` and `size`, and is served by `upload_attachment` in `momoto_api/routers/chat.py`. - The file is written to `uploads//` in the session's folder, in chunks. Above 20 MB the upload fails with 413. - When you send the message, `POST /api/v1/chat/threads/{thread_id}/messages` takes `files` with each `name` and `upload_id`. The files are moved to the message's inbox folder, and the agent reads them from there. #### Videos of the real product - **Upload a file to the conversation** (0:39): https://momoto.io/docs/proof/act-02/2.03-upload/clip.mp4 1. She opens the conversation with her coordinator 2. With «Attach file» she picks «customers.csv», the list of 200 client cafés 3. She asks about the numbers in the file 4. It answers with the totals and names the file they came from ### Finding things: searching an agent, the list of sessions, and deleting one https://momoto.io/docs/#/p/sessions/find-and-delete Sessions add up: one conversation per agent, and one for each task. This page shows how to find one quickly, and how to delete one you no longer need. #### Finding things - From any screen, press **Ctrl+K** to open «Search agent…». Type a few letters and press Enter to open that agent's conversation. - In **Agents**, the search filters by name. The list can also be grouped by project or by organization. - In **Sessions**, the conversations are grouped by agent, by project or by organization, and there is a search too. - An agent's page holds all its sessions, its conversation and one for each of its tasks, with when each last moved. Open it with **See all**, or with the arrow under its project. #### Deleting a session - Hover over a session in the list. Its actions appear. - Press **Delete session**, then **Confirm deletion** within 3 seconds. If you wait longer, the request is cancelled. Deleting a session removes it from your lists, stops its container if it is running, and erases its files from the computer's disk. The audit log keeps the record of what happened. The conversation with an agent cannot be deleted; only sessions of tasks can. Momoto answers with «The Conversation with this agent can't be deleted; tasks can.» #### How it works (technical) The lists come from `GET /api/v1/sessions/`, `GET /api/v1/sessions/by-agent` and `GET /api/v1/sessions/page`. The hover actions are in `packages/momoto-web/src/v2/rail/useHoverRail.tsx`. - `DELETE /api/v1/sessions/{session_id}` checks that you own the session. The check does not require current membership in the organization, so you can still delete your own sessions after you leave it. - The use case stops the container. The runtime then erases the session's folders, and a tombstone in the key-value store hides the session from the lists. - An agent's conversation is refused with `409`. Audit events are kept. #### Videos of the real product - **Finding things: searching an agent, the list of sessions, and deleting one** (1:05): https://momoto.io/docs/proof/act-02/2.26-finding-things/clip.mp4 1. From any screen, Ctrl+K opens «Search agent». She types a few letters and Enter takes her to its conversation 2. In «Agents» the directory's search filters by name; it can also be seen by project and by organization 3. In «Sessions» the conversations are grouped by agent, by project or by organization, and have a search too 4. An agent's page («See all», or its «→» under Projects) holds every session: its conversation and those of each task, with when they last moved 5. Hovering a session shows its actions. She deletes it: Momoto asks her to confirm ### The two inboxes on the bell: notices and approvals https://momoto.io/docs/#/p/inbox/approvals-and-notices The bell at the top of the screen holds two inboxes. **Notifications** tell you what already happened. **Approvals** ask for a yes or a no before an agent does something sensitive, and they expire if nobody answers. #### Notifications - They list what you approved or rejected, what stopped, and the security changes made to your account. - Press a notification to go to where it happened. - Press × to remove it. The removal is remembered only in this browser: the notification stays on the server, and another browser still shows it. #### Approvals - When an agent needs your permission, **Approvals** appears in the top bar, with a count. The dashboard shows the same count. - Each approval says what is asked, who asks, and until when it waits. Press **Approve** or **Reject**. - An approval waits 15 minutes by default. If nobody answers, it lapses: it leaves the inbox, what asked for it does not happen, and it has to be asked again. - You only see the approvals you can decide. Starting an agent you have left a task for can ask for an approval too. The task does not run until you approve it. #### How it works (technical) The bell is `packages/momoto-web/src/v2/inboxes/Inboxes.tsx`, with `PopApprovals.tsx` and `PopNotices.tsx`. The inbox is refreshed about every 30 seconds. - **`GET /api/v1/inbox`**: Returns `{approvals, questions}`: the approvals you can resolve, and the live questions of your sessions. - **`GET /api/v1/inbox/notices`**: Your notifications. - **`PUT /api/v1/inbox/notices/seen`**: Marks notifications as seen up to a point in time. - **`POST /api/v1/approvals/{approval_id}/approve`**: Approves. A bridge approval is refused here with `use_bridge_route`, because it is approved on its own route. - **`POST /api/v1/approvals/{approval_id}/reject`**: Rejects. - The lifetime is set by `RequestApproval` in `momoto_core/usecases/request_approval.py`: an approval's own expiry if it has one, or else `ttl_s`, which defaults to 900 seconds. - For someone who is not an admin, the approvals list shows only the requests for their own apps. - Notices removed with × are stored in `localStorage` under `momoto:notices-removed`. #### Videos of the real product - **The two inboxes on the bell: notices and approvals** (2:01): https://momoto.io/docs/proof/act-02/2.27-inboxes/clip.mp4 1. «Notifications»: what already happened. What she approved or rejected, what stopped, and the security changes of her account 2. Opening a notice takes her to where it happened 3. And she removes the one she no longer needs 4. Her agent asks for something that needs her permission: a Docker of its own. «Approvals» appears in the bar 5. She opens it: what is asked, by whom and until when it waits. This time she rejects it 6. Now something of her own: she leaves the agent a task and runs it. Starting this agent asks for an approval too 7. She sees the request and when it lapses, but does not answer it 8. Fifteen minutes later it lapsed: it is no longer in her inbox, the task did not run, and a notice tells her ### Overview https://momoto.io/docs/#/p/dashboard/overview The dashboard is the first screen you see. It shows how many sessions are open, how many agents and organizations you have, and what the last day cost. #### What is on it - At the top: the sessions in progress, the agents, and the number of organizations. The card on the right says whether something of yours is working right now. - One card for each organization, with its agents, its sessions and its people. Open one to go to its conversations. - When something waits for your approval, the dashboard shows «N waiting for your approval» with a **Review them** link. The top bar shows it on every screen. - **View the detail** opens the activity for the span you pick: 24 hours, 7 days or 30 days. It shows the sessions that are active, at rest and closed, the tokens used, and the estimated spend. #### About the numbers - **In progress** means the session is open. It does not mean it is working at this moment. - Tokens and spend count what is written and answered in the span. They do not count what the model re-reads from the conversation. - The spend is an estimate, made from each model's public price. #### How it works (technical) The screen is `packages/momoto-web/src/views/Overview.tsx`. It reads these routes: - `GET /api/v1/entities/`: the organizations. - `GET /api/v1/entities/{entity_id}/stats?window=24h|7d|30d`: one call per organization. The window applies to the closed sessions, and the stats are computed in the adapter. - `GET /api/v1/agents/`, `GET /api/v1/approvals`, `GET /api/v1/system/health` and `GET /api/v1/system/status`. The span also lists the spend by agent and by person. On your own installation it lists your own agents' spend. #### Videos of the real product - **The dashboard: sessions, agents, organizations and spend** (1:01): https://momoto.io/docs/proof/act-02/2.30-dashboard/clip.mp4 1. The first thing she sees: how many sessions are in progress, how many agents and in how many organizations. The card on the right says whether something of hers is working right now 2. Each organization with its agents, its sessions and its people. Opening one takes her to its conversations 3. Back on the dashboard, «View the detail» opens the activity of the last 24 hours: sessions active, at rest and closed, the tokens used and the estimated spend 4. At the foot of the bar, the same in one line and, under «Technical details», the versions and what the computer is using 5. She writes to her agent and comes back: the tokens and the spend already count that answer - **What it all cost · at the hub** (0:44): https://momoto.io/docs/proof/act-10/10.03a-what-it-cost-the-hub/clip.mp4 1. In «Dashboard › View the detail»: the tokens consumed and the estimated spend of the last 24 hours 2. She sets the span to the last 30 days: the spend by agent and by person 3. In «Audit log › Summary»: the total cost of the charged turns and how many events of each kind 4. She opens the charged turns: each one says which agent spent it - **What it all cost · on Iván's own Momoto** (0:15): https://momoto.io/docs/proof/act-10/10.03b-what-it-cost-ivan/clip.mp4 1. In «Dashboard › View the detail» of their own Momoto: the tokens and estimated spend of their agents - **What it all cost · on Lucía's own Momoto** (0:15): https://momoto.io/docs/proof/act-10/10.03c-what-it-cost-lucia/clip.mp4 1. In «Dashboard › View the detail» of their own Momoto: the tokens and estimated spend of their agents - **What it all cost · on Diego's own Momoto** (0:15): https://momoto.io/docs/proof/act-10/10.03d-what-it-cost-diego/clip.mp4 1. In «Dashboard › View the detail» of their own Momoto: the tokens and estimated spend of their agents ### Your activity and exporting your data https://momoto.io/docs/#/p/account/activity-my-data Activity lists what has happened on your account, and My data lets you download a copy of what Momoto keeps about you. Both only show you your own information, and neither changes anything. #### Activity Open **Your account** › **Activity**. The list is headed «Activity on your account», newest first, 50 entries at a time; press **See more** for older ones. Each line shows what happened, the time in your time zone, and the IP address when Momoto recorded one. You will see: - Sign-ins, failed sign-in attempts, and sign-outs. - Changes to your password, your second factor, your recovery codes, your email and your sessions. - Your export and deactivation requests. - Changes an administrator made to your account, such as an edited profile, a reset second factor, or a role given or removed. Routine steps that worked are hidden, for example the code you type at each sign-in. Failed ones are shown, so you can see when someone typed your password correctly but failed the second factor. If you see something you did not do, change your password and tell your administrator. #### My data: download a copy In **Your account** › **My data**, press **Export my data**. Momoto asks you to confirm it is you, then builds a ZIP file and downloads it, called `momoto-my-data.zip`. When the download finishes, the status line says «Done: your file was downloaded.» - **What is in it**: Your profile and preferences; your sessions and linked Google accounts; your activity; your conversations with agents; your quick queries, pinned threads and favorite agents; your notifications from the last 30 days; the notes of your personal vault, one file per note; and a manifest. - **What is never in it**: Passwords, password hashes, the secret of your second factor, recovery codes, tokens and keys. Other people appear only as «someone in your organization», without name or email. - **Limits**: Up to 5 exports in 24 hours. Only one export can run at a time: if one is still running, wait for it to finish. #### How it works (technical) **Activity** reads `GET /api/v1/me/activity` through `ListMyActivity` (`momoto_core/usecases/list_my_activity.py`). It reads the `_auth` events whose user is you, newest first, 50 per page. `before` is the cursor `:` that the previous page returns; a malformed cursor is a 422 `invalid_cursor`. The server filters the events itself: `auth.mfa_challenge` is never shown, and `auth.mfa_verify` and `auth.mfa_step_up` are hidden only when they succeed. Each entry carries only `ip`, `reason`, `method`, `provider` and `action` from its payload. Labels are mapped in `components/account/Activity.tsx`; an event without a label shows as «Other activity on your account». If the account was handed to another person, the list starts at that moment: earlier entries belonged to whoever held the account (`account_since`). **Export** is `POST /api/v1/me/export`, which asks for level 1 re-authentication (see [Security](https://momoto.io/docs/#/p/account/security)). `momoto_api.export.build_zip` builds the file, named fields only, so unexpected payload data does not leave. The response is a streamed `application/zip` with `Cache-Control: no-store`. The event `user.data_exported` records the account but not the content. Limits: 5 exports per 24 hours (`export-day`), and a 5-minute lock per person while one is running (`export-active`). A failed re-authentication does not use up an export. #### Videos of the real product - **Your activity and exporting your data** (0:18): https://momoto.io/docs/proof/act-01/1.09-activity-my-data/clip.mp4 1. In «Your account», Activity lists what she did with her account: sign-ins, password, second factor 2. In «My data» she asks for everything Momoto keeps about her 3. Momoto builds a ZIP and downloads it ### Change email https://momoto.io/docs/#/p/account/change-email Your email is the address you sign in with. You change it from Your account › Profile: Momoto sends a link to the new address and a notice to the old one, and the change only takes effect when you open the link. #### Before you start - **A second factor must be active.** Without one, the Profile says «To change your email, first enable your second factor», with a link to **Security**. See [Second factor](https://momoto.io/docs/#/p/account/second-factor). - **Outgoing email must be set up** on this installation. If it is not, the Profile says to ask your admin. The platform administrator is told to set up outgoing email first. - To send the request, Momoto asks you to confirm it is you with **both** a code from your app and your password. #### The steps - In **Your account** › **Profile**, press **Change email** and type the new address. - Leave **Sign out other devices on confirm** ticked to close the other places your account is open once the change is made. Press **Send link** and confirm it is you. - Momoto sends a link to the **new** address. Until you open it and confirm, your email stays the old one. The link expires in 1 hour. - Open the link and confirm the change. From then on, you sign in with the new address, and the old one stops working. - The **old** address gets a notice of the change, with a link to undo it. If you asked for the link again within a few minutes, Momoto says it already sent one and does not send another. #### If it was not you: undo it The notice in your old inbox has a link titled «Didn't you do this?». It is valid for 7 days. Open it and press **Restore my email**. Opening the link alone does nothing. Momoto puts back your previous email and closes every session of the account, including the one you used to restore it. Sign in again with your old email and your password, and change your password, as the page advises. #### Limits and common mistakes - If the link does not arrive, the new address may already belong to another account, or you may have asked too many times. Momoto does not say which, so as not to reveal whether an address is in use. Check the address, then ask again in a few minutes. - Momoto allows 5 requests an hour per person. #### How it works (technical) The screen is `components/account/ChangeEmail.tsx`. The two links open `views/EmailLink.tsx` at `/account/email#t=…` and `/account/email/revert#t=…`, with the token in the fragment. Each link's page sends its POST only when you press the button, so mail scanners that open links do nothing. - **POST /me/email**: Returns 202. Level 2. 409 `mfa_required` without an active factor; 503 `mail_unavailable` without outgoing email; 422 `invalid_email` for a bad or unchanged address. An address that already belongs to another account is not reported: nothing is sent and the response is the same. Requests count against 5 per person per hour. - **POST /me/email/confirm**: Public. Takes the token in the body. The token is spent before the change is applied. Applies the change, sends the revert link to the old address, and closes the other sessions when `close_others` was set. Unknown, expired, used or stale tokens give 400 `invalid_token`. Confirm and revert share a limit of 30 attempts per IP per hour. - **POST /me/email/revert**: Public. Restores the old address and closes **all** sessions, including the requester's. 409 `revert_unavailable` if the old address is now taken. The pending change is stored under a SHA-256 hash of its token, for 1 hour. The revert record lasts 7 days. Nothing changes until confirmation. A repeat request within 5 minutes is answered `already_requested` and sends nothing. The audit log records `auth.email_change_requested`, `auth.email_changed` and `auth.email_reverted` with masked addresses only. For an account whose profile the identity provider manages, the confirm and revert steps answer 409 `profile_read_only`. #### Videos of the real product - **Changing the email** (0:57): https://momoto.io/docs/proof/act-07/7.16c-tomas-changes-his-email/clip.mp4 1. Tomás wants to sign in with his email with his surname. In Your account › Profile he presses «Change email» and types the new one 2. He leaves «Sign out other devices on confirm» ticked, presses «Send link» and confirms it is him with his password 3. The confirmation link reaches the new address; until he opens it, his email is still the old one 4. He opens the link and confirms the change 5. His old address gets a notice of the change, with a link to undo it if it was not him 6. Back in his profile the new email shows - **Undoing an email change** (0:46): https://momoto.io/docs/proof/act-07/7.16d-tomas-takes-his-email-back/clip.mp4 1. The notice of the change is in his old inbox. Had it not been him, the «Didn't you do this?» link undoes it 2. He opens the link: Momoto tells him it will restore his previous email and close all his sessions. He presses «Restore my email» 3. In his Momoto tab the session is already closed: he signs in again with his usual email, his password and his code 4. In Your account › Profile his usual email is back ### An organization of her own, with its second factor https://momoto.io/docs/#/p/account/convert-to-organization A personal account can become an organization account. Then you can invite people, create more organizations and assign roles. The change is one-way: an organization account cannot go back to personal. #### Before you start - Open **Your account** › **Profile**. The **Account type** card shows **Personal** or **Organizational**. The button **Convert to organization account** is there only for a personal account. - Only the administrator of the account can convert it. - The window asks for an **Account name**. It cannot be the default name, «Personal account» or «Personal», because your organization keeps the same name. If the field is empty, type a name. - Momoto asks you to confirm it is you. If your account has a second factor, that is a code from your app. If it has none, that is your password. #### What stays and what changes - **Stays the same**: Your agents, your conversations and your memory. - **Changes**: Your account becomes **Organizational**, with the name you chose. You can invite people from **People**, create more organizations and projects, and assign roles. - **Cannot be undone**: Going back to personal. #### If you manage this installation If you installed Momoto and manage it, your account must have a second factor once it is organizational. Momoto takes you to **Protect your account** right after the change. There is no **Not now**, only **Sign out**, until you have set one up. The steps are in [Second factor](https://momoto.io/docs/#/p/account/second-factor). #### How it works (technical) The button is in `components/account/AccountTypeCard.tsx`, which opens `ConvertAccountModal.tsx`. It sends `POST /api/v1/organizations/{organization_id}/convert` with an optional `organization_name`. - **Guard.** The route needs `ENTITIES:UPDATE`, which is a sensitive permission, so a step-up is required (`momoto_api.guards:require_step_up`): a recent second factor, or, with no factor and no requirement for one, the password. The caller must also be an admin of that organization (`require_organization_admin`). - **Use case.** `ConvertAccount.execute` (`momoto_core/usecases/convert_account.py`) returns `AlreadyOrganizational` if the account is already converted, validates the name before writing, and refuses the default name (`ValidationFailed`). If the personal company still has its default name, it is renamed to the account name in the same operation. - **Write.** One atomic port operation, `convert_to_organizational`, with a row lock. Then the audit event `account.converted` with the organization id and the actor, and no names. The change is irreversible at the storage level (the docstring cites a Postgres trigger that rejects a return to personal). After it, `_requires_mfa` is true for the platform owner of an organizational account, which is why the platform owner is sent to enroll a factor. #### Videos of the real product - **An organization of her own, with its second factor** (0:58): https://momoto.io/docs/proof/act-08/8.03b-renata-makes-her-own-organization/clip.mp4 1. In «Your account › Profile», her account is «Personal» 2. She presses «Convert to organization account»: the window warns her she will need a second factor. She gives it a name and confirms with her password 3. Because she manages this installation, Momoto takes her to «Protect your account»: no «Not now», only «Sign out» 4. She asks for her QR code 5. She scans the code with the authenticator app on her phone 6. She types the 6 digits the app shows 7. Momoto gives her recovery codes. She downloads them, confirms she kept them and gets into Momoto 8. In «Your account › Profile», her account is now «Organizational», with the name she chose ### Forgetting the password https://momoto.io/docs/#/p/account/forgot-password If you forget your password, Momoto can email you a link to choose a new one. The link works once and expires after 60 minutes, and choosing a new password signs you out everywhere. #### Before you start - On the sign-in page, press **Forgot your password?**. It appears when this installation can send email. If it cannot, the page says **Ask your admin for a link** instead; your administrator can give you one (see below). - You need the email address of your account and access to that inbox. - Accounts that sign in only with Google have no password, so no link is sent. #### What you will see - Type your email and press the button. The page answers the same way whether or not the email has an account: «If that email has an account, we'll send you a link to reset your password.» - Open the email and press the link. It opens a page where you choose a new password. The rules are the same as in **Security**, and the server checks them again. - Save the new password. Every session you had open is closed, on every device. - Sign in with the new password. If your account has a second factor, the sign-in asks for its code too. #### Limits and common mistakes - The link works once. After you use it, it stops working. - It expires after 60 minutes. Ask for a new one if it has passed. - If a link you asked for is still valid, Momoto does not send another. Use the one you have, or wait until it expires. - Momoto limits the requests: no more than 3 for the same email in an hour, and 10 from the same address in an hour. After that it answers «Too many requests. Try again later.» - The link does not sign you in. Once you choose the password, you sign in again, as usual. #### If your installation cannot send email (for admins) Without outgoing email, a person cannot get the link alone. Open the person in **People** and use the password reset action: Momoto creates a link valid for 60 minutes and shows it to you. Give it to them. You never see the password they choose, and their sessions close when they use the link. Whoever has access to the server can also run the break-glass command `admin-reset-password`. It prints a link valid for 15 minutes and closes all the person's sessions at once. #### How it works (technical) The sign-in form is `views/Login.tsx` (`ForgotPassword`); the link opens `views/Reset.tsx` at `/reset#t=`, so the token stays in the fragment and is not sent to the server by the page load. **Request.** `POST /api/v1/auth/password/forgot` is public and always answers `202` with `accepted: true`. Its work runs in a background task (`_issue_forgot` in `momoto_api/routers/auth_forgot.py`), so the response time does not show whether the email exists. The task sends nothing unless outgoing email is active and the public URL is set. It also sends nothing for an account that is not active, has no password, or still has a live reset link. Otherwise it issues a `RESET` token and emails `/reset#t=…`. Each attempt is audited as `auth.password_forgot` with its outcome. **Caps.** Counted in the request, before the task: 10 per client IP and 3 per email (a hash of it) in one hour, answered with 429 `too_many_requests`. **Reset.** `POST /api/v1/auth/password/reset` takes `token` and `new_password`. The policy is checked before the token is spent, so a rejected password keeps the link valid (422 `password_policy`). A link that was already used or has expired is refused. The reset does not sign you in; the next sign-in goes through the password and, if there is one, the second factor. The reset closes every session of the account in the same request (`close_after_restart`). The token lives 60 minutes (`RESET_TTL_MIN` in `momoto_core/domain/credentials.py`). **Admin links.** `POST /api/v1/users/{user_id}/password-reset` issues a 60-minute link for another person. The admin never chooses the password. Sessions close when the link is used, not when it is issued. The break-glass command `admin-reset-password` issues a 15-minute link and closes sessions at once. #### Videos of the real product - **Forgetting the password** (0:43): https://momoto.io/docs/proof/act-07/7.16a-tomas-forgets-his-password/clip.mp4 1. Tomás does not remember his password: at the sign-in he presses «Forgot your password?» and types his email 2. The link to choose a new password reaches his email; it works only once and expires soon 3. He opens the link and chooses a new password 4. He signs in with the new password ### Asking for your account to be deleted https://momoto.io/docs/#/p/account/my-data You can ask for your account to be deleted. An administrator reviews the request; if it is approved, your account is locked at once and your personal data is erased when a waiting period ends. #### Before you start - Open **Your account** › **My data** and read the section **Request my deactivation**. It tells you what happens to your account, in your case, before you ask. - If you want a copy of your data, export it first with **Export my data** on the same screen. See [Activity and exporting your data](https://momoto.io/docs/#/p/account/activity-my-data). - Momoto asks you to confirm it is you before it sends the request: your password, or a code from your second factor if you have one. #### What happens - Press **Request my deactivation**, write a reason if you want to (optional, up to 500 characters), and confirm. - An administrator must answer within **20 business days**. The screen gives you the exact date. - **If it is approved**, your account is locked immediately: you can no longer sign in, and your sessions are closed. Your personal data is erased when the waiting period ends: **30 days** after approval, unless the installation sets a different period. This cannot be undone. - **If it is denied**, your account stays as it was, and the screen shows the reason. - While the request is pending, you can press **Withdraw my request**. After approval, it can no longer be withdrawn. #### What is erased In every case, Momoto replaces your password, your second factor and its codes, your sessions, your linked accounts, your keys, your preferences and favorite agents, your personal vault notes, and your email and name. The activity log is kept, with your internal id but without your name or your email. What else changes depends on your account, and the screen says which applies to you: - **Full**: your account is personal, so your quick queries and their threads are also deleted. - **Soft**: your quick queries and what you contributed are kept under the name «Deleted user». - **Mixed**: full for your personal account, and soft for what you contributed in other organizations. If you convert your account to organizational before the deletion, the deletion becomes soft. #### Limits - Only one request can be pending at a time. - You can send at most 3 requests in a day, including the ones you withdraw. - If you are the only administrator of the installation, no one else can resolve your request. The screen warns you about this. #### Resolving a request (for admins) An administrator sees the request in **People**, with its reason and the date it is due. **Approve** locks the account and starts the waiting period. **Deny** needs a reason, which the person sees. Nobody can resolve their own request. #### How it works (technical) The screen is `components/account/MyData.tsx`. The routes are under `/api/v1/me/deactivation` (`momoto_api/routers/me_deactivation.py`), and every one carries `only_people`. - **GET /me/deactivation**: The current request, `block_days`, the `mode` that applies today (`full`, `soft` or `mixed`), and `expires_if_you_request`. Answers 503 `deactivation_unavailable` when the installation does not handle deactivations. - **POST /me/deactivation**: Body: optional `reason` (up to 500 characters, no NUL) and optional `current_password`. Level 1 re-authentication, so a second factor if the account has one, otherwise the password. 409 `deactivation_pending` if a request is open. 429 `too_many_requests` after 3 attempts in a day, counted after re-authentication. Answers 201 and notifies the administrators. - **DELETE /me/deactivation**: Withdraws a pending request. 409 `baja_not_pending` otherwise. - **POST /users/{user_id}/deactivation/approve**: Administrator. Resolves the request as approved, sets `purge_at`, and locks the account. If that fails, the request goes back to pending. The answer deadline is 20 business days, counted on the person's calendar zone (`zone_of`). The waiting period is `block_days()` in `momoto_api/deactivation.py`: `MOMOTO_DEACTIVATION_BLOCK_DAYS`, default 30. A value that is not a positive whole number falls back to 30 with a warning. The reason is stored with the request and never in the audit event `user.deactivation_requested`. The erasure runs later, in `SuppressBlockedAccounts` (`momoto_core/usecases/suppress_blocked_accounts.py`), on each sweep over approved requests whose `purge_at` has passed. The mode is decided at that moment, not at approval. #### Videos of the real product - **Asking for your account to be deleted** (0:35): https://momoto.io/docs/proof/act-10/10.04a-tomas-asks-to-be-deleted/clip.mp4 1. In «Your account › My data», «Request my deactivation»: Momoto tells him what happens if it is approved 2. He writes why and confirms with his password ### My vault: notes only she sees, and her agent once she turns it on https://momoto.io/docs/#/p/account/my-vault My vault holds private Markdown notes that belong to you, not to any organization. Your agents can read them only after you turn that on, and they can write only in one folder, _agent/. #### Before you start - Open **Your account** › **My vault** and press **Create my vault**. Until you do, there is nothing to store. - No one else sees your notes in Momoto: not your administrator and not the platform administrator. They do not even see that the vault exists. - Whoever manages the installation can turn agent access off for everyone. If they did, the screen says so, and your agents do not get in even if you turn the switch on. - The files live on the installation's server and are included in its backups. #### Your notes Each note is a Markdown file (`.md`). You can create notes, delete them and rename them. A note's path cannot contain `..`. The screen shows how much space you use, and warns you when it is almost full: «Almost full: delete notes to keep writing.» When the space or the number of notes is used up, Momoto refuses to save until you delete something. #### My agents can use my vault This switch is **off by default**. Turn it on and the agents you talk to can read your notes, inside your conversations. They can write only in the `_agent/` folder, for example to leave a summary. Turn it off and they lose access on their next request. What an agent reads stays in that conversation's history, and people with access to your organization's records can see that history. Notes you do not want an agent to read should stay out of the vault while the switch is on. #### What agents cannot do - They cannot create or delete the vault, turn the switch on, or delete or rename your notes. - They cannot write outside `_agent/`. - Deleting the whole vault is yours alone. You type a confirmation phrase; no password is asked. Deleting it removes every note in it. Nothing about your vault goes to the shared audit log. Administrators cannot see that a note exists, what it is called, or what an agent read there. The trace of what an agent did is its own conversation. #### How it works (technical) The screen is `components/account/MyVault.tsx`. The routes for people are under `/api/v1/me/vault` (`momoto_api/routers/me_vault.py`): `GET` for status, `POST` to create (201 the first time, 200 if it exists), `PATCH` with `agent_access`, `POST /delete` with `confirmation`, and `POST /notes/delete` and `/notes/rename` with the path in the body. They all carry `only_people`. No route takes a person's or a vault's id: the owner is always the session's user. If the container has no personal vault, they answer 503 `personal_vault_unavailable`. The agents reach the notes through `/api/v1/personal-vault/notes` (list with `GET`, read with `POST /read`, write with `PUT`). `PersonalNotes._open` (`momoto_core/usecases/personal_notes.py`) checks, in order, each time: - The operator's switch `MOMOTO_PERSONAL_VAULT_AGENTS` (default on; `0` turns it off for the whole installation). - That the agent's session is one Momoto opened for this same person (`SessionNotOfThePerson` otherwise). - That the person has a vault. - That `agent_access` is on (`VaultWithoutAgentAccess`). - For a write: that the path is inside `_agent/` (`AgentZone`). Delete and rename are refused to agents (`NotAuthorized`). A write by a person replacing an existing note needs `If-Match` (400 `missing_if_match` without it). `create_only` turns an existing note into a 409 `conflict`. Agent writes also pass the write quota in `momoto_api/write_quota.py`. The notes are stored as files in the vault folder on disk (named `pv-…`), and the vault is a row through the `PersonalVaults` port. `PersonalNotes` is declared `MUTATING = False` on purpose: it never calls `event_log.append`, and a test checks that no personal-vault module does. Writing a note therefore leaves no audit entry. #### Videos of the real product - **My vault: notes only she sees, and her agent once she turns it on** (2:14): https://momoto.io/docs/proof/act-02/2.17-personal-vault/clip.mp4 1. In «Your account › My vault» she creates her vault: notes that belong to no organization 2. She writes a note she does not want to share with anyone yet 3. With the switch off, she asks her agent to read it: it cannot get in 4. She turns on «My agents can use my vault» 5. Now the agent does read it, inside this conversation 6. And she asks it to save a summary there: the agent writes only in its folder, _agent/ 7. In her vault are the two notes: hers and the one the agent left ### Your account: your name, your time zone and the time format https://momoto.io/docs/#/p/account/profile-preferences Your account holds the things that describe you: your name, the time zone your times are shown in, and the clock format you read. Changing them affects only your own screens. #### Before you start - You need to be signed in. Open **Your account** from the menu at the top right, then **Profile** or **Preferences**. - If your sign-in is managed by an identity provider, your profile may be read-only. Momoto then says «Your profile is managed by your identity provider.» Change the name there instead. #### Your name The name is how people and your agents call you. Momoto accepts 1 to 80 characters, with at least one letter or number, and no hidden control characters. It cleans up what you type before it saves, so what you see after saving may differ slightly from what you typed. «Save» stays off until the name changes. «Saved» appears once it is stored. Momoto records in your activity that you changed your name, but not the name itself. #### Time zone, time format and theme - **Time zone**: The zone every date and time in Momoto is shown in: messages, activity, notices, agent schedules. Until you choose one, Momoto uses the zone of your browser. - **Time format**: **Automatic** follows the language of the interface. **12 hours** and **24 hours** force the clock. - **Theme**: **System**, **Light** or **Dark**. Choose what you want and press **Save**. Only what you changed is sent. Most times on the screen change as soon as you save; a few places may show the old zone until you open them again. #### How it works (technical) The screens are in `packages/momoto-web/src/views/Account.tsx` (`Profile` and `Preferences`). The name is saved with `PATCH /api/v1/me`; the other preferences with `PATCH /api/v1/me/preferences`, which sends only the changed keys through `useSavePreferences`. - **Name.** `UpdateMeBody` accepts only `display_name`; any other field is a 422. The use case `UpdateMyProfile` normalizes the name with `normalize_name` (`momoto_core/domain/name.py`) before writing, and logs `user.profile_updated` without the value. A read-only profile answers 409 `profile_read_only`. - **Preferences.** `PreferencesChange` takes `time_zone`, `time_format` (`auto`, `h12`, `h23`), `theme` (`system`, `light`, `dark`) and `ask_model`. Unknown fields are refused. A zone must be in the list the API reads from tzdata (`momoto_api.preferences.ZONES`); otherwise 422 `invalid_preferences`. An empty change is refused with «there is nothing to change». - **Storage.** Only the fields you chose are kept, as JSON under the key `prefs:user:` in the key-value store (`SetMyPreferences`). `GET /api/v1/me` returns the preferences with the defaults filled in (the server default zone is `America/Mexico_City`, `auto` and `system`), and `defined_preferences`, the list of fields you chose. The screen uses the browser's zone while you have not chosen one. - **Dates in the browser.** `lib/dates.ts` is the only date formatter. `configureDates` receives the zone and format when `/me` arrives. `auto` leaves the locale's default cycle; the locale is `es-MX` in Spanish and `en-US` in English. #### Videos of the real product - **Your account: your name, your time zone and the time format** (0:20): https://momoto.io/docs/proof/act-01/1.07-profile-preferences/clip.mp4 1. She opens «Your account» from the menu at the top right 2. Momoto only knew her by her email. She writes her name 3. In Preferences she chooses her time zone and the 24-hour clock 4. Dates across the interface follow that zone and that format ### Second factor https://momoto.io/docs/#/p/account/second-factor A second factor is a code from an authenticator app on your phone, asked for in addition to your password. Momoto asks for it at sign-in and before some sensitive changes, and an administrator can make it mandatory for you. #### Turn it on - Open **Your account** › **Security**, section **Second factor**, and press **Enable second factor**. - Type your current password. Momoto shows a QR code and a key. Scan the code with your authenticator app, or open **Can't scan? Type the key** and type the key by hand. On a phone, **Open in your authenticator app** works too. - Type the 6 digits the app shows and press **Confirm**. - Momoto then shows your recovery codes once. Press **Download .txt** or copy them, keep them somewhere safe, and press **I've saved them**. The QR code and the key are shown only once. The factor becomes active only after you confirm a code, so you cannot lock yourself out with a code you never saved. #### When Momoto asks for it - **At sign-in**, after your password, once the factor is active. - **Before some sensitive actions**, such as changing your email or closing your other sessions. Momoto asks for a code. If you have no factor, it may ask for your password instead, unless your account must have one. - **Before changing the app.** **Switch app** asks for a code and your password. To turn the factor off, press **Turn off second factor**. Your other sessions are closed by default; you can untick that. Your recovery codes are deleted too. The button is not there when your account must have a second factor. #### When an administrator requires it An administrator can make the second factor mandatory for you. Then you cannot turn it off, and the offer to put it off for later («Not now») is not there either. If an administrator removes your factor and makes it mandatory, you can still sign in with your password, but nothing else opens until you set up a new factor. You see **Protect your account** with only **Sign out**. Press it, scan the new code with your new phone, type the 6 digits, and save the new recovery codes. Administrators of an organization are asked to turn it on, but are not forced to. Momoto says why it matters for them. #### Requiring it, or resetting it for someone (for admins) In **People**, an administrator can require a second factor for one person, and can remove a person's factor. Both are recorded in that person's activity. Removing the factor does not turn off a requirement, so the person must set a new one. #### How it works (technical) The screens are `components/account/SecondFactor.tsx` and `components/onboarding/MfaEnroll.tsx`. The secret and the QR code live only in the page's state and are not cached. - **POST /auth/mfa/enroll**: The first enrollment requires `current_password`. For an account without a password, a recent SSO login of this session is accepted instead. Once a factor exists, enrolling again is level 2: a step-up and the password. The response carries the secret, the `otpauth` URI and the QR as a data URI, with `no-store`. The secret is never returned again. - **POST /auth/mfa/confirm**: Takes the 6-digit `code`. A wrong one is 400 `mfa_invalid_code`. The factor stays unverified until a code is confirmed, and the previous one stays valid until then. The first confirmation returns the 10 recovery codes once. - **POST /auth/mfa/step-up**: Confirms a code for a sensitive action. Without a factor it answers 403 `mfa_not_enrolled`. - **POST /auth/step-up/password**: Only for someone who has no factor and is not required to have one. Otherwise 403 `step_up_requires_mfa` or `mfa_not_enrolled`. - **POST /auth/mfa/disable**: Level 2. 409 `mfa_required_by_role` if the account must have a factor. - **POST /auth/mfa/prompt/dismiss**: «Not now». 409 `mfa_required` for an account that must have a factor. **Who must have one** (`_requires_mfa` in `momoto_api/routers/auth.py`): the platform owner of an organizational account, and anyone an administrator required (`mfa_preference_store.enforced`, set with `PUT /api/v1/users/{user_id}/mfa/required`). An organization admin is only *recommended* it (`mfa_offer` returns `recommended`). **Login.** With a verified factor, sign-in issues a challenge. Without one, a mandatory account can still sign in: the flag `must_enroll_mfa` in `/me` tells the screen to show **Protect your account**, and the sensitive permissions stay closed until a factor is confirmed (`_must_enroll_mfa`). **Step-up.** A sensitive action needs a step-up younger than `MOMOTO_STEP_UP_MAX_AGE_MIN` minutes (default 15), checked by `momoto_api.guards:require_step_up`. **Recovery codes.** `momoto_api.recovery:new_set` generates 10 codes, stores only their argon2id hashes and replaces the old set. Each is spent once. The screen warns at 3 or fewer. **Admin.** `POST /api/v1/users/{user_id}/mfa/reset` removes the factor and records it as an admin action in the person's activity. #### Videos of the real product - **A second factor before changing the email** (0:36): https://momoto.io/docs/proof/act-07/7.16b-tomas-turns-on-his-second-factor/clip.mp4 1. Tomás wants to change his email. In Your account › Profile, Momoto first asks him for a second factor 2. He follows the link to Security and types his password to see the QR code 3. He scans the code with the authenticator app on his phone 4. He types the 6 digits the app shows 5. Momoto gives him his recovery codes, once. He downloads them and confirms he kept them 6. Back on his profile, he can now change his email - **A mandatory second factor, at the next sign-in** (0:31): https://momoto.io/docs/proof/act-07/7.16f-tomas-sets-up-a-new-second-factor/clip.mp4 1. He signs in with his email and password. No code is asked: Momoto takes him to «Protect your account», with no «Not now», only «Sign out» 2. He asks for his QR code 3. He scans the code with the authenticator app on his new phone 4. He types the 6 digits the app shows 5. Momoto gives him new recovery codes. He downloads them, confirms he kept them and gets into Momoto ### Security: your sessions, your password and new recovery codes https://momoto.io/docs/#/p/account/security Security is where you see every place your account is open, change your password, and get new recovery codes. Each change that matters asks you to confirm it is you first. #### Before you start - Open **Your account** › **Security**. You must be signed in. - To close another session, change your password or get new recovery codes, Momoto asks you to confirm it is you. If your account has a second factor, it asks for a code from your app. If not, it asks for your password. New recovery codes need both (see below). - If you signed in with Google and have no password, the **Password** section says so and there is nothing to change there. #### Open sessions This list shows each place your account is open: the device, the IP address, when it started and when it was last used. The session you are using is marked «this session». Each session also shows how many of your agents run in it. - **Close** ends that session. It loses access on its next request, not when its token would expire. - **Close here** on your own session signs you out of this browser. - **Close all the others** asks you to confirm with «Yes, close them». Your current session stays open. The agents in a closed session lose access, because they work with that session's credential. #### Password Type your current password and the new one. There is one field for the new password, with no repeat. The rules are shown as you type. Momoto checks them again on the server, and if the new password breaks several, it lists all of them at once. The server also refuses a password that contains your email or your name, and one you used recently. **Close session on other devices** is ticked by default. Leave it ticked if you think someone else may have your password. This session stays open after the change. #### Recovery codes Recovery codes let you sign in once if you lose your phone. There are 10. Each works only once, and Momoto shows them only at the moment they are made. Momoto warns you when 3 or fewer are left. «Generate new codes» makes a new set and the previous ones stop working right away. Save the new ones before you close the screen. For the second factor itself, see [Second factor](https://momoto.io/docs/#/p/account/second-factor). #### How it works (technical) The screens are `components/account/Sessions.tsx`, `Password.tsx` and `SecondFactor.tsx`. Every route below is `only_people`: an agent's child session cannot use them. - **GET /auth/sessions**: Your own sessions, not your agents' sessions. No extra permission is needed. - **DELETE /auth/sessions/{session_id}**: Level 1 re-authentication for any session except the current one. Another person's session id gives 404. - **POST /auth/sessions/revoke-others**: Level 1. Closes every session except the current one, and the agents inside them. - **POST /auth/password**: Always needs `current_password`, checked by the login verifier, so wrong attempts count toward the lockout. 409 `no_password` for Google-only accounts; 422 `password_policy` with the list of `violations`. `close_others` defaults to true. - **POST /auth/mfa/recovery-codes**: Level 2. Returns 10 new codes and replaces the old set (`momoto_api.recovery:new_set`). 409 `mfa_not_enrolled` without a factor. - **POST /auth/mfa/disable**: Level 2. 409 `mfa_required_by_role` if the account must have a factor. Deletes the recovery codes and, by default, closes the other sessions. **Level 1** (`momoto_api/reauthentication.py`): if the account has a verified factor, a recent step-up is required, otherwise the current password. **Level 2** requires both. A recent step-up is valid for `MOMOTO_STEP_UP_MAX_AGE_MIN` minutes (default 15). Without an opaque session the answer is 403 `reauth_unavailable`. After a password change, only the session that made the change loses its must-change-password flag. The other sessions keep it. #### Videos of the real product - **Security: your sessions, your password and new recovery codes** (0:35): https://momoto.io/docs/proof/act-01/1.08-security/clip.mp4 1. Open sessions: this computer, her phone and her tablet 2. She closes the phone one: it loses access on its next request 3. She changes her password: each rule ticks as she types 4. She asks to sign out everywhere else and saves 5. She asks for new recovery codes. First Momoto confirms it's her 6. The earlier codes stop working. She downloads the new ones and confirms ### Your AI https://momoto.io/docs/#/p/account/your-ai «Your account» › «AI» is where you connect, change or remove the AI key your own agents work with. Platform admins also manage the installation's AI there, and the compatible endpoint. #### Two kinds of AI - **«Your AI for your agents»**: Yours alone. Agents you own work only with it, never with the installation's or anyone else's. Without one connected, your agents don't start. Nobody else can see, connect or remove it, an admin included. - **«The installation's AI»**: One key for the whole Momoto. Only agents without an owner use it, such as each organization's Admin agent. Everyone sees whether it is connected; only a platform admin can change it. The key itself is never stored in Momoto nor shown again: the screen shows the provider and its default model. The key lives in OneCLI, the gateway in front of the agents. #### Connect, change or remove your AI - **Connect:** pick the «Provider», paste «Your key» and press «Connect my AI». The key is tested with the provider first; a wrong key, or one whose account has no balance, is refused and not saved. - **Change:** connect again with the same provider. The new key replaces the old one only once it works, so your agents keep running if something fails. - **Remove:** press «Remove» followed by the provider's name, for example «Remove Anthropic». Your agents that used it won't start until you connect another. - Connecting and removing both ask you to confirm it's you: the code from your authenticator app, or your password if your account has no second factor. - After a change, the model pickers update: you can only choose models from providers you connected. #### The installation's AI and the compatible endpoint (for admins) Only a platform admin (an Admin with no organization attached) sees the buttons. An Ops person, or an Admin of a single organization, sees the state but cannot change it: this key reaches agents in every organization. - «Change key» tests the new key and saves it before the old one is deleted, so the agents never run without AI in between. It changes the AI for the whole installation. - «Disconnect» then «Yes, disconnect» deletes the key. Agents that use it stop working until you connect another. - **«Compatible endpoint»** lets everyone use a service that speaks Anthropic's API: LiteLLM, DeepSeek, Kimi, a company gateway. Write its «Address (https, without /v1)» and «Models, one per line», optionally with a name after «=» (for example `deepseek-chat = DeepSeek Chat`), and press «Save endpoint». Then connect its key like any other provider's, as the installation's AI or as each person's own. - If the endpoint lists more models than the ones you wrote, they appear under «The endpoint also offers:»; add the ones you want. Nobody can use a model you did not list. - To move the endpoint to another host, or to «Remove endpoint», first remove every key on it: the installation's and each person's. #### How it works (technical) The tab renders `YourPersonalAi.tsx` and `YourAi.tsx` in `packages/momoto-web/src/components/account/`; the endpoint form is `CompatibleEndpoint.tsx`, shown only when `platform_admin` is true. Routes are in `momoto_api/routers/llm_auth.py`: - Your AI: `GET /llm/mine`, `POST /llm/mine`, `DELETE /llm/mine/{provider}`. Both writes require a recent step-up (15 minutes). The key is stored in OneCLI under a name tied to your user id, and the gateway grants it only to agents you own. - The installation's AI: `GET /llm/connections`, `POST`, `PUT /llm/connections/{provider}` (with `confirm: true`) and `DELETE`. Writes need the platform admin check, the `MODELS:UPDATE` permission, and a step-up. - The endpoint: `GET`, `PUT` and `DELETE /llm/endpoint`. The address must be `https://name[:port][/path]`, a host name rather than an IP, without `/v1`; 1 to 50 models. It is kept in the key-value store and handed to the agent runtime, which points the agent's container at it. Agents see its models as `compatible:`. Moving or removing it while keys sit on its host gives 409 `endpoint_in_use`. - Every attempt, failed or not, writes an audit event with the provider, the action and the result code, never the key. #### Videos of the real product - **Disconnecting the AI · Iván** (0:23): https://momoto.io/docs/proof/act-10/10.05b-ai-off-ivan/clip.mp4 1. In «Your account › AI», «Your AI for your agents»: the one connected for their agents 2. They remove it. Momoto confirms it is them, and the AI leaves the list: their agents no longer start - **Disconnecting the AI · Lucía** (0:35): https://momoto.io/docs/proof/act-10/10.05c-ai-off-lucia/clip.mp4 1. In «Your account › AI», «Your AI for your agents»: the one connected for their agents 2. They remove it. Momoto confirms it is them, and the AI leaves the list: their agents no longer start 3. As the administrator, she also disconnects the installation's AI: «Disconnect» and «Yes, disconnect» - **Disconnecting the AI · Diego** (0:22): https://momoto.io/docs/proof/act-10/10.05d-ai-off-diego/clip.mp4 1. In «Your account › AI», «Your AI for your agents»: the one connected for their agents 2. They remove it. Momoto confirms it is them, and the AI leaves the list: their agents no longer start - **Disconnecting the AI · Marisol** (0:34): https://momoto.io/docs/proof/act-10/10.05e-ai-off-marisol/clip.mp4 1. In «Your account › AI», «Your AI for your agents»: the one connected for their agents 2. They remove it. Momoto confirms it is them, and the AI leaves the list: their agents no longer start 3. As the administrator, she also disconnects the installation's AI: «Disconnect» and «Yes, disconnect» - **Disconnecting the AI · Renata** (0:24): https://momoto.io/docs/proof/act-10/10.05f-ai-off-renata/clip.mp4 1. In «Your account › AI», «Your AI for your agents»: the one connected for their agents 2. They remove it. Momoto confirms it is them, and the AI leaves the list: their agents no longer start ## Agents Agents that work for you: create them, give them skills, models, tools and the services you already use. ### A module made by a swarm https://momoto.io/docs/#/p/agents/a-module-by-swarm A swarm can build a module of your app in parts: several agents work at once, and a third reviews what they did. The pieces come back as results, and you hand them to one of your agents, which applies them as a change like any other. #### Steps - Ask your coordinator for a plan: for example, two agents at once for the module and a third that reviews it. - Copy the plan and run it in **Swarms**, on behalf of the coordinator. - Each step runs on your computer with your own AI. The card shows who ran it, how long it took and what it cost. - Open each step's result and paste the pieces yourself into a conversation with your backend agent. Results are not handed to a conversation for you. - The agent applies the pieces to the app as one more change, which you can review like any other. #### Limits - Steps never reach the app directly. Only one of your agents can apply them. - A run can be cut by a failure; see [Swarms](https://momoto.io/docs/#/p/agents/swarms) for resume and cancel. #### How it works (technical) Each step is a throwaway container on your computer. It thinks with the AI of the agent's owner, and it returns a result through `GET /api/v1/runs/{run_id}/results/{path}`. The application change goes through the agent's normal path, not through the swarm. Plans and their ceilings are described in [Swarms](https://momoto.io/docs/#/p/agents/swarms). #### Videos of the real product - **A module made by a swarm** (3:17): https://momoto.io/docs/proof/act-04/4.12-module-by-swarm/clip.mp4 1. Lucía asks her coordinator for a plan for the reports module: two agents at once and a third that reviews 2. She copies the plan and runs it in «More › Swarms», on behalf of her coordinator 3. Each step runs on her computer, with her own AI: who, how long it took and what it cost 4. She hands the pieces to her backend agent, which applies them to the app as one more change 5. The CRM now has its reports module ### A team of agents for one job: a coordinator and specialists https://momoto.io/docs/#/p/agents/a-team-for-a-job For a bigger job you can work with a small team of agents: one coordinator who plans, and specialists for each part, such as the backend, the frontend and security. Each agent has its own name, job and instructions, and the whole team stays on your own computer. #### Setting up the team - Create the **coordinator** first, in **Agents › New agent**. Give it a name, say what it does, pick the cheapest model that fits, write its instructions and set a daily cap. - Create one agent for each specialist, the same way. The backend specialist can own the service, its data and its API. The frontend specialist can own the screens the team uses. A security specialist can review what the others do. - In **Agents** the whole team is listed together. #### What to notice - Each agent answers you in its own conversation. The coordinator can also plan the work for the others. - Leave the skills unmarked and each agent gets the standard set. That set includes the skills from the store, such as `momoto-apps`. - Your team thinks with your own AI. The organization's hub does not see its conversations. #### How it works (technical) Each agent is created through `POST /api/v1/agents/`, with an `llm_backend` of `subscription` when it uses the owner's AI; the daily cap then defaults to the value in `momoto_core/usecases/create_agent.py`. Details of the form are in [Create an agent](https://momoto.io/docs/#/p/agents/create). Agents hand work to each other only through the organization's Admin agent (see [Delegating in the conversation](https://momoto.io/docs/#/p/agents/delegating)). A specialist you create yourself is not wired to the others until it is connected. #### Videos of the real product - **A team of agents for one job: a coordinator and specialists** (2:26): https://momoto.io/docs/proof/act-04/4.01a-crm-team/clip.mp4 1. Lucía will build the CRM with a team. She starts with the coordinator: its name, what it does, the cheapest model, its instructions and a daily cap 2. The backend specialist: the service, its data and its API 3. The frontend one: the screens the sales team uses 4. And the security one, which reviews what the other two do 5. In «Agents» the whole team is there, on her computer ### Give an agent a daily spending cap https://momoto.io/docs/#/p/agents/budget A daily spending cap stops an agent when it has spent that much in one day. You set it for each agent, in US dollars. Set 0 for no cap. #### What the cap counts - The cap counts what the agent spent **today**, on the UTC day. It starts again at 00:00 UTC. - When the agent reaches the cap, it stops answering. A notice says it reached today's cap. Momoto sends that notice once per person per day. - A message you write while the cap is reached is still kept. Raise the cap, then send it again. #### Changing it - Open the agent, press «Customize», and choose **Budget**. The section is titled «Budget of this agent». - Enter the amount in dollars: 0 or more. Enter `0` for no cap. - Press «Save cap». A new agent on your own AI starts at US$5 a day. Only the owner can change the cap. An administrator who is not the owner cannot. #### How it works (technical) - `PATCH /api/v1/agents/{agent_id}/budget` sets the cap (`momoto_api.routers.agents:update_agent_budget`). It needs `BUDGETS:UPDATE` and the owner. A Bedrock agent must keep a cap above 0. - Spending is read by `GET /api/v1/budgets/agents/{agent_id}`. - `momoto_core.usecases.enforce_budget` adds up today's charges for the agent, by UTC day, and refuses the next message when the cap is reached. #### Videos of the real product - **Give an agent a daily spending cap** (1:02): https://momoto.io/docs/proof/act-02/2.11-budget/clip.mp4 1. In «Customize › Budget» she sees the agent's daily cap: 2 dollars 2. She lowers it to five cents and saves 3. She writes to the agent: it does not answer. A notice says it reached today's cap 4. Right there she raises the cap to 2 dollars 5. Her message was still written. She sends it and the agent answers ### Create an agent with the wizard https://momoto.io/docs/#/p/agents/create An agent is an assistant with its own name, job, skills and spending cap that works inside your organization. Creating one takes two things from you: a name and what it does. The wizard gives everything else a sensible default that you can change later. #### Before you start - You need a role that may create agents in the organization. Without it, the create page sends you back to the agents list. - An agent runs on its **owner's** AI. Whoever creates it is its owner, so connect your AI first. - Names are unique inside an organization. Two organizations can each have an agent called «Coordinator». #### The first page and «More options» «New agent» asks for only two things: the **name** and **what it does**. Momoto writes the agent's first identity instructions from these two. «More options» opens the rest: the project, the model and the role. Leave the model empty and the agent uses the default model of the AI you connected, chosen each time it starts. The role is a short label such as «analyst»; it describes the agent and grants nothing. An admin also sees **For whom**, to create the agent for another member (see below). #### «Continue with the assistant» The next pages cover the rest: - **Skills**: What the agent knows how to do. Mark none and it gets the standard set. You can change them later. - **Connections**: The connections the wizard asks for, in the order the wizard shows them. - **Budget**: The daily spending cap. It starts at **US$5 a day** on your own AI. Enter `0` for no cap. - **Propose before acting**: When on, the agent describes what it is about to do and waits for your yes. The last page is a summary. Check it, then press create. #### What you will notice Momoto creates the agent and opens its chat, so the agent can answer a first question. Its name, what it does and its skills are in «Customize», and you can change any of them at any time. - An admin who creates an agent for someone else makes that person its owner. The agent then waits as **pending approval**; the person accepts or rejects it from their inbox. Only that person can accept it, not the admin who created it. #### Creating an agent for someone else (for admins) Use **For whom** to pick another member of the organization. That person's AI runs the agent, and their daily cap applies to it. You cannot pick someone who is not a member of the organization. #### How it works (technical) The wizard is in `packages/momoto-web/src/v2/agents/CreateAgent.tsx`. It sends one request: ``` POST /api/v1/agents/ { "name": "Coordinator", "entity": "acme", "description": "Summarizes the CRM project every morning", "role": "analyst", "skills": [], "llm_backend": "subscription", "budget_daily_usd": null, "propose_confirm": false, "model": null, "for_user_id": null } ``` - `momoto_api.routers.agents:create_agent` validates the body and checks the caller may create agents. - When `for_user_id` is set, only an admin of the organization may use it, and that person must belong to the organization. - On the `subscription` backend, an empty `budget_daily_usd` takes the default cap, `DEFAULT_DAILY_CAP_USD = 5` in `momoto_core/usecases/create_agent.py`. - `momoto_core.usecases.create_agent` checks the permission on the organization, rejects text the database cannot store, validates the roles and skills against the catalog, and creates the agent with an id built from the organization and the name. A name already used in the organization is refused. #### Videos of the real product - **Create an agent with the wizard** (0:47): https://momoto.io/docs/proof/act-02/2.01-new-agent/clip.mp4 1. In Agents, «New agent» asks for only two things: its name and what it does 2. «More options» opens the rest: the project, the model and its role 3. «Continue with the assistant» leads to the rest. The skills: if she marks none, it gets all the standard ones 4. Its identity instructions, a daily spending cap and propose before acting 5. She creates it, and Momoto opens its chat to ask it the first thing ### Tuning an agent on each person's own computer https://momoto.io/docs/#/p/agents/customize-on-your-computer Once an agent is on your own computer, you can tune it yourself: rename it, turn it off when you do not need it, change its instructions and skills, import a skill, and lower its daily cap. Your role in the organization limits what belongs to the organization, not what you do with your own agents. #### What you can change - **Name**: Give the agent another name from its own screen. - **Turn off and on**: **Turn off** stops the agent and any session it has running. **Turn on** brings it back. - **Instructions**: In **Customize › Instructions** you edit what the agent is told to do. - **Skills**: In **Customize › Skills** you turn each skill on or off for this agent. - **Import skill**: In **Customize › Import skill** you bring in a skill from a .zip file. A skill marked sensitive needs an administrator's signature before it can be used. - **Budget**: In **Customize › Budget** you change the daily cap in US dollars. Zero means no cap. When the cap is reached, the agent stops until midnight UTC. #### Limits - Changing a budget needs permission to manage budgets. - Import is for administrators of the organization, and an imported skill belongs to the whole organization, not to one agent. #### How it works (technical) The sections are listed in `packages/momoto-web/src/components/customize/CustomizeModal.tsx`: Skills, Import skill, Instructions, Model chain, Budget, MCPs, Keys, Tasks, Security and Access. An owner who is not an admin sees the subset in `OWNER_SECTIONS`. **Turn off and on.** The labels are in `packages/momoto-web/src/v2/agents/AgentDetail.tsx`. They call `PUT /api/v1/agents/{agent_id}/enabled`. **Budget.** `components/customize/BudgetSection.tsx` shows the daily cap. **Imports.** `components/customize/ImportSkillSection.tsx` uploads the .zip. A sensitive skill gets a 409 `approval_pending` until an admin signs it. #### Videos of the real product - **Tuning an agent on each person's own computer** (2:37): https://momoto.io/docs/proof/act-04/4.01b-tune-an-agent/clip.mp4 1. In «Agents», Lucía gives another name to the assistant her Momoto made for her when she joined 2. She turns it off while she is not using it, and on again 3. She sharpens her security reviewer's instructions in «Customize» 4. In «Skills» she turns off one it does not need 5. And she imports a skill from a .zip: the security review lets it through and it is signed 6. Last, she lowers its daily cap ### Delegating in the conversation: one agent hands tasks to others https://momoto.io/docs/#/p/agents/delegating In a conversation, the organization's Admin agent can hand tasks to your other agents and gather what they answer. Each agent works in its own conversation and reports back to Admin, which writes one summary for you. #### What Admin is - Every organization has one agent called **Admin**. It has no owner, so it works with the AI your installation uses. Connect that AI in **Your account › AI**. - Admin hands work out. The other agents answer to Admin, and not to each other. Their exchanges with Admin appear under «Between agents». #### Handing out tasks - Open the conversation with **Admin**. You can choose a cheaper model for it. - Ask it for what you need, for example «give the Coordinator the weekly report and my assistant the expense list». - Each agent works in its own conversation and answers Admin. At the end, Admin gives you one summary. In the Coordinator's conversation you will find the request from Admin and the answer the Coordinator gave. #### Limits - An agent that is turned off does not receive work. Neither does an agent in an archived project. - An agent with restricted access receives work only if the person who started the chain may use it. Otherwise the message is refused. - Each agent can receive at most 60 messages from other agents an hour by default. The installation sets this with `MOMOTO_A2A_MAX_PER_HOUR`. #### How it works (technical) Agent-to-agent traffic runs in the harness, in `nanoclaw/src/modules/agent-to-agent/`. The organization's Admin is wired to each specialist as a star. Each edge is a row in the `agent_destinations` table, written by the runtime's `wire_peers`. **Routing.** `routeAgentMessage` in `agent-route.ts` checks the edge, the rate limit and the target before it writes. An edge marked `acl_guard` is delivered only after Momoto confirms that the person who started the chain may use that agent. The check is `human_can_use_agent` in `momoto_core/services/specialist.py`. **The Admin agent.** `admin_agent_for` in `momoto_core/domain/admin_agent.py` creates it, named «Admin», for each organization. An agent with an owner always uses that owner's AI, checked by `require_active_owner` in `momoto_core/usecases/_owner_ai.py`. The web app shows «Between agents» on a message from another agent (`packages/momoto-web/src/v2/chat/MessageBubble.tsx`). #### Videos of the real product - **Delegating in the conversation: one agent hands tasks to others** (1:41): https://momoto.io/docs/proof/act-02/2.29-delegating/clip.mp4 1. The organization's «Admin» agent hands work to the others. It has no owner: it thinks with the installation's AI, connected in «Your account › AI» 2. She opens the conversation with Admin and leaves it on the cheapest model 3. She asks it to hand out two tasks: one for the Coordinator and one for her assistant 4. Each agent works in its own conversation and answers Admin. The exchanges show here as «Between agents», and at the end Admin gives one summary 5. In the Coordinator's conversation the request from Admin and its answer remain ### Renata tunes her assistant: instructions, skills and a spending cap https://momoto.io/docs/#/p/agents/edit Renata's assistant runs on her own Momoto and with her own AI, so she can tune its instructions, skills and spending cap herself. Small changes apply at once. Rewriting more than a third of the instructions asks for an approval first. #### What she changes - **Instructions**: add a line and save. A small change applies at once. - **Skills**: tick the skill she wants. A skill that publishes to the store is switched on the same way. - **Budget**: the daily cap in dollars. Her assistant starts at US$5 a day; she sets 2. Each of these is covered in detail: [Change an agent's instructions](https://momoto.io/docs/#/p/agents/instructions), [Turn skills on and off](https://momoto.io/docs/#/p/agents/skills) and [Give an agent a daily spending cap](https://momoto.io/docs/#/p/agents/budget). #### The approval Her instructions were short, so one added line changed more than a third of the text. Momoto put an approval at the top of her inbox. She opened it and approved it. Then she saved the instructions again, and this time they applied. #### How it works (technical) - Instructions: `PUT /api/v1/agents/{agent_id}/system-prompt`, with the rule for more than a third of the text described in [Change an agent's instructions](https://momoto.io/docs/#/p/agents/instructions). - Skills: `PUT /api/v1/agents/{agent_id}/skills`. - Budget: `PATCH /api/v1/agents/{agent_id}/budget`. Only the owner can set it. #### Videos of the real product - **Renata tunes her assistant: instructions, skills and a spending cap** (1:46): https://momoto.io/docs/proof/act-05/5.17b-renata-tunes-her-assistant/clip.mp4 1. In «Customize › Instructions» of her assistant, Renata adds a line and saves 2. Her instructions were very short and the line changes more than a third: Momoto asks for an approval. She approves it herself, at the top 3. She goes back to Instructions and saves again: now it applies 4. In «Skills» she checks it has the apps one, the one that publishes to the store 5. And in «Budget» she gives it a daily cap of 2 dollars ### Import a skill from a .zip https://momoto.io/docs/#/p/agents/import-a-skill A skill is a set of instructions and files that teaches an agent a task. You can import one from a .zip file. Momoto checks it first, and a skill that does not pass the review is not imported at all. #### Before you start - Importing skills is for administrators of the organization. Anyone else sees a message that they need admin capability. - You need the skill as a .zip file on your computer. #### Importing a .zip - Open the agent, press «Customize», and choose **Import skill**. - Pick «Upload .zip» and choose the file. - Press import. If the review refuses the skill, Momoto says so and imports nothing from that file. A file that contains a key or a token, even by mistake, is refused. Remove it from the skill and upload again. On a new installation, the first import can say that the dependency review is still downloading its database. Wait a moment and press import again. When the review passes, the skill is signed and listed as imported. It is not yet on any agent: turn it on in **Skills**, as described in [Turn skills on and off](https://momoto.io/docs/#/p/agents/skills). #### How it works (technical) - `POST /api/v1/skills/import-zip` (`momoto_api.routers.skills_import:post_skills_import_zip`) needs admin capability. - The file goes through the same scanner as a skill imported from git. The scanner looks for secrets and other problems in the files. A failing scan stops the import before anything is written. #### Videos of the real product - **Import a skill from a .zip** (1:39): https://momoto.io/docs/proof/act-02/2.08b-import-skill/clip.mp4 1. In «Customize › Import skill» she picks «Upload .zip» 2. She uploads «quetzal-labels.zip», a skill with the house format for labels 3. The security review lets it through and it is signed 4. She uploads another one that carries a key forgotten among its files 5. The review refuses it: nothing of it is imported 6. In Skills she turns on the one that did get in and saves 7. She asks for a label: the agent uses the new skill ### Change an agent's instructions and see how it changes https://momoto.io/docs/#/p/agents/instructions An agent's instructions say what it is and how it answers. You can change them at any time. A small edit applies at once; a rewrite of more than a third of the text waits for an approval first. #### Before you start - You need to be the owner of the agent or an administrator of the organization. - Momoto asks you to confirm it is you before it saves. Confirm, or the save does not go through. #### Editing and saving - Open the agent, press «Customize», and choose **Instructions**. The section is titled «Instructions (identity layer)». - Change the text and press save. A small change applies at once. The agent's next answer uses the new text. #### When you rewrite most of it If your change alters more than a third of the text, Momoto does not apply it yet. It creates an approval, which waits in your inbox at the top. An administrator of the organization opens it and approves it. Then go back to Instructions and save again: the second save applies. The approval covers that exact text. Any other change needs its own approval. Each saved change makes a new version. See [Version history](https://momoto.io/docs/#/p/agents/versions). #### How it works (technical) - `PUT /api/v1/agents/{agent_id}/system-prompt` (`momoto_api.routers.customize:put_agent_system_prompt`) needs an `If-Match` header with the current version, the permission to configure the agent (owner or admin) and a recent second factor (step-up `PROMPT:UPDATE`). - `momoto_core.usecases.update_agent_system_prompt` compares the new text with the current one. The approval applies only when the agent already has its own instructions; the text the wizard writes on creation does not need one. - When more than 30% of the text changes, the use case calls `require_or_redeem` with the resource `update_agent_system_prompt` and a hash of the new text as the binding. The first save creates the approval and returns it as pending. The save after the approval redeems it, once. - The approval is resolved by an administrator who is a member of the organization. On a personal Momoto the resolver is its administrator. - Each applied change writes a version snapshot first, then the new text, then the audit events `agent_updated` and `agent_version_published`. #### Videos of the real product - **Change an agent's instructions and see how it changes** (1:23): https://momoto.io/docs/proof/act-02/2.06-instructions/clip.mp4 1. Marisol asks her coordinator a question, as it comes 2. In «Customize», Instructions is what the agent is and how it answers 3. She rewrites them: a set number of bullets, formal, and saying where it came from 4. She saves. It changes more than a third of the text, so Momoto does not apply it yet: it asks for an approval 5. The approval waits in her inbox, at the top. She opens it and approves it herself 6. She goes back to Instructions and saves again: now it applies 7. The same question, now with the new instructions ### Limit an agent's way out to the internet https://momoto.io/docs/#/p/agents/internet-exit An agent's chat can reach the internet. You can limit that exit to a list of domains you choose, so the agent only talks to the sites you name. This is set per agent, in its Security tab. #### Before you start - You need admin capability in the organization, and you must own the agent. - «Only the list» is offered only when the platform has checked its exit filter on this machine. The installer builds that filter; if the option is greyed out, the check has not passed. #### Setting it up - Open the agent, press «Customize», and choose **Security**. - Under **Allowed domains**, type a domain and press «Add». Use letters, digits, `*`, `.` and `-`. Duplicates are refused. - Under **Chat internet exit**, choose **Only the list**. **Open** is the usual behavior. - Press «Save», then restart the agent. The chat then reaches only the domains in the list, plus what the platform adds so the chat keeps working. #### What you will notice - A listed domain answers. - A site that is not listed does not answer from the chat. - To go back, choose **Open**, remove the domains you no longer need, press «Save», and restart the agent. #### Restart after each change The exit of a conversation changes when its agent starts again, so restart the agent after each change. Until then, the old exit still applies. #### How it works (technical) - `PUT /api/v1/agents/{agent_id}/security` sends `egress_chat` (`open` or `allowlist`) and `egress_allowlist`. The value is stored on `AgentMeta.egress_chat`, which defaults to `open`. - `momoto_core.usecases.update_agent_security` refuses `allowlist` unless the platform has measured the capacity to confine a chat (`egress_chat_not_available`). - Each domain in the list must match the format shown in the Security tab. #### Videos of the real product - **Limit an agent's way out to the internet** (2:00): https://momoto.io/docs/proof/act-02/2.09-internet-exit/clip.mp4 1. In «Customize › Security» she adds an allowed domain 2. She picks «Only the list» for the chat, saves and restarts the agent 3. She asks for two sites: the listed one and another 4. She puts the exit back on «Open», removes the domain, saves and restarts the agent 5. Now both sites answer ### Keys https://momoto.io/docs/#/p/agents/keys An agent's keys are the secrets it uses to call outside services, such as a Slack bot token or an API key. You see the service and how the key travels, never the key itself. You can add, replace or remove them at any time. #### Before you start - Only the agent's **owner** manages its keys. Someone else who opens the agent sees the message «An agent's keys are managed only by its owner.» - The keys belong to that one agent. Another agent does not get them. #### The list Open the agent, then **Customize › Keys**. Each row shows the service and how the key travels: the header it is sent in and its format, for example `Authorization` with `Bearer {value}`. The list never shows the key. Keys you saved from a request, as in [The agent asks for a key](https://momoto.io/docs/#/p/agents/keys-request), appear here too. #### Adding, replacing and removing - **Add a key**: Write the **Service** (a host name, such as `api.trello.com`) and the **Key** in the hidden field. Under how it travels, set the header and the format if the service needs something other than the defaults. Press **Save key**. - **Replace**: Press **Replace** on the row. The service and the format stay filled in; the key does not. Type the new key and save. The old one is gone. - **Remove**: Press **Remove** and confirm with **Yes, remove**. The agent stops sending that key. A new key starts working in about half a minute. A removed key stops within about a minute, including for an agent that is already running. #### Limits - You cannot read a saved key back. To change it, replace it. - The key only travels on this agent's calls to that service. The agent never receives the value. #### How it works (technical) The screen is `packages/momoto-web/src/components/customize/KeysSection.tsx`, one of the sections in `CustomizeModal.tsx`. It calls these routes in `momoto_api.routers.credential_requests`: - **`GET /api/v1/agents/{agent_id}/keys`**: The services and how each key travels. No values. - **`PUT /api/v1/agents/{agent_id}/keys/{host}`**: Adds or replaces the key for that host. Owner only. - **`DELETE /api/v1/agents/{agent_id}/keys/{host}`**: Removes it. 404 when the agent has no key for that host. Each change is written to the audit log. The value is stored in the credential gateway as a secret for that agent and that host, and the gateway adds it to the agent's HTTPS calls to that host. #### Videos of the real product - **An agent's keys: see them, add, replace and remove** (2:26): https://momoto.io/docs/proof/act-02/2.22-keys-section/clip.mp4 1. In «Customize › Keys» is the one the agent asked for: the service and how it travels, never its value 2. She adds another by hand, without waiting for the agent to ask: the service and the key 3. She replaces the one of Slack: she writes the new one and saves. The old one is gone 4. She removes the one she added. Momoto asks first 5. The agent calls Slack: the new key travels by itself 6. She removes the one of Slack too 7. The same call, a minute later: Slack no longer receives any key - **A member gives his agent a key, by hand** (1:04): https://momoto.io/docs/proof/act-05/5.11d-diegos-agent-keys/clip.mp4 1. He opens «Integrations» and goes to «Customize › Keys» 2. He adds the key of api.trello.com by hand, without waiting for the agent to ask: the service and the key, in a hidden field ### The agent asks for a key: a notice, a masked window, and nobody sees it again https://momoto.io/docs/#/p/agents/keys-request Sometimes an agent needs a key for an outside service, such as a Slack bot token, before it can finish a task. It asks you for that key in the conversation, and you give it once. Momoto keeps the key for that one agent and never shows it again. #### What happens, step by step - You ask for something that needs an outside service, such as Slack. The agent does not have the key yet, so its call fails. - You tell the agent to ask you for the key. It opens a request for that service, for example `slack.com`. - A notice appears in your notices: «Your agent asks you for a key for slack.com». Open it and Momoto takes you to the conversation. - The card in the conversation has **Enter the key**. A window titled «Key for slack.com» opens with a masked field. Paste the key and press **Save key**. You can also press **Don't provide it**. - The agent goes on by itself. It repeats the call, and the service now receives the key. The agent never sees the key. #### Good to know - The request waits one hour. After that it expires and the agent has to ask again. - The key is saved for this one agent only. The toast says so: «the key for slack.com was saved only for this agent». - Nobody can read the key back afterwards, not you and not the agent. To change it, use **Customize › Keys** (see [Keys](https://momoto.io/docs/#/p/agents/keys)). - An agent can keep up to 5 requests open at once. A second request for a service that already has one open returns the same request. #### How it works (technical) The agent asks with `POST /api/v1/credential-requests`; the handler is `momoto_api.routers.credential_requests.request_key`. It only accepts calls from the agent itself and answers 201. A pending request for the same host is reused. More than 5 pending requests for one agent gets a 429. The web app finds open requests in the session with `GET /api/v1/sessions/{session_id}/credential-requests`. Saving calls `POST /api/v1/sessions/{session_id}/credential-requests/{rid}/fulfill` with the value, which must be one line of 1 to 8192 characters. A request that is no longer pending answers 409. `/reject` closes it without a key. A pending request expires after one hour. A resolved one stays visible for 10 minutes. The value goes to the credential gateway as a secret for that agent and that host. The audit log records who saved it, for which agent and host, and never the value. #### Videos of the real product - **The agent asks for a key: a notice, a masked window, and nobody sees it again** (1:41): https://momoto.io/docs/proof/act-02/2.21-key-request/clip.mp4 1. She asks for something that needs Slack. The agent does not have that key yet 2. She tells it to ask her for it. The agent opens the request; she goes to the Dashboard to do something else 3. In her notices: «Your agent asks you for a key for slack.com». She opens it and it takes her to the conversation 4. «Enter the key»: a small window with a masked field. She pastes it and saves 5. The agent goes on by itself: it repeats the call and now Slack receives a key the agent never saw ### Rename, turn off and on, favourite, copy and delete an agent https://momoto.io/docs/#/p/agents/list-actions From the Agents list you can rename an agent, turn it off and on, mark it as a favourite, copy it and delete it. Momoto asks before a delete, and refuses it while the agent has running conversations or copies. #### Rename, turn off and on, favourite - **Rename**: open the agent's row and press «Rename». Each agent name is unique in the organization. - **Turn off**: the agent stops answering, and its conversation says so. Conversations that are running when you turn it off are interrupted. **Turn on** brings it back. - **Favorite**: press «Favorite» on the row. The agent moves to the top of the list. #### Copy «Copy» makes a new agent with the same instructions and skills. You own the copy. A copy of a sensitive agent waits for an approval first. #### Delete Press «Delete» and confirm. Momoto says how many conversations go with the agent. Deleting is refused when: - a conversation with the agent is running. Wait for it to finish, or stop it, then delete. - the agent has a copy. Delete the copy first. Only the owner can delete an agent. Deleting a sensitive agent waits for an approval. #### How it works (technical) - `PUT /api/v1/agents/{agent_id}/name` renames the agent (`momoto_api.routers.agents:rename_agent`). It needs the permission to configure the agent. - `PUT /api/v1/agents/{agent_id}/enabled` turns it on or off (`set_agent_enabled`). Turning it off interrupts the running sessions. - `POST` and `DELETE /api/v1/agents/{agent_id}/favorite` set and clear the favourite. - `POST /api/v1/agents/{agent_id}/clone` copies the agent. It needs permission to create agents, and the owner. - `DELETE /api/v1/agents/{agent_id}` deletes it (`momoto_api.routers.agents:delete_agent`). It needs admin capability, the owner, and a recent second factor (step-up `AGENTS:DELETE`). It is refused with `AgentHasRunningSessions` when a session is live, and with `AgentHasChildren` when copies exist. #### Videos of the real product - **Rename, turn off and on, favourite, copy and delete an agent** (1:14): https://momoto.io/docs/proof/act-02/2.13-agent-actions/clip.mp4 1. She makes a practice agent: name, what it does, «Create». Momoto opens its conversation 2. In Agents she opens its row and renames it 3. She turns it off. An agent that is off does not answer: its conversation says so 4. She turns it on again and marks it as favourite: it goes to the top of the list 5. She copies it: a copy appears with the same instructions and skills 6. She deletes the copy. Momoto asks first, and says how many sessions go with it 7. And she deletes the practice agent, with its conversation ### Change an agent's model and its fallback https://momoto.io/docs/#/p/agents/model Every agent runs on one AI model. You can change it for good, add a fallback for when the provider is overloaded, or pick a different model for a single message without touching the agent. #### Three ways to choose the model - **The agent's model**: On the agent's page, click the model tag (it shows «Default» when the agent has none of its own) and pick another. It stays until you change it again. - **Model and fallback**: In «Customize» › «Model chain» you set the model and, if you want, a «Fallback»: the model a turn switches to when the provider answers that the first one is overloaded. The next message tries the first model again. - **Only this message**: In the chat, the model picker next to the message box sets the «Model for this message». The agent's own model does not change; the picker goes back to «Default» after you send. The pickers list the models of the AI you connected, grouped by provider. The newest model of each Anthropic family carries a hint (*recommended*, *most capable* or *fastest, cheapest*), and older versions are folded under «Older versions». If no AI is connected, the picker says to connect one in «Your account» › «AI». #### What you will notice - **A change applies when the agent's container starts.** A container that is already running keeps the model it started with. The app says so when you save; restart the agent from the conversation to use the new model now. A model chosen for one message applies to that turn. - **«New version».** When a newer version of the agent's model exists, the tag shows a «New version» button. Momoto never moves an agent to a new model by itself, because cost and behavior would change; one click switches it. - **One provider per agent.** You cannot switch an agent to a model of another AI provider (for example from Anthropic to OpenRouter): the conversation it carries would break. The app says «That model belongs to another AI provider. Create another agent to use that provider.» - **The fallback is only between Claude models,** and it cannot be the same model. It switches on «overloaded», not on usage limits, billing, credentials or a model that does not exist. - A heavier model costs more per turn, and the agent's daily budget still applies. #### Who may change it - An agent with an owner runs on its owner's AI, so only the owner chooses its model. A colleague or an admin cannot. - On a shared agent (no owner), changing the agent's model needs «Edit agents» in its organization, and saving the model chain needs the models permission. Both are sensitive: Momoto may ask for your second factor first. - Choosing a model for one message needs no second factor: it is one turn, not a change to the agent. The same owner rule applies. #### How it works (technical) - The tag calls `PATCH /api/v1/agents/{agent_id}` with `{"model": "…"}`; an empty string returns the agent to the connected AI's default. The handler `update_agent_model` writes the model into the agent's persisted meta, and the spawn reads it from there. Errors: 422 when the id is not in the catalog, 409 `provider_change_not_allowed` when it belongs to another provider (`model_rejection`). - «Model chain» reads `GET /api/v1/agents/{agent_id}/model-chain` and saves with `PATCH`. The body is only `{"steps": [{"model_id": …}, {"model_id": …}]}`, two steps at most; any other field is rejected with 400 naming it. A chain with no saved steps starts on `claude-haiku-5-5`. - The GET answers `applied`, computed by `container_models_for_agent`, the same function the spawn uses. `applied.model` is `null` when the spawn would discard the chain (another provider than the agent's, an OpenRouter model outside the enabled list, an invalid id); the agent then keeps its normal model. - `container_models` keeps a fallback only when both models are Claude models and different: the agent image accepts one `--fallback-model`. - The per-message picker sends `model` in `POST /api/v1/chat/threads/{thread_id}/messages`; the API checks the same owner, catalog and provider rules, without step-up. - Every picker reads `GET /api/v1/llm/models`: the hints, `older` and `newer` come from there. See [Your AI](https://momoto.io/docs/#/p/account/your-ai). #### Videos of the real product - **Change an agent's model and its fallback** (1:42): https://momoto.io/docs/proof/act-02/2.07-model/clip.mp4 1. The coordinator works with Haiku, the cheapest model 2. For a planning job she raises it to Sonnet, with Opus as fallback if Sonnet is overloaded 3. She asks for the plan. This turn runs on Sonnet and costs more 4. With the planning done, she puts it back on Haiku 5. The next message already runs on Haiku ### The outside tools, from an agent's edit screen https://momoto.io/docs/#/p/agents/outside-tools An agent can use an outside tool, such as an API your organization mounts through the Executor. You give the agent a key from the tool's page, and the agent sees the tools the key allows. The agent never calls the outside API itself: Momoto relays each call. #### Connecting by hand - On the Executor's page, make a key for the agent. The Executor shows the key only once: copy it now. - In Momoto, open the agent and go to **Customize › MCPs**. - Paste the key and connect it. - The row lists the tools the agent gets. - Restart the agent so it takes the tools, then ask it for the outside data. It answers through the API you mounted. #### Disconnecting Disconnect the tool from the same screen. Momoto deletes the key, and it stops working. The agent loses those tools. #### Limits - A key pasted in an agent's own screen gives that agent everything the organization has mounted in the Executor. - Keys are kept in the vault and are not shown again. - Each call the agent makes through the relay is written to the audit log. #### How it works (technical) The web app is `packages/momoto-web/src/components/customize/McpSection.tsx`. It calls: - **`POST /api/v1/agents/{agent_id}/mcps/{mcp_id}/connect-api-key`**: Connects a connector that takes a pasted key. Handler `momoto_api.routers.mcp_oauth.connect_mcp_api_key`. - **`GET /api/v1/agents/{agent_id}/mcps/{mcp_id}/tools`**: The tools of a connected connector. 409 when it is not connected. - **`POST /api/v1/agents/{agent_id}/mcps/{mcp_id}/disconnect`**: Deletes the credentials. **The relay.** The agent's calls reach Momoto at `POST /api/v1/integrations/mcp`, handled by `momoto_api.routers.integrations.relay_mcp`, which forwards them to the outside tool. #### Videos of the real product - **The outside tools, from an agent's edit screen** (1:52): https://momoto.io/docs/proof/act-05/5.12-outside-tools-in-the-edit-screen/clip.mp4 1. On the Executor's page, Marisol makes a key for her assistant. It is shown once 2. In Momoto, «Customize › MCPs» of her assistant: she pastes the key and connects it 3. The same row lists the tools the agent gets 4. She restarts the assistant so it takes them, and asks it for the exchange rate. It answers with the API she mounted 5. Then she disconnects it from the same screen: the key is deleted and stops working ### Planning on a bigger model and keeping the plan in the organization https://momoto.io/docs/#/p/agents/plan-on-a-bigger-model Some work is worth a stronger model. You can raise an agent to a bigger model while you plan, have it write the plan into the organization's project, and then put it back on the cheaper model for the building. #### Steps - Open the agent, then **Customize › Model chain**. Choose the model in **Model**, for example a stronger one. - Restart the agent so the change applies. A running agent keeps the model it started with. - Ask the agent for the plan and name the project, for example «the plan of the CRM, in the project CRM». The agent keeps the plan in the project's memory. - When the plan is done, set the model back to the cheaper one, and restart the agent again. Building is usually work for the cheaper model. #### What to notice - The plan is kept with the organization's project, so people who work on that project can read it. - Your next message runs on the model you chose, once the agent has restarted. #### How it works (technical) The screen is `packages/momoto-web/src/components/customize/ModelChainSection.tsx`, the **Customize › Model chain** section. A new model applies when the agent's container starts. Restarting the agent is how you apply it. Notes for a project are saved in the organization's project memory through the agent's own tools. The plan is linked to the project you name. #### Videos of the real product - **Planning on a bigger model and keeping the plan in the organization** (2:23): https://momoto.io/docs/proof/act-04/4.02-plan-on-sonnet/clip.mp4 1. The CRM coordinator works with Haiku. To plan, Lucía raises it to Sonnet in «Customize › Model chain» 2. She asks for the plan of the CRM, kept in the organization's memory, in the project «CRM» 3. With the plan done, she puts it back on Haiku: building is work for the cheapest model 4. The next message already runs on Haiku ### Restrict what an agent can do https://momoto.io/docs/#/p/agents/restrictions In an agent's Security tab you can take away some of its powers, and ask for an approval before anyone starts, copies or deletes it. A change applies to the agent's next action. You do not need to restart it. #### Taking away a power - Open the agent, press «Customize», and choose **Security**. - Under **Capability restrictions**, untick the power you want to take away. The table shows each one as «Restrict «…»». - Press «Save». The three powers that take effect today are: - **Read memory**: The agent cannot read the memory. - **Write to the memory**: The agent cannot save notes to the memory. If it tries, it says so, and the refusal goes to the audit log. - **Launch swarms**: The agent cannot start other agents. #### Asking for an approval first Turn on **Ask for an approval before starting, copying or deleting it**. Then, when someone opens a conversation with the agent, copies it or deletes it, the action waits for an approval in your inbox. Reject it, and the action does not happen. Turn the switch off and the agent is back as it was. #### Who can change this (for admins) Changing the Security tab needs admin capability in the organization, and the owner of the agent. A member who is not an admin cannot change it. #### How it works (technical) - `GET /api/v1/agents/{agent_id}/security` and `PUT /api/v1/agents/{agent_id}/security` read and save the section. The PUT needs an If-Match header with the current version, admin capability and the owner. - The body includes `capability_overrides` (the restrictions), `propose_confirm` (the approval switch), `egress_allowlist` and `egress_chat`. - The restrictions Momoto applies are `spawn_agent`, `read_vault` and `write_vault` (`APPLIED_CAPABILITIES` in `momoto_core.services.capabilities`). #### Videos of the real product - **Restrict what an agent can do** (2:48): https://momoto.io/docs/proof/act-02/2.10-restrictions/clip.mp4 1. In «Customize › Security» she takes away the agent's permission to write to the memory 2. She asks it to save a note: the agent cannot, and says so 3. The audit log records that the agent was refused 4. She gives the permission back 5. The same request: now the note is saved 6. She turns on «Ask for an approval before starting, copying or deleting it» 7. In Agents she tries to copy it: the copy is not made, it waits for an approval 8. The request is in her approvals inbox. She rejects it 9. She turns the switch off: the agent is back as it was ### Share https://momoto.io/docs/#/p/agents/share An agent's owner can share it with other people in two ways: letting someone read her conversations with it, and letting someone send it requests or ask for a copy. Sharing never lets anyone make the agent work for them on the owner's AI and budget, and nothing reaches the agent's conversation without the owner's approval. #### Who can do what - **Can view**: Reads the owner's conversations with the agent, from start to end. Read only: there is nowhere to write. Tool calls and what they returned are not shown. Every reading is written to the audit log. - **Can request**: Leaves a request for the agent. The request enters the owner's conversation only when she approves it, marked as from outside. - **Request a copy**: Offered to someone under «Can request» whose role may create agents. It asks the owner for a copy of the agent. Administrators of the organization, and of the platform, can read the owner's conversations without being on the list. Nobody except the owner makes the agent work, not even an administrator. #### Sharing an agent (for the owner) - In the agent's conversation, or in «Agents», press «Customize» and choose **Access**. It shows who the agent is shared with. - Under «Can view», add the person's email and save. For requests, scroll to «With whom you share this agent» and add the person under «Can request». #### Reading someone's conversations In «Agents», the shared agent offers «View their conversations». Open the conversation to read it. You cannot write to it. #### Requesting something from an agent - Press «Request something» on the agent. Write what you need and attach up to three files of 10 MB each. - The request waits up to a week for the owner. You see whether it was approved; you see the agent's answer only if you can also view the owner's conversations. - An approved request gives you the files the agent made for you. #### Deciding what reaches the agent (for the owner) Requests appear above the box in your conversation with the agent. Approve a request and it enters the conversation like a message of yours, marked as from outside. Your agent answers it with your AI and on your budget. Until you approve, nothing reaches the agent. #### Requesting a copy «Request a copy» asks the owner for a copy under a name you choose. The copy carries the agent's instructions, skills and model. The owner's files travel only if she includes them, and never its keys, its connections or her conversations. The owner approves the copy from her conversation. If the agent has a sensitive skill, an administrator signs the copy in the same step. The copy is yours: it runs on your AI and starts with no conversations. #### How it works (technical) - Sharing: `PUT /api/v1/agents/{agent_id}/sharing` takes the lists of people (`viewers`, `requesters`). Only the owner sees the lists. - Reading: `GET /api/v1/agents/{agent_id}/shared/sessions` and `GET /api/v1/agents/{agent_id}/shared/sessions/{session_id}` return conversations read-only, without tools. Each reading is audited. - Requests: `POST /api/v1/agents/{agent_id}/requests` lists, approves and rejects them. A request waits up to 7 days; a finished one is kept for 24 hours. A person can have up to 5 pending requests, with up to 3 files of 10 MB each. - Copies: `POST /api/v1/agents/{agent_id}/clone-requests` asks for a copy. The owner approves it with `.../clone-requests/{request_id}/approve`. The owner's files are included only when `include_files` is true; it defaults to false. #### Videos of the real product - **Sharing an agent: who reads your conversations** (0:34): https://momoto.io/docs/proof/act-07/7.12a-marisol-lets-tomas-read/clip.mp4 1. In the conversation with «Quetzal Coordinator», she opens «Customize › Access», where it says who it is shared with 2. Under «Can view» she adds Tomás's email and saves - **Reading someone else's conversations with their agent** (0:29): https://momoto.io/docs/proof/act-07/7.12b-tomas-reads-her-conversations/clip.mp4 1. In «Agents», Marisol's «Quetzal Coordinator» has «View their conversations» 2. He opens her conversation and reads it, start to end. There is nowhere to write to it 3. In «Your account › My vault» there is only what is his: Marisol's vault belongs to nobody else - **Sharing an agent: who may ask it for things** (0:33): https://momoto.io/docs/proof/act-07/7.13a-marisol-lets-tomas-ask/clip.mp4 1. In her coordinator's «Customize › Access», she goes down to «With whom you share this agent» 2. Tomás already reads her conversations. Now she also adds him under «Can request» and saves - **Asking someone else's agent for something** (0:18): https://momoto.io/docs/proof/act-07/7.13b-tomas-asks-her-agent/clip.mp4 1. In «Agents», Marisol's coordinator now also has «Request something» 2. Below are his requests: both are waiting for the owner - **The owner decides what reaches her agent** (0:17): https://momoto.io/docs/proof/act-07/7.13c-marisol-approves-and-rejects/clip.mp4 1. In her conversation with the coordinator, above the box, Tomás asks for something and brings a file 2. She reads the answer and downloads the file her agent made - **What happened to what you asked for** (0:37): https://momoto.io/docs/proof/act-07/7.13d-tomas-sees-the-answer/clip.mp4 1. In his notices: one request approved and one not 2. In «Agents › Request something» each request says how it ended, and from the approved one he downloads the file the agent made for him 3. In «View their conversations» he finds his request and the agent's answer, with the IVA per client - **Asking for a copy of someone else's agent** (0:31): https://momoto.io/docs/proof/act-07/7.14a-tomas-asks-for-a-copy/clip.mp4 1. In «Agents», Marisol's «Quetzal Coordinator» now offers him «Request a copy» 2. He names his copy «Tomás's Coordinator» and asks for it 3. Below it, his request waits for Marisol - **Approving a copy of your agent** (0:29): https://momoto.io/docs/proof/act-07/7.14b-marisol-approves-the-copy/clip.mp4 1. In her conversation with «Quetzal Coordinator», Tomás asks her for a copy. The card says what it would be called, whose it would be and that her files stay with her 2. She leaves her files out and approves it. The coordinator is a sensitive agent and she is an administrator: she signs the copy in the same step, confirming once that it is her - **A copy that needs a signature to talk** (0:26): https://momoto.io/docs/proof/act-07/7.14c-tomas-tries-his-copy/clip.mp4 1. In his notices: Marisol approved his copy 2. In «Agents» he now has his «Tomás's Coordinator»: it is his, next to his assistant 3. He presses «Converse» and it does not open: it asks for an approval and sends him to «Approvals», which he does not have - **Signing someone else's session with a sensitive agent** (0:18): https://momoto.io/docs/proof/act-07/7.14d-marisol-signs-his-session/clip.mp4 1. In «Approvals»: Tomás asks to start a session with his copy, which has a sensitive skill. She signs it - **Your copy of an agent, with your AI** (0:47): https://momoto.io/docs/proof/act-07/7.14e-tomas-talks-to-his-copy/clip.mp4 1. In «Agents» he now has his «Tomás's Coordinator»: it is his, next to his assistant 2. He talks to it for the first time: whose copy it is, what it brought and what it is missing - **Making the copy yours: instructions, keys and who it is shared with** (1:03): https://momoto.io/docs/proof/act-07/7.14f-tomas-customizes-his-copy/clip.mp4 1. In «Customize › Instructions» he adds a line of his own at the end 2. He saves, confirming it is him 3. In «Keys» he gives it the key of his invoicing service: the value is never shown again 4. In «Share» he lets Marisol read his conversations with the copy ### Turn skills on and off; a sensitive skill asks for approval https://momoto.io/docs/#/p/agents/skills Skills are what an agent knows how to do. You switch them on and off for each agent, and the change takes effect on the agent's next answer, without a restart. A sensitive skill needs an approval the first time it is switched on. #### Turning a skill on or off - Open the agent, press «Customize», and choose **Skills**. - Tick the skills you want and untick the ones you do not. - Press save. The agent reads the change when it starts its next answer. You do not restart it. An agent that has skills cannot be saved with none. Keep at least one. #### Sensitive skills A sensitive skill needs an approval the first time you switch it on. Save, and the approval waits in your inbox at the top. Open it and approve it. Then return to Skills, tick the skill again and save; this time it is saved. #### How it works (technical) - `GET /api/v1/skills/` lists the skills in the catalog. - `PUT /api/v1/agents/{agent_id}/skills` (`momoto_api.routers.customize:put_agent_skills`) needs an `If-Match` header and the permission to configure the agent (owner or admin). Each skill must be in the catalog; an unknown one is refused. - The use case, `momoto_core.usecases.update_agent_skills`, asks for an approval when a sensitive skill is newly added. The resource is `update_agent_skills`. Removing a skill and keeping one already on do not ask. - The change is written to the audit log as `agent_updated` with the section `skills`. #### Videos of the real product - **Turn skills on and off; a sensitive skill asks for approval** (2:21): https://momoto.io/docs/proof/act-02/2.08-skills/clip.mp4 1. She asks her coordinator for the version of its sandbox skill 2. In «Customize › Skills» she turns it off and saves 3. The agent no longer has it 4. She turns it on again and also ticks momoto-spawn-agent, a sensitive skill 5. The sensitive skill waits for an approval. She gives it herself, in her approvals inbox 6. Back in Skills she ticks the same and this time it saves 7. The agent has the sandbox skill again ### Swarms https://momoto.io/docs/#/p/agents/swarms A swarm is a plan that several agents carry out together, one step at a time. Your coordinator writes the plan, and you run it in Swarms on behalf of one of your agents. Each run shows what each step did, what it cost, and which AI it thought with. #### Before you start - Ask an agent to write the plan in a conversation. The agent uses the `momoto-workflow-author` skill to write it. - A swarm runs on behalf of one agent, and it never has more permissions than that agent has. - Each step is a throwaway container. It thinks with the AI of the agent's owner. #### Running a plan - Copy the plan the agent wrote. - Open **Swarms** and press **Run a plan**. - Choose the agent the run is on behalf of, paste the plan and start it. The card shows each step as it runs: who ran it, how long it took, what it cost against the budget and which AI it thought with. Open a step to see its result. #### Cancel and resume - **Cancel** stops a run that is going. - If a failure of the system cuts a run (for example, the API restarts while it runs), the card shows **Interrupted**. **Resume** continues it, without repeating the steps that already finished. - Only the person who started a run can resume it. Resume uses that person's AI. For anyone else the server refuses it. #### Limits - A plan cannot ask for more than the launching agent may do. Raising the budget or the time limit of a run above the defaults needs the `WORKFLOWS:UPDATE` permission. #### How it works (technical) The screen is `packages/momoto-web/src/views/Runs.tsx`. It calls: - **`POST /api/v1/runs`**: Launches a plan. Answers 202. Handler `momoto_api.routers.runs.launch`. - **`GET /api/v1/runs`, `GET /api/v1/runs/{run_id}`, `/events`**: The list, the card and the event stream. - **`GET /api/v1/runs/{run_id}/results/{path}`**: The result of one step. Handler `momoto_api.routers.runs.result`. - **`POST /api/v1/runs/{run_id}/cancel`**: Stops the run and its containers. - **`POST /api/v1/runs/{run_id}/resume`**: Continues an interrupted run. Only the launcher; anyone else gets 403 `not_launcher`. Handler `momoto_api.routers.runs.resume`. - **`POST /api/v1/runs/{run_id}/approve`**: Approves a run that waits for a signature. Needs `WORKFLOWS:APPROVE`, and the approver is not the launcher. **Ceiling.** `momoto_core/usecases/launch_workflow.py` checks the plan against the launcher's ceiling. The ceiling is the permissions of the person and of the agent, so a run cannot widen them. A budget or time limit above the defaults requires `WORKFLOWS:UPDATE`. #### Videos of the real product - **A swarm: a plan for several agents, step by step** (2:51): https://momoto.io/docs/proof/act-02/2.28-swarm/clip.mp4 1. She asks the coordinator for a plan: two agents at once and a third that joins what they did 2. She copies the plan and runs it in «More › Swarms», on behalf of that agent 3. The card shows each step as it runs: who, how long it took, what it cost and which AI it thought with 4. She opens the result of each step 5. She launches the same plan again and cancels it midway 6. A third run. This time Momoto's service is cut abruptly halfway, as in a power cut 7. Back in Swarms the run was left interrupted. «Resume» continues it without repeating what was already done - **Tomás runs the month's close** (1:38): https://momoto.io/docs/proof/act-07/7.17b-tomas-runs-his-close/clip.mp4 1. He asks his coordinator for the plan of the November close: eight steps, one after the other 2. He runs it in «More › Swarms», on behalf of that agent 3. His agent works step by step: the card shows each one as it ends 4. While his agent works, his session ends and Momoto takes him back to the sign-in 5. He tries to sign in again: Momoto tells him his account is not active ### Give an agent a task, and a task that repeats https://momoto.io/docs/#/p/agents/tasks A task is a piece of work you hand to an agent: a title and an objective. It runs in a session of its own, under that agent, and you can read the objective and the agent's answer when it ends. An agent can also keep a recurring task for you, which it makes, pauses and changes when you ask it in a conversation. #### Before you start - A task needs an agent to run it. A task without one cannot start. - If the agent holds a sensitive skill, starting its session needs an administrator's approval first. The task waits until someone approves it. - A recurring task belongs to the agent and to the conversation where you asked for it. You manage it by asking the agent, or in **Customize › Tasks** if you own the agent. #### Giving a task - Open the conversation with the agent and choose **More** › **Give a task**. - Write a **Task title** (up to 120 characters) and a **Goal** (up to 2000 characters). The goal is what the agent should do. - Press **Create task**. Momoto tries to start the task straight after it is created. If the start is refused, the task stays in the list under its agent and a notice says why. Open its row and run it again once the reason is gone. #### What you will notice - A finished task opens as a session of its own, with the objective and the agent's answer. - **Advance status** on the task moves its marker to the next step: pending, running, done, and back to pending. It only records where the task stands. - A recurring task shows up under **Tasks** in the agent's Customize, with its next run and how often it repeats. **Limits.** Two runs of a recurring task are at least 5 minutes apart. A session keeps up to 10 active tasks. The repeat rule can be up to 256 characters. #### Recurring tasks Ask the agent in a conversation, in plain words, for example «every working day at 9:00 summarize the new deals». The agent makes the task. To change it, ask again: pause it, resume it, move it to another time, or cancel it. Times follow the time zone saved for you. Without one, they follow the time zone the installation uses. #### How it works (technical) **Giving a task.** The dialog is `packages/momoto-web/src/v2/dialogs/TaskDialog.tsx`. It calls `POST /api/v1/tasks/` with `entity`, `title`, `objective` and `assignee_agent_id`. If an agent is set, it then calls `POST /api/v1/tasks/{task_id}/run` (`momoto_api.routers.tasks.run_task`). A refused run keeps the task as a row and shows the reason in a toast. - **422**: The task has no agent to run it. - **409 `approval_pending`**: The agent holds a sensitive skill and no approval exists yet. **Approval.** `SpawnAgent._agent_needs_approval` in `momoto_core/usecases/spawn_agent.py` decides whether the agent needs approval before a session starts. Sensitivity comes from `is_sensitive` in `momoto_core/usecases/_sensitivity.py`. Until the approval is given, the start is refused. Run the task again after the approval. **Status.** `PATCH /api/v1/tasks/{task_id}` sets the status. The rail's «Advance status» cycles through the values in `packages/momoto-web/src/lib/taskStatus.ts`. **Recurring tasks.** The agent creates them inside its harness. The web app lists them with `GET /api/v1/sessions/scheduled-tasks?agent_id=` and changes them with `POST /api/v1/sessions/{session_id}/scheduled-tasks/{task_id}` (`momoto_api.routers.sessions.change_scheduled_task`). The body names an `action`: `pause`, `resume`, `cancel`, `run_now` or `update`. `pause` and `cancel` do not check the agent's access; the other actions do. **Limits and settings.** `nanoclaw/src/modules/scheduling/limits.ts`: the minimum gap is 5 minutes (`MOMOTO_SCHEDULE_MIN_INTERVAL_MIN`), up to 10 active tasks per session (`MOMOTO_SCHEDULE_MAX_ACTIVE_TASKS`), and the expression is up to 256 characters. **Time zone.** `nanoclaw/src/modules/scheduling/recurrence.ts` reads the cron expression in the zone of the session's person. Without one, the install zone applies (`nanoclaw/src/session-timezone.ts`). #### Videos of the real product - **Give an agent a task, and a task that repeats** (2:22): https://momoto.io/docs/proof/act-02/2.14-tasks/clip.mp4 1. In the conversation, «More actions › Give a task»: a title and the objective 2. The task waits under its agent, in the list of conversations. She runs it 3. Starting this agent asks for an approval. She gives it in her inbox and runs the task again 4. The task runs in a session of its own: there are the objective and the agent's answer 5. With «Advance status» she marks it as done 6. Back in the conversation, she asks for something every working day at 9:00 7. She asks it to pause it 8. And to move it to 8:30 and resume it 9. In the end she asks it to cancel it ### An agent's version history, and going back to an earlier one https://momoto.io/docs/#/p/agents/versions Each saved change to an agent's instructions becomes a version. The version history lists them, with who made each change and when. You can go back to an earlier version. Going back erases nothing: it writes a new version with the old content. #### Reading the history Open the agent in «Agents» and press «Version history». Each saved change is listed with the person who made it and the time. Each version has a number, such as 0.1.11. Only administrators see «Version history». #### Going back to an earlier version - In «Version history», pick the version you want. - Confirm. Momoto writes a new version with that content. The agent answers the next message in the old way. Conversations keep their earlier answers. Nothing is deleted. Only the owner can go back, and Momoto asks you to confirm it is you. #### How it works (technical) - `GET /api/v1/agents/{agent_id}/versions` lists the versions. It needs admin capability. - `POST /api/v1/agents/{agent_id}/versions` publishes a version by hand. - `POST /api/v1/agents/{agent_id}/versions/{version}/rollback` writes a new version with the content of the chosen one (`momoto_api.routers.agents:rollback_agent_version`). It needs the owner and a recent second factor (step-up `PROMPT:UPDATE`). #### Videos of the real product - **An agent's version history, and going back to an earlier one** (1:20): https://momoto.io/docs/proof/act-02/2.12-versions/clip.mp4 1. Its instructions ask for 3 bullets. She changes them to five and saves 2. The agent already answers in five bullets 3. In Agents, «Version history» lists every saved change, with who and when 4. She goes back to the version before, 0.1.11, and confirms 5. The same question: the agent answers in 3 bullets again ### Resuming an interrupted swarm https://momoto.io/docs/#/p/swarms/resume A swarm is a run of several steps. If a restart or a failure interrupts it, its finished steps are kept and the run waits. Its launcher can resume it, and only the missing steps run. #### What you will see - In **Swarms**, an interrupted run shows a note that the system stopped it, and a **Resume** button. - The steps that finished are still there. You do not run them again. - When the missing steps finish, the run completes. Open its note for management. #### Who can resume - Only the person who launched the run can resume it, and only with their own AI connection. - You need permission to create swarms. If your permissions changed since the launch, Momoto checks the whole run again against them, and resuming may be refused. - Another admin cannot resume someone else's run from the same button. The request is refused. #### How it works (technical) The button is in `packages/momoto-web/src/components/WorkflowCard.tsx`. It shows only when the run is `pending`, has steps, and the signed-in user is its launcher and holds `WORKFLOWS:CREATE`. It calls `POST /api/v1/runs/{run_id}/resume`, served by `momoto_api.routers.runs.resume`. The router refuses anyone who is not the launcher with 403 and `not_launcher`. The resume runs in the background and returns the run at once. The use case re-measures the whole manifest against the launcher's current permissions. The finished steps are kept by the run's own bookkeeping, so only the steps still missing run. #### Videos of the real product - **Resuming an interrupted swarm** (0:46): https://momoto.io/docs/proof/act-07/7.17e-tomas-resumes-his-close/clip.mp4 1. He can sign in again: his email, his password and his code 2. In «Swarms» he opens his close: the steps that finished are still there and the swarm waits. He presses «Resume» 3. The missing steps run, one after another, and the close finishes. He opens the note for management ### An agent gets the way into a server https://momoto.io/docs/#/p/tools/a-server-over-ssh An agent can enter a server over SSH to check it and change it. This guide follows Iván, who gives an agent the way into a new cloud server. The key never leaves his computer: the agent only gets a way to sign with it. #### Before you start - You need a project, the server's address and user, and the private key its provider gave you. - Add the connection in the project's **Operations**, under Connections. Upload the key as a `.pem` file. Creating it asks for an approval, which you give yourself. - Then make the agent for that project, so it is born with the connection. #### Making the agent - Give the agent its instructions and a daily spending cap. - Under **Customize › Skills**, take away what it will not use. An agent for servers does not need to make apps. The agent has no `ssh` program at first. It asks for one; you approve, and Momoto rebuilds its image. #### What you will notice - The agent enters the server and reports what it finds. In the recorded run, a brand-new Ubuntu with neither Docker nor Node. - The key stays in an `ssh-agent` on your computer. The agent's container gets only the socket that signs with it. - To cut access, close the connection. The agent loses it at its next start. #### How it works (technical) The connection is the one described in [Connections for a project](https://momoto.io/docs/#/p/tools/connections): `POST /api/v1/projects/{project_id}/connections` with `conn_type` set to `ssh`. The agent is created with `POST /api/v1/agents/` in the same project; it gets the project's connections when it starts. #### Videos of the real product - **An agent gets the way into a server** (2:53): https://momoto.io/docs/proof/act-07/7.01-an-agent-gets-the-way-into-a-server/clip.mp4 1. In «Agents › Projects» Iván opens his project's connections and adds one over SSH to the new server: its name, its address, the user and the key, uploaded as a .pem file 2. Creating a connection asks for an approval. He gives it himself, confirming it is him 3. Then he makes an agent for the servers in that same project: «Infra», with its instructions and a daily cap 4. In «Customize › Skills» he takes away what it will not use: this agent makes no apps 5. The agent is born with its project's connection. It lacks the ssh program: it asks for it 6. The agent enters the server and says what it has: a brand-new Ubuntu, with neither Docker nor Node ### A Docker of its own for the agent: it asks, she approves, and she ends it when she wants https://momoto.io/docs/#/p/tools/agent-docker Some work needs Docker: building an image or running a container. An agent never gets your computer's Docker. It can ask for a Docker of its own, which runs apart from everything else, for a time you approve. You end it when you want. #### Before you start - The agent asks for its Docker when it needs one. You do not start it from the screen. - The request comes to your inbox. It says what the Docker is for, how long it is asked for, and that it does not touch your computer's Docker. - The agent asks for between one and 24 hours. Nothing starts until you approve. #### What you will see - In **More › Sandbox** the agent's Docker is listed: which agent it belongs to and how much time it has left. - Its containers and images live only in that Docker. They are not on your computer's Docker. #### Ending it Choose to end it early in **More › Sandbox**. Momoto asks first, because ending it deletes everything the agent's Docker holds: its containers, its images and its files. The deletion runs in the background. It finishes within about a minute. If the time runs out, it ends and is deleted the same way. #### Limits - If the agent's internet access is limited to a list, the request is refused. The agent is told why. - A Docker that is not ended in time is cleaned up by Momoto on its next pass. You do not need to remove anything yourself. #### How it works (technical) The agent's request goes through the NanoClaw harness (its `request_docker` tool, with approval). Once you approve, the harness starts a separate, unprivileged Docker daemon in a container of its own, with its own volume and work folder. The agent's containers never run `--privileged`. When the time is set, the harness writes the expiry into the Docker's `active` file. A sweep then deletes the daemon, its volume and its work folder when the time has passed. - `GET /api/v1/devenvs/private-docker` lists them. - `POST /api/v1/devenvs/private-docker/{agent_id}/shutdown` ends one. It answers **202**: the shutdown sets the expiry, and the sweep removes it on its next pass. #### Videos of the real product - **A Docker of its own for the agent: it asks, she approves, and she ends it when she wants** (1:43): https://momoto.io/docs/proof/act-02/2.20-own-docker/clip.mp4 1. She asks for something that needs Docker. The agent does not have it: it requests one for two hours 2. The request reaches her inbox: it says what it is, for how long, and that it does not touch the computer's Docker. She approves it 3. The agent now has Docker: it runs a container and builds an image of its own 4. In «More › Sandbox» is its Docker: which agent it belongs to and how much time it has left 5. She ends it early. Momoto asks first: everything it holds is deleted ### A project's connections: a server over SSH and a database, without handing the agent the key https://momoto.io/docs/#/p/tools/connections A project can hold connections: a login to a server over SSH, or a database. Its agents use them without being handed the key themselves. You add and manage them in the project's Operations, under Connections. #### Before you start - Open **Agents › Projects**, choose the project, then **Operations** and its connections. - Creating a connection asks for an approval first. You give it yourself, so the one who approves must be you. - The agent's image has no SSH or PostgreSQL client. If an agent needs one, it asks; you approve, and Momoto rebuilds that agent's image with it. #### What each field means - **Name**: How the connection is called in the project. Must be unique in the project. - **Type**: SSH, database or VPN. - **Address and port**: Where the server or database is. A test server on the same machine uses that machine's own address. - **Engine and database**: For a database: the engine (for example PostgreSQL) and the database name. - **User**: The login used on the server or database. - **Key or password**: For SSH, the private key, uploaded as a `.pem` file. For a database, the password. #### Closing and deleting - **Close** turns the connection off. The agent can no longer enter that server, but other connections keep working. You can open it again later. - **Delete** removes the connection and the secret stored with it. A change reaches an agent when its conversation restarts. To cut one off right away, close the connection; the agent loses it on its next start. #### Installing what an agent needs When an agent asks for a program such as `ssh` or `psql`, the request reaches your inbox. Approve it and Momoto rebuilds that agent's image. If the build fails, nothing is added, and the agent can ask again. #### How it works (technical) The routes are under `/api/v1/projects/{project_id}/connections`: `GET` and `POST` on the collection, and `PATCH` (body `{"enabled": …}`) and `DELETE` on `/{name}`. - `create_connection` is propose-and-confirm: the first call is held for an approval, and the approved request completes the create. - A connection is revoked, not just hidden, when it is closed: the change takes effect at the agent's next spawn. A running conversation is told to restart so the change applies live. - `DELETE` revokes the connection and deletes its stored secret. - For SSH, the key is loaded into an `ssh-agent` that runs on your computer, one per group (`pre-session-ssh.sh`). The agent's container gets only the socket at `/momoto/ssh-agent.sock`, which signs requests with the key. The key itself is not mounted. #### Videos of the real product - **A project's connections: a server over SSH and a database, without handing the agent the key** (3:53): https://momoto.io/docs/proof/act-02/2.23-connections/clip.mp4 1. In «Agents › Projects» she opens «Operations» and its connections. It has none yet 2. An SSH connection to the warehouse server: name, address, user, and the private key, uploaded as a .pem file 3. Creating a connection asks for an approval. She gives it herself, confirming it is her 4. A connection to the sales database: engine, address, database, user and password 5. The connections reach the agent when its conversation restarts. It lacks the programs to use them: it asks for them 6. The request for packages reaches her inbox. She approves it and Momoto rebuilds that agent's image 7. The agent enters the server over SSH and queries the database 8. She closes the SSH connection from the same window 9. In a restarted conversation the agent can no longer enter that server. The database is still open ### A folder of her computer for the agent https://momoto.io/docs/#/p/tools/folders You can give an agent a folder of your own computer, so it can read the files in it and write new ones. Momoto never mounts the folder into the agent's container. A small helper on your computer serves it, and only inside the folders you allowed when you installed the helper. #### Before you start - Install the folder helper once, in a terminal, and name the folders it may serve. Nothing is served outside them. - Open the agent under **Agents**, then **Folders**. Type the folder's path and connect it. On a Mac the button opens the system's folder window; on Linux and on a server you type the path. - Momoto asks you to confirm it is you before it connects a folder. ``` # once: install the helper, and say which folders it may serve $ MOMOTO_CONNECTOR_ROOTS="$HOME/Momoto-folders" momoto-connector/install.sh 2>&1 | grep -v "^{" $ docker compose up -d momoto-api 2>&1 | tail -1 $ systemctl --user is-active momoto-connector ``` #### What the agent can do - It reads and writes the files of the folder you connected, as a tool. - Anything it writes is on your disk, in that folder. #### Limits and refusals - The helper refuses any path outside the folders it was installed with. - It also refuses Momoto's own folders, where its keys live. If you try to connect one, you get the helper's reason. - Disconnecting takes the folder away from the agent. A conversation that is already running keeps it until it restarts; after that the agent can no longer read it. #### How it works (technical) The routes are under `/api/v1/agents/{agent_id}/folders`: `GET` lists them, `POST` connects one (body with the `path`), `DELETE` disconnects one, `GET …/folders/tree` browses, and `POST …/folders/pick` opens the picker on the computer. Connecting and picking need permission to change the agent, ownership, and a recent second-factor check. Disconnecting does not ask again. - The helper is reached at `MOMOTO_CONNECTOR_URL` (default `http://host.docker.internal:8799`), with `MOMOTO_CONNECTOR_TOKEN`. If it is not running, the call answers 503. - `MOMOTO_CONNECTOR_ROOTS` lists the roots the helper serves: `organization=/route`, or a plain route that belongs to the host. - The folder is served to the agent as a tool, named after a hash of its path. It is not a bind mount. #### Videos of the real product - **A folder of her computer for the agent** (3:04): https://momoto.io/docs/proof/act-02/2.25-folder/clip.mp4 1. In the terminal, once: she installs the folder helper and tells it inside which folder it may serve 2. In «Agents» she opens her agent and «Folders». She types the folder's path and connects it; Momoto confirms it is her 3. The agent reads a file in that folder and writes another 4. The file the agent wrote is on her disk 5. She tries to connect Momoto's own folder, where its keys live: the helper refuses it 6. She disconnects the folder. In a restarted conversation the agent no longer has it 7. The agent can no longer read it ### A repository for the agent: Momoto keeps the token, not the agent https://momoto.io/docs/#/p/tools/repository An agent can read and change a Git repository on GitHub, GitLab or Bitbucket. You give Momoto the access token once, under Customize › Keys. Momoto keeps the token and attaches it to the agent's requests, so the agent never has to hold it. #### Before you start - Open the agent and go to **Customize › Keys**. The block called **Repository** is where you connect it. - You need permission to change agents, and the agent must be yours. - You enter a user name and a token. The token is typed masked, and Momoto never shows its value again. - Momoto accepts three hosts: `github.com`, `gitlab.com` and `bitbucket.org`. Bitbucket is the default. #### What you will notice - Before a token is connected, GitHub or the other host answers as it would to anyone with no login. - After you connect, the same request is made with the token. A change can take up to about a minute to reach an agent that is already running. - Use a token with only the access the agent needs. A private repository needs a token that can read it. #### Disconnecting Choose to disconnect in the same section. Momoto asks first. After that, the agent is back where it started: it can reach only what the host gives anyone. #### How it works (technical) The routes are `GET`, `POST` and `DELETE /api/v1/agents/{agent_id}/repo-connection`. The body of `POST` is `username`, `app_password` and `host` (default `bitbucket.org`). A host other than the three above is refused with 422. - Each agent has one token per host. Connecting again replaces it. - The token is stored in the credentials gateway (OneCLI) as a generic secret, and sent as an HTTP Basic `Authorization` header to that host only. - `DELETE` takes `?host=`; it answers 204. - If the gateway is down, `POST` answers 502 with `onecli_unavailable`. `GET` reports the connection as unavailable instead. - Each connect and disconnect is written to the audit log as `repo_auth`. #### Videos of the real product - **A repository for the agent: Momoto keeps the token, not the agent** (2:29): https://momoto.io/docs/proof/act-02/2.24-repository/clip.mp4 1. She asks it to read a repository. There is no credential yet: GitHub answers as it would to anyone 2. In «Customize › Keys», below, is «Repository»: the service, the user and the token, typed masked 3. The same command, a minute later: now GitHub receives a token the agent never saw and, as it is made up, refuses it 4. She disconnects it from the same section. Momoto asks first 5. A minute later the agent is back where it started ### Sandbox: throwaway databases to try things, the agent's and hers https://momoto.io/docs/#/p/tools/sandbox A sandbox is a throwaway service you or an agent starts to try something: a PostgreSQL or Redis database, or a mock. It stops by itself when its time is up, so you can test a query or a change without touching real data. #### Before you start - You can start a sandbox for yourself from **More › Sandbox**. The list shows your own services. Services that belong to other people are only shown to those who have permission to see them, which by default is admins. - A sandbox has a fixed catalogue of templates: **PostgreSQL**, **Redis** and **Mock**. You cannot install your own image here. - There is a limit on how many services one session may run at the same time (five). #### The form and the list - **Template**: What the service is: PostgreSQL, Redis or Mock. - **Time**: How long it lives: 15 minutes, 30 minutes (the default), 1 hour or 4 hours (the longest). Each service in the list shows its name, its template, whose it is and how much time it has left. #### What the agent gets An agent does not get the address in the chat. Momoto writes the service's address into a file the agent reads. A service you start from the screen reaches an agent when its conversation is opened or restarted. You do not have to pass it any address. When the agent asks for a throwaway database, it gets one the same way, and you see it in the same list. #### Turning a service off - A service you own turns off at once when you choose **Turn off**. There is no question first. - A service that belongs to someone else asks you to confirm before it is turned off. - When the time runs out, the service turns itself off. Nothing has to be done. Data in a sandbox is gone when it stops. Do not keep anything there that you need to keep. #### How it works (technical) The screen calls `POST /api/v1/devenvs` to start a service. It answers **202**, so the service is provisioned in the background. The handler is `momoto_api.routers.devenvs:provision_devenv`; `destroy_devenv` turns one off. `GET /api/v1/devenvs/containers` lists what is running. - The time is capped at four hours. - The agent reaches a service through the host named by `MOMOTO_DEVENV_AGENT_HOST` (default `host.docker.internal`). Set it to a name that resolves for the agents when the Docker daemon is remote. - The address is written into the agent's environment file when the service is provisioned. That is why the agent sees it on its next start, and not earlier. #### Videos of the real product - **Sandbox: throwaway databases to try things, the agent's and hers** (2:15): https://momoto.io/docs/proof/act-02/2.19-sandbox/clip.mp4 1. She asks the agent for a throwaway database to try a query 2. In «More › Sandbox» it is alive: its name, its template, whose it is and how much time it has left 3. She starts another one from the form: a Redis for 15 minutes 4. The agent sees it as soon as its conversation restarts: she hands over no address 5. Back in Sandbox, she turns both off ### Agents use them https://momoto.io/docs/#/p/integrations/agents-use-them Once an agent has a tool, it can use it in its conversations. Reading goes through at once. Anything that changes something outside Momoto, such as a post in Slack, waits until a person approves it, and every call is written to the audit log. #### What you will notice - **Reading** goes through without asking. - **Changing something outside** stops. The request appears as a card in approvals, under «Pending approval». Approve it or reject it there. - The agent's turn can end while the request waits. When you approve, the agent wakes up and finishes the job. A rejected request is not sent. - An agent given **Read only** never gets the posting tool, so it has nothing to post with. #### What is recorded Every call an agent makes to a tool is written to the audit log with the agent and the tool it used, and whether it worked. You can see what each agent did and when. #### Try it - Open the conversation with the agent. Restart the agent so it takes its tools. - Ask it to read the channel. It reads at once. - Ask it to post. The post waits for approval. - Approve it from approvals. The agent continues, and its next read shows its own message. #### A member's own tools (for admins) When a member mounts tools on their own Momoto, their agents use those tools through that Momoto, and their calls are written to that Momoto's audit log. The hub does not see them. See [Turn on the outside tools](https://momoto.io/docs/#/p/integrations/turn-on) for the setup. #### How it works (technical) The agent calls `POST /api/v1/integrations/mcp` with its bearer key. The relay audits each `tools/call` as a `tool_call` event with the agent, the tool, the apps and the status (`ok`, `error` or `auth`). It forwards the call to the Executor after the platform gate. The platform gate always holds the `execute` meta-tool, holds `call` on paths that are not trusted, and holds unknown meta-tools. Search, describe and skill lookups are not held. A held call creates an approval. The agent cannot approve it; only a person's decision on the approval releases the call, and a rejection ends it. #### Videos of the real product - **Agents use the tools** (2:39): https://momoto.io/docs/proof/act-05/5.08-agents-use-the-tools/clip.mp4 1. She opens the conversation with the coordinator, restarts it so it takes its tools, and asks it to read the channel 2. She asks it to post a message. Reading goes through; posting stops until a person approves it 3. The approval card reaches the bell. Marisol approves it, and the agent wakes up and finishes 4. She asks it to read again: it now sees its own message in the channel 5. Her assistant can only read Slack: she asks it to post, and it has nothing to post with - **A member's agent uses his own outside tools** (2:47): https://momoto.io/docs/proof/act-05/5.11c-diegos-agent-reads-slack/clip.mp4 1. In «Customize › Import skill» of «Integrations», he uploads quetzal-resumen-slack.zip 2. The security review lets it through and it is signed. In Skills, it is on for «Integrations» 3. He restarts it so it takes the skill and Slack, and asks for the channel's digest ### Connecting an API of your own, with no code https://momoto.io/docs/#/p/integrations/connect-my-own-api «Connect my API» turns an OpenAPI 3 specification into a tool your agents can use, without writing code. You give a name and the specification, check what it brings, and mount it. Anything that changes data asks a person before it runs. #### Before you start - You need the address of an OpenAPI 3 specification, or its text. The API it describes must have an `https` server address. - You need to be an administrator of the installation, with the Executor on. - Know whether the API needs a key. If it does, have it ready for the third step. #### The four steps - **Explain.** The assistant says what it will ask for. - **Describe it.** Give the name and the specification, by its address or pasted. An address that is not a specification is refused, and the reason is shown. - **Access.** If the API needs a key, give it here. The key goes straight to the vault and is not shown again. - **Mount.** Read the summary, then mount. **Test connection** comes before this and only reads: nothing is mounted until this last step. #### What your agents may do An API mounted this way starts **gated**. Agents read freely. Any operation that creates, changes or deletes asks a person first, every time, and the request waits in approvals. You can see the summary before you mount: it says which operations read and which write. #### Limits and mistakes - A specification that is not OpenAPI 3, has no `https` server, or has no operations is refused. - The name is at most 60 characters. - Only one of the two sources is accepted: a specification address or pasted text, not both. - A pasted specification larger than 10 MiB is refused. #### How it works (technical) The screen calls `POST /api/v1/integrations/spec/preview` with `spec_url` or `spec_text`. It reads the specification and returns the operations without mounting anything. Mounting calls `POST /api/v1/integrations/generate` with `name`, the specification, `auth` set to `none`, `bearer` or `header`, and `token` and `label` when the API needs a key. The generator builds a tool whose every mutating operation is wrapped in an approval that is always required. The app is marked as created by the person who mounted it. #### Videos of the real product - **Connecting an API of your own, with no code** (1:17): https://momoto.io/docs/proof/act-05/5.06-connect-my-own-api/clip.mp4 1. In «Integrations», «Connect my API» opens a four-step assistant. First it explains what it will ask for 2. She gives it a name and the address of its specification. An address that is not a specification is refused, with the reason 3. With the right address, «Test connection» says what the API brings before anything is mounted 4. This API asks for no key. One that does gets it here, and it is kept in the vault 5. The summary: reading is free; publishing, creating or deleting will ask every time. She mounts it 6. It shows in the list as made by her. Its panel compares what is mounted with the live specification ### Curated https://momoto.io/docs/#/p/integrations/curated The curated catalog holds ready-made integrations that Momoto has already checked. Mounting one brings its operations to your agents, and connecting it gives it the key it needs. Slack is the example: reading is free, and posting asks a person every time. #### Before you start - You need to be an administrator of the installation, and the Executor must be on (see [Turn on the outside tools](https://momoto.io/docs/#/p/integrations/turn-on)). Without it, the catalog has nothing to mount. - Have the team's key for the tool ready. For Slack, that is the bot's key. #### What Slack brings - **Who the bot is**: Reads the bot's own identity, so agents know which account they speak as. - **List channels**: Reads the channels the bot can see. - **Read a channel**: Reads the messages of one channel. Reading is free: it does not ask. - **Post**: Writes a message. **Every post asks a person first**, in Momoto's approvals, before it leaves. The bot belongs to the team, so you connect its key once, at the organization. The key is kept in the vault and is never shown again. #### What you will notice - A post that is held does not stop the agent's turn. The agent carries on; the post goes out only after someone approves it. - Each person who approves a post decides that one post. A rejected post is not sent. #### Mounting and connecting (for admins) In **Integrations**, open the catalog and choose Slack. Read what it does and that posting asks permission, then mount it. Once it is mounted, connect the team's bot: paste its key into the hidden field. Then give agents access in [Who sees Slack](https://momoto.io/docs/#/p/integrations/who-sees-it). #### How it works (technical) The curated Slack is the app with slug `slack-demo`. Mounting calls `POST /api/v1/integrations/apps/{slug}`. Connecting the key calls `POST /api/v1/integrations/apps/{slug}/account` with `token` and an optional `label`; the token is written to the vault and the response never returns it. Posting is one tool, `slack-demo.slack.chatPostMessage`. The relay's platform gate holds every call to a tool that is not on its trusted list, so the post waits for a person's decision in Approvals. Reading tools are not held. #### Videos of the real product - **Slack, from the catalog** (0:46): https://momoto.io/docs/proof/act-05/5.05c-mount-slack/clip.mp4 1. In «Integrations», Marisol opens the catalog: what Momoto brings ready to mount 2. She opens Slack: what it does, and that posting will ask permission. She mounts it 3. She connects the team's bot: she pastes its key into a hidden field - **Slack for a member's agent, on his own Momoto** (1:50): https://momoto.io/docs/proof/act-05/5.11b-diegos-agent-gets-slack/clip.mp4 1. In «Integrations» of his Momoto, Diego opens the catalog and mounts Slack 2. He connects the team's bot: he pastes its key into a hidden field 3. He makes «Integrations», the agent that will use the outside tools 4. Back in Slack, at «Who can see it»: he gives «Integrations» all of Slack, reading and posting, and connects it ### Triggers https://momoto.io/docs/#/p/integrations/triggers A trigger wakes an agent when something happens outside Momoto. A mention of the bot in Slack, or a signed call from another system, becomes a turn in a conversation with the agent you choose. The turn goes through the same gates as a message typed in the chat. #### Before you start - You need to be an administrator of the installation. The tool the trigger listens to must already be mounted (see [Curated](https://momoto.io/docs/#/p/integrations/curated)), except for a trigger on your own system's webhook. - For Slack, you need the app's token and the team's bot key. Both are pasted into masked fields and kept in the vault. #### Two ways in - **Slack mention**: Momoto keeps a connection open to Slack (Socket Mode), so the hub needs no public address for it. Every mention of the bot becomes a turn for the agent you pick. - **Signed webhook**: Any other system sends an event to Momoto's address. The address is public on purpose and carries no key. What lets an event in is its signature. #### What you will notice - The turn appears in your conversation with the agent, and the agent answers it. - Replying in Slack is an outside change, so the reply waits for your approval, as in [Agents use them](https://momoto.io/docs/#/p/integrations/agents-use-them). - The webhook's secret is shown **once**. Save it right away. Changing it makes the old one stop working at once. - **Pause** stops a trigger from listening. **Delete** removes it and its address. #### Connecting Slack (for admins) - In **Integrations**, paste the app's token into the socket field. Momoto checks it and the socket shows as connected. - Paste the team's bot key into the bot field. It is saved and never shown again. - Make the trigger: choose the event *mention*, the agent that gets the turn, and Slack as the source. #### Signing your own webhook (for admins) Make a trigger for your own system and choose the webhook option. Momoto shows the address and the secret once. Your system signs each event body with the secret and sends the signature in `X-Momoto-Signature`. Here is an example from a terminal, the same as an HTTP step in another system would make: ``` $ BODY='{"text":"Today's deals?"}' $ curl -s -w "\n→ %{http_code}\n" "$URL" -H "Content-Type: application/json" -H "X-Momoto-Signature: sha256=$(printf %s "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -r | cut -d" " -f1)" -d "$BODY" ``` With a correct signature Momoto accepts the event. With a wrong one it refuses it. To change the secret, use **Regenerate**: the address stays the same, and only the new secret opens it. #### How it works (technical) **Signature.** `POST /api/v1/integrations/webhook?hook=…` checks `X-Momoto-Signature` (or `X-Hub-Signature-256`), which must be `sha256=` followed by the hex HMAC-SHA256 of the raw body with the trigger's secret. The check runs before the trigger's paused state is read. A bad signature returns 403, an unknown hook 404, and a body that is not JSON 400. The event name in `X-Momoto-Event`, when sent, must match the trigger's event. **Timestamp.** When the sender also sends `X-Momoto-Timestamp`, the event is refused if it is more than 300 seconds old. **Secrets.** Secrets begin with `whsec_` and are stored in the vault. Create and regenerate return the secret once. Regenerate keeps the hook id and the address. **Routes.** `POST /api/v1/integrations/triggers` takes `app`, `event`, `agent` and `webhook`. `POST …/{trigger_id}/webhook/regenerate`, `POST …/{trigger_id}/toggle` and `DELETE …/{trigger_id}` manage it. Slack: `POST`, `GET` and `DELETE /api/v1/integrations/triggers/slack/socket`, where the token must start with `xapp-`; and `PUT` and `DELETE /api/v1/integrations/triggers/slack/bot`, where the token must start with `xoxb-`. Neither token is returned by any route. #### Videos of the real product - **A message in Slack wakes an agent** (1:36): https://momoto.io/docs/proof/act-05/5.09-a-slack-message-wakes-an-agent/clip.mp4 1. In «Integrations», Marisol connects Slack's socket: she pastes the app's token into the masked field 2. Slack answers and the socket stays connected 3. She makes the trigger: every mention of the bot in Slack becomes a turn for the coordinator 4. She opens her conversation with the coordinator. In #quetzal-sales, someone on the team asks the bot about today's deals 5. The message reaches her conversation as a turn, and the coordinator reads the channel 6. Answering in Slack changes something outside: it waits for her approval. She approves it from the bell, and the coordinator posts - **A signed call wakes an agent** (2:07): https://momoto.io/docs/proof/act-05/5.10-a-signed-call-wakes-an-agent/clip.mp4 1. In «Integrations», Marisol makes a trigger for a system of her own: its event, the agent that gets the turn, and a webhook with its secret 2. The address and the secret are shown once. She saves them 3. The system outside signs each event with that secret. With the right signature Momoto takes it; with another, it refuses it 4. The event was born as a turn in her conversation with the coordinator, which answers it 5. Back in «Integrations», she changes the trigger's secret 6. The secret of before no longer opens; the new one does 7. She pauses it: it stops listening. And at the end she deletes it: its address is gone ### Turn on https://momoto.io/docs/#/p/integrations/turn-on Outside tools such as Slack are mounted on the Executor, a separate container that Momoto leaves off by default. Turning them on means starting the Executor, giving Momoto a token and its addresses, and restarting the API. After that, Momoto lists the tools that can be mounted. #### Before you start - The Executor is optional. Momoto works without it; the «Integrations» screen simply has nothing to mount until you turn it on. - Only an administrator of the installation can mount tools or change them. Every integrations route checks for that role first. - You need a terminal on the hub, in Momoto's folder, and the Executor's own page open in a browser to create its administrator account and the token. #### What you will notice - Agents reach every outside tool through the Executor, and through Momoto's own relay. The relay writes each call to the audit log with the agent and the tool. - The token for Momoto is shown **once**, on the Executor's page. Copy it into `.env` right away. - Until you restart the API, Momoto does not see the new settings. #### Turning it on (for admins) The Executor sits behind the `integrations` profile of Docker Compose, so a normal `docker compose up` does not start it. Start it, then give Momoto four values in `.env`: - **`MOMOTO_EXECUTOR_ORG_TOKEN`**: The token you made on the Executor's page for your organization. Without it, Momoto has no organization lane for mounting tools. - **`MOMOTO_EXECUTOR_API_URL`**: The address where Momoto's API reaches the Executor's own API, as seen from the API's container. On Linux the recorded run used the docker0 address, `172.17.0.1`, port `4400`. - **`MOMOTO_EXECUTOR_MCP_URL`**: The Executor's MCP endpoint: the same host and port with `/mcp`. - **`MOMOTO_EXECUTOR_PROXY_URL`**: The address agents use to reach Momoto's relay, `/api/v1/integrations/mcp`, on the port your API answers on. ``` # start the Executor and its callback proxy $ docker compose --profile integrations up -d executor executor-callback-proxy $ docker compose --profile integrations ps executor # add the four values to .env, then restart the API so it reads them $ docker compose up -d momoto-api ``` When the API is back, open **More › Integrations**. The list shows what can be mounted. #### How it works (technical) The Executor and `executor-callback-proxy` are defined in `docker-compose.yml` under the `integrations` profile (the older profile name `integraciones` still works). The organization name defaults to `executor` (`MOMOTO_EXECUTOR_ORG`). - `MOMOTO_EXECUTOR_API_URL` defaults to `http://host.docker.internal:4400`. `EXECUTOR_AUTH_URL` defaults to `http://127.0.0.1:4400`. - `GET /api/v1/integrations/reachability` reports whether the mount point is configured. The screen shows «reachability not configured» until the MCP and proxy addresses are set. - When `MOMOTO_EXECUTOR_PROXY_URL` is set, a connecting agent gets the proxy address attached to its MCP connection. Every tool call from an agent arrives at `POST /api/v1/integrations/mcp`. The relay audits each `tools/call` as a `tool_call` event with the agent, the tool, the apps and the status. Initialize and list calls are not audited. #### Videos of the real product - **Turning the outside tools on** (1:48): https://momoto.io/docs/proof/act-05/5.05a-the-outside-tools/clip.mp4 1. In the terminal, Marisol starts the Executor, the piece outside tools are mounted on 2. On the Executor's page she makes its administrator account 3. And a token for Momoto, limited to her organization. It is shown once 4. Back in the terminal, she gives Momoto the token and the Executor's addresses, and restarts its API 5. In «More › Integrations», Momoto now lists what can be mounted - **Outside tools on a member's own Momoto** (2:01): https://momoto.io/docs/proof/act-05/5.11a-diegos-own-outside-tools/clip.mp4 1. In the Linux of his Windows, Diego starts his own Momoto's Executor 2. On the Executor's page, on his computer, he makes its administrator account 3. And a token for his Momoto. It is shown once 4. Back in the terminal: the token, the Executor's addresses and its dashboard account; the password is not shown. He restarts the API 5. In «More › Integrations» of his Momoto, tools can now be mounted, and per-agent reach is ready ### Who sees Slack https://momoto.io/docs/#/p/integrations/who-sees-it Mounting a tool does not give every agent access to it. In «Who can see it» you decide, agent by agent, whether an agent sees the tool at all, whether it may only read, and whether it gets its own credential for it. An agent you leave out does not see the tool. #### What you will notice - An agent that is not given a tool does not see it. The Executor answers it as if the tool did not exist. - **Read only** hides the operations that change something outside Momoto. In Slack, that means posting. - **Connect…** gives the agent its own credential for the tool, kept in the vault. Making that connection is the permission: nothing is granted until you click it. - Every other agent does not see Slack. #### Turn on per-agent reach first (for admins) Until the Executor's dashboard account is set, «Integrations» shows that per-agent reach is not configured. Momoto signs in to the Executor's dashboard with an account you set in `.env`: ``` $ echo "MOMOTO_EXECUTOR_SESSION_EMAIL=marisol@quetzal.example" >> .env $ echo "MOMOTO_EXECUTOR_SESSION_PASSWORD=" >> .env $ docker compose up -d momoto-api ``` Use a password you keep private. Momoto never displays it, and you should not paste it into a chat or a ticket. When the screen shows reach as healthy, open a tool and set its «Who can see it». #### Giving an agent access (for admins) - Open **Integrations** and the tool, for example Slack. - At **Who can see it**, choose the agent. - Choose the level: all of the tool (reading and posting), or **Read only**. - Press **Connect…** to give the agent its credential. In the recorded run, the coordinator got all of Slack and an assistant got it for reading only. #### How it works (technical) The screen reads `GET /api/v1/integrations/reachability` for the health line and calls `PUT /api/v1/integrations/apps/{slug}/reachability` with `agent`, `exposed` and `read_only`. `read_only` defaults to `true`, so an agent starts read only unless you ask for more. Exposing requires a mounted tool. The health line is computed from the two Executor addresses (`MOMOTO_EXECUTOR_MCP_URL` and `MOMOTO_EXECUTOR_PROXY_URL`) and the session account. It reads `unconfigured` without the account and `broken` when the Executor's session no longer works. The Executor's dashboard account is read from `MOMOTO_EXECUTOR_SESSION_EMAIL` and `MOMOTO_EXECUTOR_SESSION_PASSWORD`. Neither value is returned by any route. #### Videos of the real product - **Who sees Slack** (1:44): https://momoto.io/docs/proof/act-05/5.07-who-sees-slack/clip.mp4 1. In «Integrations», the notice says per-agent reach is not configured 2. As the guide says, Iván gives Momoto the Executor dashboard's account; the password is not shown 3. Marisol goes back to «Integrations»: reach is now healthy. She opens Slack, at «Who can see it» 4. She gives the coordinator all of Slack: reading and posting too. She connects it 5. She gives her assistant Slack for reading only. She connects it 6. Every other agent does not see Slack ## Teams and organizations Working together: your organization, its people and roles, the app store and one shared memory. ### Audit log https://momoto.io/docs/#/p/organization/audit-log The audit log records what happened in Momoto: who changed a project, a role or a memory, who opened a session, and what was refused. It is for checking after the fact, and for proving what was done. You can filter it, export it, or watch it live. #### What you will see Open **Audit log**. Events are listed most recent first. Open an event to see its full detail, such as who did it, when, and the object it touched. - The **Summary** tab counts events by kind. Open the events behind each line to see the detail. Use it to see the shape of a day: who gave which app to whom, each version of an agent, and each refusal. - The **Technical** tab is the other view of the same log. #### Filter, export and live view - **Refine the search**: Filter the events, for example to only the approvals that were resolved. The filters are kind of event, person, session, agent, app and dates. - **Export CSV**: Downloads the events you are looking at as a CSV file, so you can keep them outside Momoto. Narrow the dates if the export is too large; Momoto refuses exports above 50,000 rows. - **Live**: Turn it on to see new events arrive without reloading. Each person sees only what the log lets them see. #### Who sees what An administrator of the organization sees its whole log. Anyone else sees only their own events, and the live view needs a session filter. Exporting follows the same rules as viewing: you export what you can see. Events from an agent that works on its person's own Momoto stay in that Momoto's log. The hub's log holds what happens in the organization's store, network and memory, whichever computer started it. #### How it works (technical) - **GET /api/v1/logs/**: `list_logs`. Limit 1 to 500, default 100. Filters: `session_id`, `user_id`, `since`, `until`, `type` (repeatable), `app`, `agent`, and a cursor. - **GET /api/v1/logs/{event_id}**: One event in full. - **GET /api/v1/logs/export.csv**: `export_logs_csv`. The same filters. Returns 413 `export_too_large` above 50,000 rows. - **GET /api/v1/logs/stream**: `stream_logs`, a server-sent event stream. Administrators get every event; others need a `session_id` and get only their own. The use case `QueryLogs` in `momoto_core/usecases` decides the scope: an administrator of the organization (`authorizer.can_admin`) sees all of it, and anyone else sees their own events. #### Videos of the real product - **The audit log: who did what, filters, export and live view** (0:34): https://momoto.io/docs/proof/act-01/1.16-audit-log/clip.mp4 1. The audit log keeps everything that happened, most recent first: projects, roles, memory, sessions 2. She opens an event and sees its full detail 3. «Refine the search» filters by kind of event: only the approvals that were resolved 4. She exports what she is looking at as CSV 5. She takes the filter off and turns «Live» on 6. She signs in from her phone: the event shows up by itself, with no reload - **The record of the day: who gave what, each version, each refusal** (1:10): https://momoto.io/docs/proof/act-06/6.09-the-record-of-the-day/clip.mp4 1. In «Audit log», the summary counts what happened by kind of event 2. Who gave which app to whom: each permission, with who gave it 3. Each version of each app: the agent that wrote it and the person it worked for 4. And what was refused: an app that wanted to use another and its owner said no 5. She exports what she is looking at as CSV, to keep it outside Momoto ### A bridge between two organizations https://momoto.io/docs/#/p/organization/bridges A bridge lets the administrator agent of one organization talk to the administrator agent of another. Organizations are isolated by default, so an agent cannot reach another organization on its own. It asks for a bridge, a person approves it, and it closes again by itself after a set time. #### How a bridge is asked for and approved - Each organization has its administrator agent. When it needs something from another organization, it asks for a bridge and writes a short note explaining why. - The request appears in your bell, with the agent's note. Read it before you decide. A bridge that is already waiting for an answer is not asked for again. - To approve, you must manage both organizations, and Momoto asks for your second factor. - Once it is open, the two administrator agents can write to each other. Nothing else crosses. #### Before you approve - A bridge can only open once both administrator agents have been opened at least once. Until then, Momoto says so and the request stays pending. Open each agent's chat once, then approve again. - Bridges do not cross accounts. An organization in another account cannot be reached. - An administrator agent that receives a question from another organization tells its own person and waits for a yes. It does not answer on its own. #### How it ends A bridge closes by itself after 8 hours by default. Nobody can extend it, and the agent cannot make it last longer. Either side can close it before that: the agent can ask to close, or a person who manages either organization can revoke it. #### How it works (technical) - **POST /api/v1/bridges/requests**: `request_bridge`. The agent sends its session and the target organization. The origin comes from the session, never from the body. A pending request for the same pair is returned instead of a new one. An unknown or foreign target returns the same 404, so the caller learns nothing about other accounts. - **GET /api/v1/bridges/requests/{approval_id}**: `bridge_request_detail`. Shows the two organizations, the time to live and the agent's note. - **POST /api/v1/bridges/requests/{approval_id}/approve**: `approve_bridge`. Needs an administrator, command over both organizations (`USERS:UPDATE` in each), and step-up on `APPROVALS:APPROVE`. First it checks that the bridge can open, and returns 409 `bridge_not_materialized` with the request still pending when it cannot. Then it resolves the approval and writes `a2a_bridge_opened`. - **GET /api/v1/bridges**: `list_bridges`, the open bridges. - **DELETE /api/v1/bridges/{entity_a}/{entity_b}**: `revoke_bridge`. Command over at least one of the two organizations is enough. - **POST /api/v1/bridges/close**: `agent_close_bridge`. Called by the agent; it can only shorten a bridge. The lifetime is set by `MOMOTO_A2A_GRANT_TTL_S` (seconds; default 28800, minimum 60). The gate that enforces it runs on every message, not on a timer. The bridge is symmetric: a pair is stored sorted, so it does not matter who asked first. #### Videos of the real product - **A bridge between two organizations** (2:43): https://momoto.io/docs/proof/act-06/6.08-a-bridge-between-organizations/clip.mp4 1. Each organization has its administrator agent. Marisol opens the chat of both: a bridge joins those two, and only opens between agents that have woken up 2. The shop's administrator needs something the roaster knows. It cannot write to its agents: it asks for a bridge 3. The request reaches Marisol's bell, with the agent's note. She approves it 4. With the bridge open, the shop's administrator writes to the roaster's 5. The roaster's got the question. It does not answer another organization on its own: it tells Marisol, and she says yes 6. Back in the shop's chat, the answer crossed the bridge 7. They are done: the agent closes the bridge. It would have closed by itself in a few hours ### Organizations and projects: create, rename, switch and archive https://momoto.io/docs/#/p/organization/organizations-projects An organization is one company or team inside your account, with its own projects, agents and people. You create one from the Dashboard, rename it, switch between them from the account menu, and archive the projects you no longer need. #### Before you start - **New organization** appears on the Dashboard only in an account that is not personal, and only for people who may create organizations there. - Creating an organization is a sensitive action: Momoto asks for your second factor first. - Names are unique inside an account. Two accounts can each have an organization called «Operations». #### Create, rename and switch - **Create**: On the Dashboard, press **New organization**. Give it a name. You become a member of it from the start. An account holds up to 50 organizations by default. - **Rename**: Open **Your account**, then **Your organizations**, and press **Rename** on the one you want. The button is shown only where you are allowed to rename. - **Switch**: In the account menu, change the organization you are working in. The menu offers the switch only when you belong to two or more. - **Delete**: An organization can be deleted only when it is empty. Momoto refuses otherwise. #### Projects Projects live in **Agents**, in the Projects view. Press **New project** and give it a name. Each name is unique within its organization. When a project is no longer needed, **archive** it. It leaves the lists and becomes read-only. Its agents stop running, and nothing is deleted. To find it again, press **View archived**, and bring it back from there. #### How it works (technical) - **POST /api/v1/organizations/{organization_id}/companies**: Creates the organization (`create_company`, `momoto_core/usecases/create_company.py`). The caller needs `ENTITIES:CREATE` in every organization of the account. It returns 409 `company_limit` when the account is full (`MOMOTO_MAX_COMPANIES_PER_ORG`, default 50), and 409 `company_exists` for a duplicate name. A personal account cannot add a second organization. - **PATCH /api/v1/entities/{entity_id}**: Renames it. Needs `ENTITIES:UPDATE` (sensitive: step-up). 403 `permission_denied` without it. - **POST /api/v1/auth/switch-entity**: Changes the organization of the current session. Body: `entity_id`. Refused for an organization the caller does not belong to. - **DELETE /api/v1/entities/{entity_id}**: Returns 204 on success, 409 `organization_not_empty` otherwise. Needs an administrator of the account. - **POST /api/v1/projects/**: Creates a project. The name must be unique within the organization. - **POST /api/v1/projects/{project_id}/archive**: Archives it; a project in this state refuses changes (409). Allowed for its owner or an administrator of the organization. Stops the agents that are running in it. - **POST /api/v1/projects/{project_id}/unarchive**: Brings it back. #### Videos of the real product - **Organizations and projects: create, rename, switch and archive** (1:26): https://momoto.io/docs/proof/act-01/1.12-organizations-projects/clip.mp4 1. Besides the roaster, Marisol has a shop. On the Dashboard she creates her second organization 2. She renames it from «Your account» 3. In her account menu she switches organization: now she works in the shop 4. And she goes back to the roaster 5. Projects live in Agents, in the Projects view 6. She creates the project «CRM» in the roaster 7. She creates the project «Finance» in the roaster 8. She creates the project «Operations» in the roaster 9. She creates the project «Draft» in the roaster 10. «Draft» is no longer needed: she archives it. It leaves the lists and stays read-only 11. Under «View archived» it is still there, and she can bring it back ### People https://momoto.io/docs/#/p/organization/people People lists the members of your organizations and what each one may do. When someone asks to be deleted, the request waits here for an administrator to approve or deny it. Approving locks the account at once; the data is erased when the waiting period ends. #### A deactivation request A person asks for their own deactivation under **Your account**, in **My data**. Their row in **People** then shows that they asked, and the date by which an administrator should answer. - They can withdraw the request while it is still pending. - An administrator cannot approve their own request. Another person must decide it. - If the request would remove the last administrator of the organization, Momoto refuses and the request stays pending. #### Approving or denying (for admins) Open the person in **People** and choose **Approve deactivation**. Momoto warns that it cannot be undone, and asks for your second factor. When you approve, the account is locked and no longer signs in. Its sessions end, and the screen shows the date its data will be erased. Erasure runs after 30 days by default. Your installation can change this with `MOMOTO_DEACTIVATION_BLOCK_DAYS`. Withdrawing is only possible before approval. To deny, you must write a reason. The account stays as it was, and the person can ask again. #### What remains afterwards Once the account is erased, **People** no longer shows it. The audit log is kept: it still shows what the person did under their internal identifier, and one line that says the account was deleted. The erasure runs in the background of the API. It only runs in the full containerized installation, and it retries until it succeeds. #### How it works (technical) - **GET, POST and DELETE /api/v1/me/deactivation**: The person's own request: view it, make it, or withdraw it while pending (`me_deactivation.py`). - **POST /api/v1/users/{user_id}/deactivation/approve**: `approve_deactivation`. Needs `USERS:DELETE`, a sensitive permission with step-up. It resolves the request first, so a race with a withdrawal loses cleanly, then locks the account. The purge date is now plus `MOMOTO_DEACTIVATION_BLOCK_DAYS` (default 30). The API's janitor performs the erasure, and only under the containerized profile. If locking fails, the request returns to pending. - **POST /api/v1/users/{user_id}/deactivation/deny**: `deny_deactivation`. Body: `reason`, required (422 `reason_required` if blank). Both decisions go through `_pending_deactivation`, which refuses your own request (409 `uses_my_account`), checks that you manage the person (`_manage` with `USERS:DELETE`), and refuses a request that is no longer pending (409 `baja_not_pending`). #### Videos of the real product - **The administrator answers a deactivation** (0:35): https://momoto.io/docs/proof/act-10/10.04b-marisol-answers/clip.mp4 1. In «People», Tomás's row says he asked to be deleted and by when to answer 2. «Approve deactivation»: Momoto warns that it cannot be undone. She accepts, and the account is locked with the date its data is erased - **The erasure: his data is gone** (0:27): https://momoto.io/docs/proof/act-10/10.04c-the-erasure/clip.mp4 1. In «People», Tomás no longer shows with his name or his email 2. In «Audit log», what he did is still there, under his identifier, and one line says the account was deleted ### Projects and their people: responsible, collaborator, an agent that changes project, and a project that will not be deleted https://momoto.io/docs/#/p/organization/projects A project's people are the ones who work with its agents. The owner manages the project and its members; a collaborator uses its agents. An agent belongs to one project, and you can move it from its detail. A project with its own sensitivity class cannot be deleted until that class is removed. #### Owner and collaborator - **Owner**: Manages the project and its members. Can add, change and remove people, and sets the project's sensitivity. - **Collaborator**: Uses the project's agents. Cannot manage the project or its members. To add someone, open the members of the project in **Agents**, then the Projects view. Choose the person and their role. Change a role on that person's row. A person must already belong to the project's organization to be added. #### Moving an agent to another project An agent's project is chosen when it is created. Later, open the agent's detail. Under «Project», choose the project you want. You need permission to change the agent, and the agent's organization must be one the project belongs to. #### Deleting a project Deleting a project is a sensitive action: Momoto asks for your second factor first. Momoto refuses to delete a project in these cases: - The project has its own sensitivity class above its organization's. Lower it first, then delete. - The project still has connections. Remove them first. When a project is deleted, its agents move to **General**. They are not deleted. #### How it works (technical) - **GET /api/v1/projects/{project_id}/members**: `list_project_members`. Also returns the project's sensitivity. - **PUT /api/v1/projects/{project_id}/members/{member_id}**: `set_project_member`. Body: the role (`responsible` or `collaborator`). Returns 422 `member_not_in_organization` when the person is not in the project's organization. - **DELETE /api/v1/projects/{project_id}/members/{member_id}**: `remove_project_member`. - **PATCH /api/v1/projects/{project_id}/agents/{agent_id}**: `assign_agent_to_project`. Needs `AGENTS:UPDATE` in the agent's organization; an agent may only be moved by its owner, unless it is a published agent awaiting approval. Returns 422 when the agent's organization is not one of the project's. - **DELETE /api/v1/projects/{project_id}**: `delete_project`. Needs `PROJECTS:DELETE` in every organization of the project, and a second factor. Returns 409 while the project has connections, and 409 while its own class rises above the organization's. Its agents are moved to General. The use case for members and the delete rules live in `momoto_core/usecases`; a project's own class is set through `PUT /api/v1/projects/{project_id}/data-class`. #### Videos of the real product - **Projects and their people: responsible, collaborator, an agent that changes project, and a project that will not be deleted** (1:38): https://momoto.io/docs/proof/act-06/6.06-projects-and-their-people/clip.mp4 1. In Agents › Projects, Marisol opens the members of «Operations» 2. She adds Diego as the responsible one: he manages the project and its members 3. And Lucía as a collaborator: she uses the project's agents 4. Each person's part is changed on their row: Lucía becomes responsible, and a collaborator again 5. She closes the window 6. In the detail of «Quetzal Coordinator», «Project» says «Operations». Marisol moves it to «CRM» 7. And she moves it back to «Operations», where the story left it 8. «Finance» has a sensitivity of its own. Marisol tries to delete it: Momoto does not let her, and says why ### Roles: the five presets and a custom one https://momoto.io/docs/#/p/organization/roles A role is a named set of permissions: what a person may do in the organizations they belong to. Momoto comes with five presets, and you can make your own role for a team whose job the presets do not fit. You assign roles to people in People. #### The five presets Open **Roles** to see the presets: **Admin**, **Dev/Research**, **Ops**, **Member** and **Viewer**. Each preset is a starting set of permissions. Before you assign one, read its permissions in the matrix. - A person can hold more than one role. Their permissions are combined. - If one role denies a permission, the denial wins over a grant from another role. #### Make a custom role When no preset fits, press the create button on **Roles** and give the role a name and a description. You can start from another role, for example **Member**, which copies its permissions into your new role. You then change the matrix cell by cell. - Each cell in the matrix is one permission. Press a cell to change it, and the change is saved at once. - A cell has three states: **granted**, **denied** and **not assigned**. Granted lets the role do it. Denied blocks it, even when another role grants it. Not assigned leaves the decision to the other roles. - A custom role cannot be deleted. You can turn it off, so it stops applying to everyone who holds it. #### Who may do this Roles belong to the whole installation, not to one organization. Creating a role, changing it and changing its permissions need a platform-wide permission. An organization administrator alone cannot do it. Assigning a role to a person is a separate permission, and some pairs of roles cannot be given to the same person. #### How it works (technical) The page calls `GET /api/v1/roles/`, which returns the roles, the permission catalog and the actor's ceiling. `POST /api/v1/roles/` creates a role (`create_role`): the name is 1 to 60 characters and the description up to 280. The code is generated as `ROLE_CUSTOM_`. Without a platform-wide grant the call returns 403 `platform_scope_required`. `base_role` copies another role's permissions; the service role cannot be copied (422), an unknown role returns 404, and you cannot copy permissions you do not hold yourself. Each matrix cell calls `PUT /api/v1/roles/{role_code}/permissions/{permission_code}` (`set_role_permission`) with `state` set to `true` (granted), `false` (denied) or `null` (not assigned, the row is removed). Granting checks the actor's ceiling; an unknown permission returns 404. The authorizer applies denials over grants (`momoto_core/services/permissions.py`). `PATCH /api/v1/roles/{role_code}` changes the name, the description and `is_active`. There is no delete route: turning a role off is the only way to remove it. Assignments: `GET` and `POST /api/v1/users/{user_id}/roles`, and `DELETE /api/v1/users/{user_id}/roles/{assignment_id}`. Assigning checks `ROLE_ASSIGNMENTS:EXECUTE` and returns 409 `separation_of_duties` for a forbidden pair. #### Videos of the real product - **Roles: the five presets and a custom one** (0:37): https://momoto.io/docs/proof/act-01/1.13-roles/clip.mp4 1. Roles comes with five presets: Admin, Dev/Research, Ops, Member and Viewer, with what each may do 2. For her sales team she creates a custom role, starting from Member 3. Momoto confirms it's her. The form empties and she fills it in again 4. The role appears in the matrix. Each cell is a permission and is saved when she presses it 5. She gives it «Create agents» 6. And she denies it «Upload apps to the organization's host». A cell has three states: granted, denied and not assigned ### Sensitivity https://momoto.io/docs/#/p/organization/sensitivity Sensitivity decides who may read what. Every organization and every project has a class, and every person has a level in each organization. A person reads a thing only when their level reaches its class, and their agents work with the same limit. #### The four classes - **Public**: Anyone in the organization may read it. - **Internal**: The default for an organization. It may cross to another organization through a bridge. - **Confidential**: Read only by people whose level reaches confidential. It may not cross to another organization. - **Restricted**: The highest class. It never leaves the hub for a person's own computer. An organization's administrators read everything in it. Other people start at **Internal** unless their administrator lowers or raises their level. #### Sensitivity on a project A project can be more sensitive than its organization, never less. Open **Agents**, then the Projects view, and open the members of a project. In the window, raise the sensitivity of the project's notes. Momoto only offers classes above the organization's own. Setting a class needs the owner of the project or an administrator of every organization it belongs to. You can only set a class that your own level reaches. #### Who reads: each person's level Open **Sensitivity** and press **Who reads** on an organization. The panel shows who reaches the organization's class and who does not. To change one person, open **People**, then their access, and lower or raise their level in that organization. Momoto asks for confirmation. - When a level goes down below the organization's class, the person stops reading that organization's memory, documents and knowledge bases. Their agents stop too, from their next conversation. - What an agent had already read stays in its own notes and history. The screen says so. - You cannot set a level for an administrator of the organization, because administrators read everything in it. - You cannot give someone a level above your own. #### What happens with agents An agent works with the level of the person it works for. Asking for something above that level returns nothing from the restricted part, and the agent says so instead of finding another path. The same question can give different answers to two people in the same organization, depending on their levels. #### How it works (technical) The classes are the `DataClass` values in `momoto_core/domain`: public, internal, confidential and restricted. Internal is the highest class that may cross to another organization. A person reads a class when their level ranks at or above it (`can_read`). Administrators of an organization get restricted by default; everyone else gets internal. - **PUT /api/v1/entities/{entity_id}/data-class**: `set_organization_class`. Requires `ENTITIES:UPDATE` and offers only the classes the caller reaches. - **GET /api/v1/entities/{entity_id}/levels**: `organization_levels`. Lists each person's level and whether it reaches the organization's class. - **PUT /api/v1/users/{user_id}/level**: `set_person_level` (`momoto_api/routers/person_level.py`). Body: `entity_id` and `level`, where `null` resets to the default. Returns 409 `admin_reads_all` for an organization administrator, 403 `sensitivity_escalation_blocked` for a level above the caller's own, and 409 `unreadable_level` when the level cannot be used. A change made by someone else notifies the person, and it refreshes their context so the change takes effect from the next conversation. - **PUT /api/v1/projects/{project_id}/data-class**: `set_project_data_class`. Only a class above the organization's (422 otherwise). Requires step-up on `PROJECTS:UPDATE`. #### Videos of the real product - **Sensitivity: how delicate each thing is and who reads it** (0:28): https://momoto.io/docs/proof/act-01/1.14-sensitivity/clip.mp4 1. There are four classes: public, internal, confidential and restricted. Internal may cross to another organization; confidential may not 2. The roaster is «Internal». «Who reads» says who reaches that class 3. Finance is worth more. In Agents › Projects she opens the members of «Finance» 4. She raises the sensitivity of its notes to «Confidential»: a project can only be worth more than its organization 5. She closes the window. The notes of «Finance» are now read only by people with the confidential level - **A note in a confidential project** (0:39): https://momoto.io/docs/proof/act-06/6.04a-a-confidential-note/clip.mp4 1. Marisol asks her coordinator to leave October's margin in the project «Finance», by its name - **Her agent does not reach what is confidential, and says so** (1:28): https://momoto.io/docs/proof/act-06/6.04b-renatas-agent-does-not-reach-it/clip.mp4 1. Renata asks her assistant for October's margin, which is in a note of «Finance» - **The agent of someone who has the level reads it** (1:23): https://momoto.io/docs/proof/act-06/6.04c-ivans-agent-reads-it/clip.mp4 1. Iván asks his assistant the same question, in a new conversation. His does answer it - **Lowering the level up to which a person reads** (0:38): https://momoto.io/docs/proof/act-06/6.04d-lowering-a-persons-level/clip.mp4 1. In «People», Marisol opens Diego's access: organizations, projects, roles and up to which level he reads 2. She lowers his level in «Quetzal Roasters» from «Internal» to «Public». Momoto confirms it is her 3. «Sensitivity › Who reads» says it: Diego no longer reaches the organization's class - **His level was lowered: what his Momoto no longer holds and his agent no longer knows** (1:37): https://momoto.io/docs/proof/act-06/6.04e-diego-is-told/clip.mp4 1. In «Approvals», «From your organization» tells him his level went down 2. He presses «Ready»: noted 3. In «Memory», his organization's block no longer carries its facts or its rules, and says why 4. And his agent, in a new conversation, no longer has it ### Switching organization https://momoto.io/docs/#/p/organizations/switch If your account belongs to more than one organization, you choose which one is active. The active one is where Momoto opens and where the things you create go. Your role decides what you may do in each organization. #### How to switch - Open your account menu and go to **Organization · Change**. - Pick the other organization. **Memory**, for example, now opens on that organization's memory. - To go back, choose the first one again. You sign in once. Both organizations are in the same account, so you do not need a second password. #### What to know - Your role is per organization. You may index the memory of one organization and not of another. - Separation between organizations is by account. - What you create goes to the organization that is active at that moment. #### How it works (technical) The switcher is `packages/momoto-web/src/components/OrganizationSelector.tsx`. It is shown only when your account belongs to more than one organization. It calls `POST /api/v1/auth/switch-entity`, served by `momoto_api.routers.auth.switch_entity`, which checks that you belong to the organization you picked. #### Videos of the real product - **Switching organization** (0:40): https://momoto.io/docs/proof/act-07/7.19b-tomas-switches-organization/clip.mp4 1. He signs in with his email, his password and his code 2. «Memory» opens on Quetzal Roasters's memory, his active organization 3. In his account menu, under «Organization · Change», he picks Quetzal Shop. «Memory» now opens on the shop's 4. He goes back to Quetzal Roasters ### Coming in with the invitation link https://momoto.io/docs/#/p/people/accept-invitation This is the other side of an invitation: what the person sees after clicking the link from their email. It takes a few minutes and needs only a browser, nothing installed. #### Before you start - You need the invitation email from Momoto. The link works once, so open it once and do not share it. - Open the link in a browser on the computer you will use. Momoto is reached by its name over HTTPS. Nothing is installed. #### What you will see - The invitation says who invites you, which organization it is for, and with what role. - Choose a password. Each rule ticks off as you type it. - Momoto offers a second factor. You can leave it for later. Whether it is required depends on your role and on what your admin set: the platform owner must have one, an admin of an organization is advised to, and an admin can make it mandatory for a particular person. - You are in. As a Viewer you can see the organization's agents, but you will not have one of your own yet. #### Common mistakes - Opening the link a second time. It is spent after the first use. Ask the admin to resend it. - Letting the link lapse. It lasts 72 hours for a person, or 24 hours for an admin. #### How it works (technical) The page reads the invitation with `POST /api/v1/auth/invite/inspect` and sets the password with `POST /api/v1/auth/invite/accept` (`momoto_api.routers.auth.invite_accept`). The offer is computed by `mfa_offer` in `momoto_api.routers.auth`: `mandatory` for the platform owner or a person an admin made mandatory, `recommended` for a holder of `ROLE_ADMIN` in an organization, and `optional` otherwise. #### Videos of the real product - **Coming in with the invitation link** (0:44): https://momoto.io/docs/proof/act-07/7.10b-tomas-signs-up/clip.mp4 1. The invitation from Momoto is in his email; the link works only once 2. He opens the link. The invitation says who invites him, to which organization and with what role 3. He chooses his password: each rule ticks as he types 4. Momoto offers him the second factor; he leaves it for later 5. As «Viewer» he can see the organization's agents, but none of them is his ### Inviting someone who will only use the web https://momoto.io/docs/#/p/people/invite-by-link Use an invitation when someone should join your organization and only needs the web app. You create the person in «People», choose a role, and send them a link. They set their own password when they open it. #### Before you start - You need an admin role that may create people in the organization. «New person» is only there for it. - Choose the role carefully. «Viewer» only reads; a person can be given more later, in «Roles». - If the email already belongs to an account in another organization, Momoto does not create a second account. It leaves the person an invitation to answer; see «A second organization for the same person». #### What each field means - **Email**: Where Momoto sends the invitation, and the account's identity. - **Role**: The preset role the person starts with. It can be changed later. - **Organizations**: The active organization is ticked for you. Add or remove others here. #### What you will notice - If the hub has a mail server, Momoto emails the invitation and tells you so. Without one, it does not send anything and asks you to pass the link on yourself. - The link is shown to you once, so you can pass it on if the email does not arrive. Copy it at once. - The link works once. It lapses after **72 hours** for a person, or **24 hours** for an admin. #### How it works (technical) «Create invitation» calls `POST /api/v1/users/` (`momoto_api.routers.users.create_user`). It needs `USERS:CREATE`, which is sensitive, so Momoto asks for a step-up first. The response says whether the email went out (`emailed`) and carries the link. If the email already belongs to an account in another organization, the request does not create a second account. It returns 202 and leaves an invitation in that person's notifications. If the person already belongs to this organization, the request is refused with 409. Resend is `POST /api/v1/users/{user_id}/invite/resend`; revoking the invitation is `DELETE /api/v1/users/{user_id}/invite`. The person then opens the link and calls `POST /api/v1/auth/invite/inspect` to read it and `POST /api/v1/auth/invite/accept` to set the password. #### Videos of the real product - **Inviting someone who will only use the web** (0:37): https://momoto.io/docs/proof/act-07/7.10a-tomas-invited/clip.mp4 1. In «People», Marisol opens «New person» 2. Tomás's email and the role «Viewer», the one that only reads. The active organization comes ticked 3. «Create invitation». Momoto confirms it is her 4. Momoto tells her it already emailed the invitation to Tomás, and leaves her the link in case it does not arrive ### A second organization for the same person https://momoto.io/docs/#/p/people/organizations One person can belong to more than one organization on the same account. To give Tomás a second organization, you add it from his row in «People», not by inviting him again. #### Before you start - You need an admin role that manages people in both organizations. - The person must already have an account. Use «New person» with his email: Momoto tells you he already has one, so you do not invite him twice. #### Steps - In «People», press «New person» and enter Tomás's email and the shop. Momoto tells you he already has an account, and where to add the organization. - Close the notice. - On Tomás's row, press «Edit». Mark «Quetzal Shop» and save. #### What he gets - He gets no role of his own in the new organization. The global role he already has, «Viewer», is what applies there, unless you give him a custom role for it in «Roles». - Invitations under «Your account» are for people of another account. #### How it works (technical) When «New person» is used for an email that already has an account in another organization, `POST /api/v1/users/` returns 202 and leaves an invitation for that person, not a second account. Adding the organization to an existing person is done from «Edit» with `PATCH /api/v1/users/{user_id}`. A role for that organization is set with `POST /api/v1/users/{user_id}/roles` and an `entity_id`. #### Videos of the real product - **A second organization for the same person** (0:43): https://momoto.io/docs/proof/act-07/7.19a-marisol-gives-tomas-the-shop/clip.mp4 1. In «People» she presses «New person» with Tomás's email and the shop: Momoto tells her he already has an account and where it is done 2. She closes the notice. On Tomás's row she presses «Edit», also marks Quetzal Shop and saves ### Password code https://momoto.io/docs/#/p/people/password-code Some people sign in to a hub without an email address, so there is no reset link to send them. An admin gives them a one-time password code instead, and the person uses it once to choose a new password. #### Before you start - You need an admin role that may reset passwords. Only that role shows «Password code» on a row. - The code is for one person, and it works on that person's own Momoto. It cannot be used on any other. - Momoto asks you to confirm it is you before it creates the code. Have your password or second factor ready. #### What the code does - **Shown once**: The code appears in the notice one time. Copy it or pass it on, then close the notice. It is not shown again. - **Works once**: As soon as the person uses it to set a password, it is spent. - **Lapses in 15 minutes**: After 15 minutes the code is no longer valid. Create a new one. - **Only on their own Momoto**: Someone who is not that person, or who uses it on another Momoto, gets an error. When the code is used, the person's open sessions are closed. #### Common mistakes - Sending the code by a channel others can read. Whoever has it can set the password within 15 minutes. Pass it on where you already talk. - Waiting too long. A code that has lapsed must be replaced. - Trying this on a personal account. Momoto refuses to reset a personal account from here. #### How it works (technical) On Diego's row in «People», «Password code» calls `POST /api/v1/users/{user_id}/password-reset` (`momoto_api.routers.users.issue_password_reset`). The route needs `USER_CREDENTIALS:EXECUTE`, which is sensitive, so Momoto asks for a recent step-up first. For a person without an email address, the response carries a code and its expiry instead of a link. That code is valid for 15 minutes (`MEMBER_TTL_MIN` in the network member code). The person enters the code on the sign-in page under «Forgot your password?». The page calls `POST /api/v1/auth/member-password` (`momoto_api.routers.network_member.password_with_code`). The new password is checked against the password policy before the code is spent. The request fails with 410 if the code is used, expired, or belongs to another Momoto. A successful reset closes the person's open sessions. A person with a personal account is refused with 409 `personal_account`. #### Videos of the real product - **A code for someone who forgot their password** (0:27): https://momoto.io/docs/proof/act-03/3.17a-password-code/clip.mp4 1. In «People», on Diego's row, «Password code». Momoto confirms it is her and shows it only once 2. She passes it to Diego wherever they already talk, and closes the notice: it is not shown again - **Setting a new password with the code** (0:39): https://momoto.io/docs/proof/act-03/3.17b-new-password/clip.mp4 1. His Momoto greets him by name, but he does not remember the password. «Forgot your password?» tells him what to ask for 2. A made-up code does not work 3. With the one Marisol passed him, he sets his new password and signs in ### Roles https://momoto.io/docs/#/p/people/roles A role says what a person may do at the hub. Momoto ships a few presets; you can make your own roles in «Roles», give them to one person in one organization, and let a role do things the presets do not. #### How roles add up Each person has a preset role for the whole platform, and can have a custom role in each organization. What she may do is the sum of all of them. That is why the preset role stays at «Viewer»: it only reads, and everything extra comes from the custom role. A role only limits what a person does at the hub. On her own Momoto, she still decides everything about her own agents. - **Viewer**: Reads. It grants nothing that changes data. - **Member**: Viewer, plus working in her own sessions, the vault and memory, and putting apps on the organization's host. - **Custom role**: Any set of permissions you choose, starting from a copy of another role. #### Editing the permission grid In «Roles», each cell has three states: **granted**, **denied** and **not assigned**. Pressing a cell saves it at once. A denial wins over a grant from another role. Under «Network», the cell «Upload apps to the organization's host» lets a person with the role put apps on the hub. It is off for Viewer and granted for Member. The change reaches everyone who carries the role. Nobody needs to sign in again. #### Permissions that need care - **Edit agents** lets a person rename an agent and change its model. For an agent with an owner, only the owner chooses the model. - **Edit budgets** lets a person set an agent's daily cap. For an agent with an owner, only the owner sets it. - **Launch swarms** starts a swarm on behalf of one of the person's own agents, with that person's AI. It never gets more than that agent has. - **Cancel swarms** stops a swarm that is already running. #### Roles and the platform (for admins) Roles are shared by the whole platform. Creating or changing a role needs the permission at platform scope; an admin of one organization cannot do it alone. A role given in «Role in each organization» applies only to that organization. #### How it works (technical) The screen calls `GET /api/v1/roles/`, `POST /api/v1/roles/` (copies a `base_role`), `PATCH /api/v1/roles/{role_code}` and `PUT /api/v1/roles/{role_code}/permissions/{permission_code}`, with the state `true`, `false` or `null` for not assigned. Giving a person a role is `POST /api/v1/users/{user_id}/roles`; removing it is `DELETE /api/v1/users/{user_id}/roles/{assignment_id}`. An assignment with no organization is global; one with an `entity_id` applies to that organization only. The presets are defined in `momoto_core` as sets of permission codes. Viewer is the non-sensitive `:READ` permissions. Member adds `NETWORK_APPS:CREATE`, sessions, vault and memory. Permissions marked sensitive, such as `AGENTS:UPDATE`, `BUDGETS:UPDATE` and `WORKFLOWS:APPROVE`, ask for a step-up when used. Launching a swarm (`WORKFLOWS:CREATE`) and cancelling one (`WORKFLOWS:DELETE`) are not sensitive. A swarm needs a specialist agent the person can reach, and it runs with the intersection of the person's permissions and that agent's. #### Videos of the real product - **Giving a person a custom role** (0:34): https://momoto.io/docs/proof/act-05/5.17a-a-custom-role-for-renata/clip.mp4 1. In «People», Marisol edits Renata's row 2. She leaves her preset role at «Viewer», the one that only reads 3. And in «Role in each organization» she gives her «Sales» in «Quetzal Roasters» 4. She saves. Momoto confirms it is her - **Giving a role the permission to put apps on the hub** (0:31): https://momoto.io/docs/proof/act-05/5.17d-the-permission/clip.mp4 1. In «Roles», in the «Network» group, the cell «Upload apps to the organization's host» of the role «Sales» is not granted 2. Marisol grants it - **A custom role to work with an agent of his own** (0:56): https://momoto.io/docs/proof/act-07/7.10c-a-role-for-tomas/clip.mp4 1. In «Roles», Marisol creates «Accounting» starting from «Member» 2. She gives it «Create agents», «Edit agents» and «Edit budgets»; the rest stays as in «Member» 3. In «People», she edits Tomás's row 4. His preset role stays at «Viewer»; at «Quetzal Roasters» she gives him «Accounting» 5. She saves. Momoto confirms it is her - **A role that can launch swarms** (0:16): https://momoto.io/docs/proof/act-07/7.17a-contabilidad-runs-swarms/clip.mp4 1. In «Roles», Marisol gives «Accounting» «Launch swarms» and «Cancel swarms» ### Removing and requiring someone else's second factor https://momoto.io/docs/#/p/people/second-factor Use these two controls when someone lost their phone and their recovery codes, or when their second factor must be kept on. Removing a factor lets the person set up a new one; requiring it makes setup mandatory at their next sign-in. #### Before you start - You need the admin permission to manage second factors. Momoto asks you to confirm it is you first. - You cannot do this to yourself. Use your own account's security settings for your own factor. #### What each control does - **Reset MFA**: Removes the person's second factor and closes **all** their open sessions. Their next sign-in asks for no code, and they can set up a new factor. - **Require 2nd factor**: At their next sign-in they must set up a factor before they can continue. They cannot turn it off themselves. An admin can press «Stop requiring 2nd factor» on the same row to make it optional again; that does not remove the factor they already have. #### Common mistakes - Resetting when you only meant to require. A reset closes every session they have open. - Expecting the person to be signed in on your behalf. They must sign in again and set a new factor. #### How it works (technical) «Reset MFA» calls `POST /api/v1/users/{user_id}/mfa/reset` (`momoto_api.routers.users.reset_user_mfa`). It needs `USER_MFA:EXECUTE`, which is sensitive. It refuses the caller's own account with 409 `uses_my_account`. It removes the factor and revokes the person's sessions. «Require 2nd factor» calls `PUT /api/v1/users/{user_id}/mfa/required` with `{"required": true}` (`momoto_api.routers.users.require_mfa`). It uses the same permission and the same self-check. The platform owner always has a factor required, whatever this setting says. #### Videos of the real product - **Removing and requiring someone else's second factor** (0:39): https://momoto.io/docs/proof/act-07/7.16e-marisol-resets-and-requires-tomas-second-factor/clip.mp4 1. In «People», under «More» on Tomás's row, she presses «Reset MFA». Momoto warns her that all his sessions close, and confirms it is her 2. On the same row she presses «Require 2nd factor»: Tomás will have to turn it on at his next sign-in ### Suspend https://momoto.io/docs/#/p/people/suspend Suspending a person closes their access without deleting their account: they cannot sign in, and their agents stop working. Use it when someone must be kept out for now, for example while you look into a problem. Reactivating gives the account back. #### Before you start - You need an admin permission for people. Momoto asks you to confirm it is you first. - You cannot suspend yourself. Momoto also refuses to leave an organization without an admin. #### What happens - The person's open sessions are closed. - Their agents stop. Work that is running is interrupted, and their agents refuse new work and messages until the person is reactivated. - A swarm that they launched does not continue while they are suspended. It waits, with the reason shown, and the person who launched it resumes it once they are active again. #### Reactivating «Reactivate» gives the account back. The person can sign in and their agents work again. A swarm that was waiting is not restarted on its own: its launcher resumes it. #### How it works (technical) «Suspend» calls `POST /api/v1/users/{user_id}/suspend` (`momoto_api.routers.users_access.suspend_user`), and «Reactivate» calls `POST /api/v1/users/{user_id}/reactivate`. Both need `USERS:DELETE`, which is sensitive. Suspending yourself is refused with 409 `self_suspend`, and reactivating a person who is not suspended with 409 `not_suspended`. An agent whose owner is suspended is refused with 409 `owner_suspended` when it is started or sent a message. A swarm whose launcher is suspended does not resume (`launcher_suspended`, in `momoto_core`'s `resume_workflow`). #### Videos of the real product - **Suspending someone while their agent works** (0:49): https://momoto.io/docs/proof/act-07/7.17c-marisol-suspends-tomas/clip.mp4 1. In «Swarms» she sees the close Tomás launched: his agent is halfway 2. In «People», under «More» on Tomás's row, she presses «Suspend». Momoto asks her and confirms it is her 3. Back in «Swarms»: the step that was already running finished and the next one did not start. The close waits, with the reason - **Reactivating someone** (0:23): https://momoto.io/docs/proof/act-07/7.17d-marisol-reactivates-tomas/clip.mp4 1. In «People» Tomás's account is suspended. She presses «Reactivate» and confirms it is her ### His own AI and his first agent, with a browser only https://momoto.io/docs/#/p/people/web-only-agent A person who only uses the web can connect their own AI and make their first agent without installing anything. The agent runs at the hub and answers with that person's AI, never with the installation's or an admin's. #### Before you start - You need an account and a role that allows creating agents, such as the custom role «Accounting» in the example. - You need an API key from your AI provider. The key is typed into a masked field. - Momoto asks you to confirm it is you before it saves the key. Have your password or second factor ready. #### Steps - Open the hub's address. With your new role, Momoto asks you to connect your own AI. - Paste your key. Momoto checks it with the provider and then makes your first agent. - In «Agents», give the agent your name. - Choose its model. You can change it later. - In «Customize», set a daily cap. Your agent will not spend more than that in a day. - Ask it something about your work. #### What to keep in mind - The key is kept by the credential gateway and is never shown again. To change it, connect a new key; the old one is removed once the new one works. - If you disconnect your AI, your agents stop starting until you connect another. - Your agent runs at the hub, but it uses only your AI and your budget. #### How it works (technical) Connecting is `POST /api/v1/llm/mine` with `provider` and `credential` (`momoto_api.routers.llm_auth.connect_my_ai`). It asks for a step-up, validates the key live, and stores it as a secret in the credential gateway under a name tied to the person. The old key of that provider is deleted only after the new one exists. The agent is created with `POST /api/v1/agents/`. Its model is set with `PATCH /api/v1/agents/{agent_id}`, and its daily cap with `PATCH /api/v1/agents/{agent_id}/budget`. The budget route refuses anyone who is not the owner of an agent that has one, so an admin cannot change it. #### Videos of the real product - **His own AI and his first agent, with a browser only** (1:46): https://momoto.io/docs/proof/act-07/7.10d-tomas-own-agent/clip.mp4 1. He goes back to the hub's address. With his new role, Momoto asks him to connect his own AI 2. He pastes his Anthropic key; Momoto checks it and makes his first agent 3. In «Agents» he gives it his name 4. Right there he chooses its model: Haiku 5.5 5. In «Customize», a daily cap of one dollar 6. And he asks it something about his work ### A change that does not start is not published https://momoto.io/docs/#/p/store/a-change-that-does-not-start A change that does not start is never published. The app keeps the version that was running, the failed attempt is noted on the app's page, and the agent is told what the app said. Nothing you are using stops. #### What you will see - The app stays open and in use during the attempt. People are not cut off. - The app's page keeps a line saying the change did not start and was not applied. The version number does not change. - The agent receives the output of the app and can fix the code and send the change again. #### When the owner is told One failed change is for its agent to fix. If the same version keeps failing to start, the owner of the app gets a notice: after the second failed attempt within an hour, while the app is still on that version. The owner is not told about its own agents this way, because those tell the owner in their conversation. A change can also be refused when its packages do not install. Momoto counts that the same way. #### How it works (technical) - When the new code does not come up, the use case raises `AppDidNotStart` (code `app_did_not_start`). Its `details` hold `log`, what the app printed. The message says nothing was published and the previous code is running again. - Both reasons are in `DID_NOT_RUN` (`packages_failed` and `app_did_not_start`) in `momoto_core/usecases/land_app_change.py`. Each refusal is stored as an `app_change_rejected` event. - `_tell_the_owner` counts those refusals for the same app and version in the last hour. From two on, it emits one notice to the owner. #### Videos of the real product - **A change that does not start is not published** (1:53): https://momoto.io/docs/proof/act-04/4.10-does-not-start/clip.mp4 1. The app is open and in use meanwhile 2. Lucía asks her backend agent to send, on purpose, a change that does not start 3. The attempt is noted on the app's page: it did not start, it was not applied. The version is still the same ### Opening your flows to another person's agent https://momoto.io/docs/#/p/store/agent-service The «Agent service» label lets the people who may use an app also use it through their own agents. It gives nobody access, and it does not let anyone change the app. #### What it does Without the label, a person who may only use an app cannot use it through an agent. An agent can use the app only if its person may change the app. With the label on, whoever may use the app also uses it through their agents. The label does not change who may open the app. Turn it on for each app, in the app's «Share» section, and only for an app that others should be able to call from their agents. #### What you will notice - The label appears on apps that live at the hub. - It is off by default. - Each change is recorded as an event. #### How it works (technical) - `POST /api/v1/apps/{slug}/agent-service` with `{on}` calls `momoto_core.usecases.set_app_status:SetAppAgentService`. The owner or an admin may set it. The router `momoto_api.routers.apps:label_agent_service` handles it. - The check is in `momoto_core.usecases.ask_app:AskApp`. An agent's call goes through only when the person has modify on the app, or has use and the app's `agent_service` flag is on. - The flag is not a permission. It is read on each call and grants nothing by itself. #### Videos of the real product - **Opening your flows to another person's agent** (0:29): https://momoto.io/docs/proof/act-07/7.20d1-diego-opens-automations-to-tomas/clip.mp4 1. On the page of «Automations», Diego goes down to «Share» 2. He ticks that Tomás can use it, and not that his agents can modify it 3. He labels it an «Agent service»: whoever can use it also uses it through their agents ### An app on your computer https://momoto.io/docs/#/p/store/an-app-on-your-computer An app can live on the computer of the person who made it, not on the hub. Its code and the running app stay on that computer, and it opens while that computer and the hub are both on. Use it when a small app depends on one person's files or machine. #### What it means Every app in the store has a place where it lives. The card shows it: - **«In the hub»**: The code runs at the organization's hub. It opens while the hub is on. - **«On its owner's computer»**: The code and the running app stay on the owner's computer. The hub keeps only the card and the number of each version. It opens while that computer and the hub are both on. - **«Runs outside Momoto»**: Momoto keeps only the card and the address. See [An app outgrows the hub](https://momoto.io/docs/#/p/store/an-app-outgrows-the-hub). Nobody opens a port on the owner's computer. People and other apps reach the app through the organization's network, which hands each request to the app on that computer. #### What you will notice - If the owner's computer is off, the card says «Its owner is not connected». Nothing is lost: the app opens again when the computer is back. - An app on a computer cannot use other apps of the store yet. Other apps can use it. - What the app has saved stays on the owner's computer. It does not go to the hub. #### Sharing it For an app that lives on a computer, the only thing you can share is «Can use it». Nobody else can change its code: only its owner's agents can. Granting access asks you to confirm it is you. To move the app to the hub later, see [Where an app lives](https://momoto.io/docs/#/p/store/where-an-app-lives). #### How it works (technical) The place is stored on the app (`location`: `host`, `local` or `elsewhere`). The share screen calls `PUT /api/v1/apps/{slug}/permissions/{for_user_id}` with `{use, modify}`. The handler `momoto_api.routers.apps:share` always requires the step-up `NETWORK_ACCESS:UPDATE`, then runs the share use case. - `share_of` refuses `modify` for an app whose location is `local`. The web app shows only «Can use it» for these apps. - Permission rows and app links are kept at the hub, whatever the place of the app. - Access is computed by `momoto_core.usecases._apps:access_of`. The owner always has use and modify. - Who may pause an app depends on its place. See `momoto_core.usecases.set_app_status:SetAppStatus`. #### Videos of the real product - **An app that lives on its owner's computer** (1:51): https://momoto.io/docs/proof/act-05/5.02a-an-app-on-his-computer/clip.mp4 1. Diego asks his agent for the price list as a small app 2. The agent asks where it lives. This time he answers: on my computer 3. The card says where it lives: «On its owner's computer» - **Sharing an app that lives on your computer** (0:35): https://momoto.io/docs/proof/act-05/5.02b-share-it/clip.mp4 1. On the page of «Prices», «Share» offers only who may use it 2. Diego ticks Lucía, Marisol and Renata, confirming it is him - **Opening an app that runs on a colleague's computer** (0:16): https://momoto.io/docs/proof/act-05/5.02c-lucia-opens-it/clip.mp4 1. In Lucía's store, «Prices» says it lives on its owner's computer. She opens it and sees the list ### An app outgrows the hub https://momoto.io/docs/#/p/store/an-app-outgrows-the-hub An app can start at the hub and later run on a server of its own, outside Momoto. Momoto then keeps only its card and its address: no code and no versions. Its owner still decides who may use it, as with any other app. #### The steps - Your agent builds the app and puts it at the hub, or on your computer. - You share it with the people who need it. Another app can use it only after its owner's yes (see [An app uses another](https://momoto.io/docs/#/p/store/an-app-uses-another)). - When the app runs on its own server, someone who runs the hub connects that server to the store. The card then says «Runs outside Momoto», and it opens like any other app. #### What you will notice - An app that runs outside Momoto has no code in Momoto. Its card does not offer moving it, and nobody can change its code from Momoto. - A name the store already uses cannot be given again. An address of the hub's own machine is refused. #### Connecting an app to the store (for admins) Connecting is done at the hub, in the store, under «Connect an app that already runs». Give its usual name and its server's address. A member's agent cannot do it from a personal Momoto: that request is refused, and the agent should ask whoever runs the hub. #### How it works (technical) `POST /api/v1/apps/connected` calls `momoto_core.usecases.connect_app:ConnectApp`. It requires `NETWORK_APPS:CREATE`, and it refuses a member's own Momoto (the route answers 409 with the code `connect_from_the_hub`). - The name must be free in the network. A name held by a different app is refused with a conflict. The same owner may reuse the name of a withdrawn app. - The address is checked with `outside_address`. An address of the hub's own machine is refused. - Momoto stores the card and the address. It holds no code, no versions and no container for it. - The app's `my_access` never allows modify, and code operations are refused for it. #### Videos of the real product - **A reports app, made by an agent** (3:09): https://momoto.io/docs/proof/act-07/7.15a-ivan-builds-reportes/clip.mp4 1. For an everyday job Iván takes «Infra» back to the cheaper model, in «Customize › Model chain» 2. In «Skills» he gives it back the apps skill, taken away when it only went into servers 3. He asks it for «Reports»: the roaster's monthly report, as a page and as data for other apps 4. The agent asks where the app lives. Iván answers: at the hub 5. In «More › Store» «Reports» is already there: it is his and it lives at the hub 6. On the app's page, «Share»: Lucía may use it and nobody else - **The CRM uses someone else's reports** (1:32): https://momoto.io/docs/proof/act-07/7.15b-the-crm-uses-reportes/clip.mp4 1. Lucía asks her backend agent for a panel with the monthly report from «Reports» 2. The CRM's page says so: it uses «Reports», and waits for Iván - **Letting another app use yours** (0:19): https://momoto.io/docs/proof/act-07/7.15c-ivan-allows-the-crm/clip.mp4 1. In «Approvals», «From your organization»: Lucía's CRM wants to use «Reports». He allows it - **The reports, in her store and inside the CRM** (0:31): https://momoto.io/docs/proof/act-07/7.15d-lucia-sees-the-reports/clip.mp4 1. Lucía opens «Reports» from her store: the report from September to November 2. She opens her CRM: the «Monthly report» panel now brings the figures - **The agent takes the app to a server of its own** (2:49): https://momoto.io/docs/proof/act-07/7.15e-infra-runs-reportes-outside/clip.mp4 1. In his project's connections Iván adds another one over SSH: the reports server, with its address, the user and the .pem key 2. In «Infra»'s «Security» he adds that server to the places it may go out to, and restarts it so it takes both changes 3. He asks it to take «Reports» to that server and leave it running as a service of the machine 4. And to connect it to the store. From his Momoto it cannot be done: that is done at the hub - **Connecting an app that runs elsewhere to the store** (1:19): https://momoto.io/docs/proof/act-07/7.15f-marisol-connects-the-outside-app/clip.mp4 1. In the hub's Store, «Connect an app that already runs»: its usual name and the server's address 2. The store already holds that name. Under another name, but with the hub's own address by mistake: no either 3. With the server's address it is connected, and its page says so: it runs outside Momoto 4. She shares it with those who read the reports: Lucía and Iván 5. In the Store, its card: it runs outside Momoto - **The CRM moves to the outside reports** (1:55): https://momoto.io/docs/proof/act-07/7.15g-the-crm-switches-to-the-outside-reports/clip.mp4 1. Lucía opens «External reports» from her store: it runs outside Momoto and opens all the same 2. She asks her backend agent to have the CRM read from «External reports» 3. The CRM's page says so: it uses «External reports», and waits for Marisol - **Letting the CRM use an outside app** (0:34): https://momoto.io/docs/proof/act-07/7.15h-marisol-allows-the-crm/clip.mp4 1. In «Approvals»: the CRM asks to use «External reports». She allows it 2. She opens the CRM from her store: the «Monthly report» panel now brings the outside figures - **The hub's copy is withdrawn** (0:30): https://momoto.io/docs/proof/act-07/7.15i-ivan-withdraws-the-hub-copy/clip.mp4 1. His store keeps «External reports», and it still opens: it runs on the server ### An app uses another https://momoto.io/docs/#/p/store/an-app-uses-another An app can use another app of the store: a CRM that reads a price list, for example. The app names the other one in its code, and the owner of that other app decides whether the call goes through. Until the owner allows it, the call waits. #### Before you start - The app that uses another must say so in its code. Its `momoto.json` lists the apps it uses, by their short names. Without that list, the app cannot reach the other one at all. - The owner of the app being used decides. Allowing asks you to confirm it is you. Saying no does not ask. - Someone who can change the caller (its owner, or someone with modify on it) can make it read this app once it is allowed. That is why allowing is a sensitive step. #### What you will notice - The caller's page says what it waits for: «uses» the other app, and waits for its owner. - When the owner allows it, the next call goes through. Nothing has to restart. - When the owner says no, the caller keeps working. It was written to say when it waits for access. - After a no, only the owner can change it, from the app's own page: in the store, under «Share», the list of apps that asked to use it. «Remove» cuts the next call and keeps the row, so it can be allowed again without the other app asking again. #### Limits An app that lives on its owner's computer cannot use other apps yet. It can still be used by others. Each use is one way: the caller reaches the other app, and nothing wider than that. See [An app on your computer](https://momoto.io/docs/#/p/store/an-app-on-your-computer). #### How it works (technical) The caller's code declares its uses in `momoto.json` at the root of the app, with the key `uses`: a list of up to `MAX_USES` apps of the store, each once, by slug. The parser is `momoto_core.domain.app_kind:uses_of`. The caller gets each address in an environment variable named by `link_variable`: `APP__URL`, with the slug in upper case and dashes turned into underscores. - `PUT /api/v1/apps/{slug}/links/{caller}` with `{allowed: true}` allows the use. It requires the step-up `NETWORK_ACCESS:UPDATE`. - `PUT` with `{allowed: false}` refuses it, with no step-up. `DELETE` on the same path does the same and keeps the row as refused, so it can be allowed again. - The owner of the caller is told when a use is refused or removed. - The use case is `momoto_core.usecases.set_app_link:SetAppLink`. The network applies the change on its next pass, so the next call goes through with no restart. #### Videos of the real product - **One app uses another: naming which** (1:34): https://momoto.io/docs/proof/act-05/5.03a-the-crm-names-what-it-uses/clip.mp4 1. Lucía asks her agent to make the CRM use Diego's price list and flows 2. The CRM's page says so: it uses both, and waits for Diego - **The owner decides which apps use theirs** (0:31): https://momoto.io/docs/proof/act-05/5.03b-diego-allows-one/clip.mp4 1. In «Approvals» there are two requests: Lucía's CRM wants to use «Prices» and «Automations». He allows the price list 2. And he says no to the flows, for now - **One was allowed and one was not** (0:17): https://momoto.io/docs/proof/act-05/5.03c-one-answers-one-does-not/clip.mp4 1. Lucía's CRM page already says it: it uses «Prices», and for «Automations» Diego said no - **Changing his mind: allowing an app from «Share»** (0:44): https://momoto.io/docs/proof/act-05/5.03d-diego-allows-the-other/clip.mp4 1. On the page of «Automations», «Share» lists the apps that asked to use it: the CRM, to which he said no 2. Now he allows it, confirming it is him 3. «Remove» cuts the CRM's next call, but the row stays, as refused, with «Allow» at hand 4. He allows it again from the same row, without the CRM having to ask again - **The CRM now uses both** (0:17): https://momoto.io/docs/proof/act-05/5.03e-both-answer/clip.mp4 1. Lucía's CRM page: it uses «Automations» and «Prices», waiting for nobody - **The CRM's owner lets «Dashboard» read it** (0:19): https://momoto.io/docs/proof/act-05/5.14b-lucia-allows-it/clip.mp4 1. In «Approvals», Marisol's «Dashboard» asks to use the CRM. Lucía allows it ### Approve a request https://momoto.io/docs/#/p/store/approve-a-request When someone asks to use or change one of your apps, the request waits in your «Approvals» under «From your organization». You decide there, and Momoto asks you to confirm it is you before it tells the hub. #### Before you start - You approve requests for apps you own. An administrator does not approve them for you; the app's owner does. - Approving needs a recent confirmation of it being you. Momoto asks for your second factor, or for your password when you have not set up a second factor. If you have neither, it asks you to set one up first. #### Approving a request - Open **Approvals**. Under **From your organization**, read the request. For example: «Renata wants to use the CRM». - Press **Approve**. Momoto asks you to confirm it is you, then sends your answer to the hub. - Or press **Reject**. The person can ask again only after 24 hours. Requests from people who only use the web work the same way. The hub is the server they reach through the network, and nothing changes for you. #### What you will notice - After approving, the person's card changes on its own. You do not have to tell them. - The box lists everything your organization changed for you since you last answered. Press **Ready** once you have read it; this clears the list. - A change that was already answered somewhere else is shown as changed. Reload the list and decide again. #### How it works (technical) The panel is `packages/momoto-web/src/v2/inboxes/FromYourOrganization.tsx`. Approve and Reject call `resolveRequestForMe` in `src/api/network.ts`, which posts `{approval_id, approve}` to `POST /api/v1/me/network/member/requests-for-me`. The call is wrapped in `withStepUp`, so the confirmation is asked first and the action repeats once it is given. The server enforces the confirmation in `require_step_up` (`momoto_api/guards.py`) when the session records when the second factor was used. It accepts a factor used within the last few minutes. Ready sends the responses to the changes list with `respondChanges`. The hub returns 409 if the list changed while you read it, and the panel reloads. #### Videos of the real product - **The owner approves from her own Momoto** (1:07): https://momoto.io/docs/proof/act-04/4.15b-lucia-approves/clip.mp4 1. In Lucía's notices, under «From your organization», there is a request: Renata wants to use the CRM. She reads it and approves it, confirming it is her - **The owner approves someone who only uses the web** (0:21): https://momoto.io/docs/proof/act-07/7.11b-lucia-approves-tomas/clip.mp4 1. In Lucía's notices, under «From your organization», Tomás asks to use the CRM. She approves it, confirming it is her ### Apps talk to slack https://momoto.io/docs/#/p/store/apps-talk-to-slack This is a worked example: a deal marked «Won» in the CRM posts a message to Slack. The CRM does not know Slack. An n8n flow, kept in the store as «Automations», does the posting, and the Slack key lives inside n8n. #### What you need - The CRM and the flow app must both be in the store. The CRM must be allowed to use the flow app (see [An app uses another](https://momoto.io/docs/#/p/store/an-app-uses-another)). - A Slack bot key, with access to the channel you want to post in. - A person who may sign in to n8n through «Automations». #### Where the key lives You type the Slack key into n8n's own field, and it stays there. Momoto does not store it and does not pass it on. The CRM never sees it. Slack's own pages are not part of Momoto; n8n posts to Slack on the internet with the key it holds. The n8n screens are in English because they are n8n's own. #### What you will notice - A message carries the deal's title, its account and its amount. - Each call from the CRM is one run in n8n. Its log keeps Slack's answer, so a failed post can be found there. - A second flow can reuse the Slack key that n8n already holds. See the flow that posts notices in the same store. #### How it works (technical) The flow app is an app of the store that runs n8n, installed like any other app. The CRM names it in its `momoto.json` under `uses`; the call goes through the organization's network after the owner's yes. The CRM reads the flow's address from `APP__URL`, built by `momoto_core.domain.app_kind:link_variable`. - The network allows only the uses that were approved. Nothing else of the installation is reachable from the CRM. - n8n has its own credentials store, separate from Momoto's secrets. #### Videos of the real product - **Diego builds the «deal won → Slack» flow in n8n** (1:12): https://momoto.io/docs/proof/act-05/5.04a-diego-builds-the-flow/clip.mp4 1. Diego opens «Automations» from the store and signs in to n8n with his account 2. A new flow: first a webhook, the address the CRM calls 3. It takes a POST at /deal-won 4. Then, a Slack message 5. Diego connects n8n to Slack: he pastes the bot key into n8n's masked field 6. The channel, by its name: #quetzal-sales 7. The message carries the deal's title, its account and its amount 8. Without the link to the flow that n8n adds on its own 9. He saves it with its name: «Deal won to Slack» 10. And he publishes it: from now on, every call from the CRM goes to Slack - **A won deal reaches Slack** (0:32): https://momoto.io/docs/proof/act-05/5.04b-a-won-deal-reaches-slack/clip.mp4 1. Lucía opens her CRM from the store and goes to the deals board 2. She opens a new deal in «proposed»: «Specialty coffee for a hotel · 00:31» 3. She closes it: on its card she moves it to «Won» 4. The deal stays in «Won». The CRM tells n8n through the organization's network, and n8n posts it in Slack - **Diego sees the flow's run and Slack's answer** (0:31): https://momoto.io/docs/proof/act-05/5.04c-diego-sees-the-run/clip.mp4 1. Diego opens «Automations» from the store and signs in to n8n 2. He opens his flow «Deal won to Slack» 3. Its runs: the newest is the one from Lucía's deal, a success 4. In the run's log, what Slack answered: ok, the channel and the message with the deal - **A flow of notices to Slack** (1:01): https://momoto.io/docs/proof/act-07/7.20d2-diego-builds-a-notices-flow/clip.mp4 1. Diego opens «Automations» from the store; his deal-won flow is there 2. A new flow: a webhook that takes a POST at /notices 3. Then a Slack message to #quetzal-sales, with the key n8n already keeps 4. The message is whatever text it is sent 5. He saves it as «Notices to Slack» and publishes it ### Ask for a change https://momoto.io/docs/#/p/store/ask-for-a-change You do not need access to an app to ask for a change to it. You write what you want in your own words, the request waits at the hub, and it reaches the app only after its owner signs it. #### Before you start - The app must be published and have at least one version. Nobody asks for changes to an app that has nothing yet. - You cannot ask for a change to an app you own. Change your own app by asking your own agent. - You may have up to 5 requests waiting at once. #### Asking, step by step - Open the app in the store. Press **Request a change**. - Write the change in your own words, up to 1000 characters. - Send it. The request waits at the hub for the owner's signature. - On the app's page, **Requests** shows what became of it. Your words do not reach the owner's agent directly. The owner reads them, and only what they approve is handed to the agent, on their computer. The agent names who asked. #### When the owner's computer is off The request does not need the owner's computer to be on to be sent. It waits at the hub. When the owner's Momoto starts and the owner signs, it hands the request to the app's agent, once. Nothing reaches the agent until the owner signs. #### Limits - A request that nobody signs for 7 days expires. - You never see the owner's agent or its conversation. You see only your request and what became of it. #### How it works (technical) The button calls `POST /api/v1/apps/{slug}/requests` (`request_change` in `momoto_api/routers/apps.py`), with a body of `{text}` (`RequestBody`: between 1 and 1000 characters, no NUL bytes). A member's Momoto sends it through the hub's network route. - The app must be published and have a version. - The caller must not be the owner. - The app must not live on another computer for this caller. - Each person has at most 5 requests pending. - A request waits 7 days for a signature before it expires. The request is an approval in the owner's queue. When it is signed, the owner's Momoto collects it and writes it to the app's agent. The hub records which conversation received it, so it is delivered once. Asking for a change needs no use permission, because the owner decides. #### Videos of the real product - **Asking another person's agent for a change** (0:25): https://momoto.io/docs/proof/act-04/4.17a-diego-asks-for-a-change/clip.mp4 1. Diego uses Lucía's CRM and wants a change. In the store he presses «Request a change» and writes it in his own words - **The owner signs the request and her agent does it** (0:59): https://momoto.io/docs/proof/act-04/4.17b-lucia-signs-the-change/clip.mp4 1. In Lucía's notices, under «From your organization», is Diego's request. She reads it and approves it 2. Her Momoto hands it to the app's agent, which makes the change and saves it - **The request is done** (0:23): https://momoto.io/docs/proof/act-04/4.17c-diego-sees-it-done/clip.mp4 1. On the app's page, «Requests» says what became of what he asked 2. He opens the CRM and the change is there - **Asking for a change to an app whose owner is off** (0:26): https://momoto.io/docs/proof/act-08/8.04a-a-change-while-he-is-off/clip.mp4 1. Diego's computer is off, and «Labels» lives on it. Lucía cannot open it, but in the store she presses «Request a change» and writes it - **He turns on, signs the request and his agent gets it once** (1:30): https://momoto.io/docs/proof/act-08/8.04b-he-turns-on-and-signs/clip.mp4 1. Diego turns his computer on. In his notices, under «From your organization», is Lucía's request. He reads it and approves it 2. His Momoto hands it to the app's agent, which makes the change and saves it ### Ask for access https://momoto.io/docs/#/p/store/ask-for-access If you see an app in the store with «No access», you can ask its owner for it from the card. Your request waits at the hub until the owner signs it, and then your card changes on its own. #### Before you start - You need the network permission to request access (`NETWORK:READ`). Your role must include it. - You can only ask for an app that exists in the store. Your own computer does not need to be running the app, and the owner does not need to be online. - Your request is for one app. Asking for it again while the first request is pending does not create a second one. #### Asking, step by step - Open the store and find the app. Its card reads «No access». - Press «Request access». Write what you want the app for, and send it. - Wait. The owner gets the request in their «Approvals», under «From your organization». You do not need to do anything else. - When the owner approves, your card reads «Open» on its own. Nothing is installed or configured on your computer for it. Until the owner approves, the network does not let your computer reach the app. If you type its address, you get Momoto's own page, not the app. #### Limits and common mistakes - **The request waits 24 hours.** If nobody signs within that time, it expires, and you ask again. - **A rejection blocks a new request for 24 hours.** After the owner says no, «Request access» will refuse you until that time has passed. - **An approval can be used for 24 hours.** If you came back later, your request is matched by the same person and the same app, so retrying the same request is what finishes the access. - **Your reason is a note.** The owner reads it with the request. It does not change what the request asks for. #### How it works (technical) The card calls `POST /api/v1/me/network/accesses` with `{app, reason}`. The hub's version is `POST /api/v1/network/hub/requests`, which a member's Momoto uses when it is not the hub. The handler `request_access` in `momoto_api/routers/network_me.py` sends the request to `RequestNetworkAccess.execute` in `momoto_core/usecases/request_network_access.py`. - **200**: `{granted: true}`. You already had it, or the owner's approval was just redeemed. - **202**: `{status: "pending", approval_id, owner_connected}`. Waiting for the owner. `owner_connected` says whether the owner's computer was seen recently; when Momoto knows nothing about the owner's computers, it is true. - **403**: `access_rejected`. The owner rejected it less than 24 hours ago. For an app of the store, the approval is recorded for the app (resource `app:access:`) and it goes to the app's organization. The owner is the one who signs. When it is redeemed, the use case writes the network grant `app:` and also gives the person the store's use permission, which is where the owner later sees it and can take it back. Timings are constants in the same module: `REQUEST_TIMEOUT_S` (24 hours, the wait for a signature and the wait after a rejection) and `REDEMPTION_WINDOW_S` (24 hours, how long a signature can be redeemed). #### Videos of the real product - **Asking for access to an app** (0:29): https://momoto.io/docs/proof/act-04/4.15a-renata-asks/clip.mp4 1. Renata sees the CRM in the store, but «No access». If she types its address, the network does not let her through 2. She presses «Request access», writes what she wants it for and sends it - **With access approved, the app opens** (0:22): https://momoto.io/docs/proof/act-04/4.15c-renata-opens/clip.mp4 1. Renata's card changed on its own: it now says «Open» 2. She opens the CRM and sees the team's accounts ### The app grows version by version, and is used https://momoto.io/docs/#/p/store/change-an-app An app grows by changes. Each time an agent saves one, the hub records it as a new version of the app. A change is published only if the app starts with it, so the version people are using keeps answering while the agent works. #### What happens with each change - Each change an agent saves is one version. Three changes make three versions, and each shows in the app's history with the agent that made it. - Until the new version starts, the version that was running keeps answering. If it does not start, it is not published (see «A change that does not start is not published»). - The app keeps what people type. A new version changes the code and its packages, not the data the app has already saved. #### What you will notice - In the store, the card is several versions ahead of the first one. «By» shows the owner and the current version. - On the app's page, «Changes» has one line per conversation in which an agent landed changes. Open it to see the files. - Asking for a change in the same app from another agent at the same time works too. See «Three agents change the same app at the same time». #### How it works (technical) The agent sends each change to `POST /api/v1/agent-apps/{slug}/changes` (`agent_changes`). The body names the files, the `base` it started from (the version it read), a note and, when it answers a request, `request_id`. The change runs through `LandAppChange.execute` (`momoto_core/usecases/land_app_change.py`), which: - requires `NETWORK_APPS:CREATE` and modify rights on the app; - refuses a paused app (`AppChangesPaused`, code `changes_paused`); - joins the change with the versions that arrived after its `base` (see the next page); - starts the new code. If it does not start, nothing is recorded (`AppDidNotStart`); - records a new version. If the change leaves the files as they were, `changed` is false and no version is made. The list is `GET /api/v1/apps/{slug}/changes`, newest first and paged with `before` and `limit`. #### Videos of the real product - **The app grows version by version, and is used** (1:43): https://momoto.io/docs/proof/act-04/4.04-more-versions/clip.mp4 1. Lucía asks her frontend agent for three changes, each saved on its own: contacts, deals with their board, and activities 2. In the store the card is already several versions ahead 3. She opens it and uses it: she adds an account and looks at what is new ### Taking an app back to an earlier version https://momoto.io/docs/#/p/store/go-back-to-a-version Going back takes an app to an earlier version: its code and packages become those of that version again. Nothing is erased. Going back is one more version in the history, so you can return to today's version the same way. #### Before you go back - Open the change of the version you want. If newer versions exist, the page shows «Go back to this version» and says how many later changes it undoes. - The app's **code and packages** go back. What the app saved in its database does **not** go back. Its data stays as it is now. - Agents can keep changing the app after you go back. If you want it to stay as it is, pause its changes first (see «The owner's brake»). - The button appears only for an app that runs at the hub, and only if you may modify the app. #### Going back, and returning - Open the version you want, and press «Go back to this version». - Read the question, which names the version, and confirm with «Go back». - The app restarts with that version's code. Its data is still there. The history gets a new line, «Went back to version N». To return to a later version, open that version and use the same button. The people whose changes were undone are told. #### How it works (technical) The button calls `POST /api/v1/apps/{slug}/revert` (`go_back`), which runs `RevertApp.execute` (`momoto_core/usecases/revert_app.py`): - needs `NETWORK_APPS:CREATE` and modify rights; the app must be at the hub and published; - the target must be a version from 1 to the current one; - it lands the target's files and its resolved package constraints as a new change, with `reverted_to` set and the note «Went back to version N» unless you give one; - an agent's session cannot go back while the app's changes are paused (`AppChangesPaused`); a person can; - each author whose changes were undone gets one notice, never the person who went back. The agent route is `POST /api/v1/agent-apps/{slug}/revert` (`agent_reverts`). #### Videos of the real product - **Taking an app back to an earlier version** (0:53): https://momoto.io/docs/proof/act-04/4.08-going-back/clip.mp4 1. The CRM is at version 8. Lucía opens the change of version 6 and picks «Go back to this version»: the page says what is undone and what is not 2. The app runs again as in that version, and its data is still there 3. Nothing was erased: going back is one more change. With the same button she returns to today's version ### Install an open tool https://momoto.io/docs/#/p/store/install-an-open-tool An agent can turn an open tool, such as the n8n automation server, into an app of the store. The app runs at the hub, in its own container, and you open it from the store like any other app. #### Before you start - You need an agent to build the app. The recorded run created one for the automations, with a name, what it does, the cheapest model, its instructions and a daily cap. - Installing takes a while. The recorded run waited for about 3 GB of packages to download before the app started. #### Where the app lives When the agent publishes the app, Momoto asks where it lives: - **At the hub**: Always on. The package is uploaded to the hub and runs there. Anyone the owner shares it with can open it. - **On my computer**: The app runs on your computer and is available only while it is on. In the recorded run, Diego answered «at the hub», and «Automations» appeared in **More › Store** as his app, living at the hub. #### Opening it Open the app from the store. n8n opens in another tab, through the organization's network. Who may reach it is decided by the store and the network. What the person does inside is n8n's own business. - n8n keeps its own accounts, separate from Momoto's. The recorded run signed in with the account Diego already had in n8n. - n8n's screens are in English, because they are n8n's. #### How it works (technical) The publish step is in `momoto_api/routers/apps.py`. It carries a `location` of `host` or `local`. When the field is missing, the agent's request is answered with `where_required` and the person is asked where the app lives. An app at the hub is uploaded with `location: host`. An existing app can be moved later with `POST /api/v1/me/network/member/apps/{slug}/to-host` or `.../to-my-computer`. The n8n package is a small Node app whose only dependency is n8n. The hub installs it and runs it in its own container, with its own data folder. Who may open it is the permission described in [Share an app](https://momoto.io/docs/#/p/store/share-an-app). #### Videos of the real product - **An agent installs n8n as an app of the store** (2:21): https://momoto.io/docs/proof/act-05/5.01a-n8n-by-an-agent/clip.mp4 1. Diego makes an agent for the automations: its name, what it does, the cheapest model, its instructions and a daily cap 2. He asks it for n8n as an app of the store 3. The agent asks where the app lives. Diego answers: at the hub 4. In «More › Store» «Automations» is already there: it is his and it lives at the hub - **Opening n8n from the store and making its account** (0:29): https://momoto.io/docs/proof/act-05/5.01b-n8n-first-use/clip.mp4 1. Diego opens «Automations» from the store: n8n opens in another tab, through the organization's network 2. n8n already has his account: Diego signs in with it 3. He is in: the list of flows, still empty ### Let others change an app https://momoto.io/docs/#/p/store/let-others-change-an-app An app's owner can let another person's agents change the app, which is separate from letting that person open it. An agent can change an app only when the owner has given that permission, and the version records both the agent and the person it worked for. #### The rule People change an app by asking an agent, never by editing it by hand. So the owner decides which people's agents may change it, in «Share», under «Their agents can modify it». - Being able to open an app is not being able to change it. Renata can open the CRM, but her agents do not change it. - The agent runs on its owner's computer, with its owner's AI. The app runs at the hub. - If an agent asks for a change it is not allowed to make, the hub says no, and the agent tells the person. #### What you will notice - When Lucía ticks «Their agents can modify it» for Diego, Diego's agent can land a change on the CRM. - The version names two authors: the agent that wrote it, and the person it worked for. - The owner can see who changed what in the app's history, and can go back to an earlier version. #### How it works (technical) The box is the `modify` field of `PermissionBody` on `PUT /api/v1/apps/{slug}/permissions/{for_user_id}`. Modify is stored with the use permission and only applies to apps that live at the hub. When an agent sends a change, the hub checks that its person holds modify on the app. Without it the change is refused with «You don't have permission to modify this app.», and nothing is written. The agent-side changes route is `POST /api/v1/agent-apps/{slug}/changes` in `momoto_api/routers/apps.py`. Each saved version keeps both authors, so the history shows the agent and the person it worked for. The owner's own changes go through the same route as any other author. #### Videos of the real product - **Letting another person's agents change your app** (0:28): https://momoto.io/docs/proof/act-04/4.18a-let-their-agents-modify/clip.mp4 1. In «Share», Lucía ticks «Their agents can modify it» for Diego 2. And for Marisol. Renata can open the app, but her agents do not change it - **Another person's agent changes the app** (1:20): https://momoto.io/docs/proof/act-04/4.18b-diegos-agent-changes-it/clip.mp4 1. Diego asks his agent for a change to Lucía's CRM. Because she allowed it, the change goes in - **Being able to use an app is not being able to change it** (1:15): https://momoto.io/docs/proof/act-04/4.18c-renatas-agent-is-refused/clip.mp4 1. Renata can open the CRM. She asks her agent to change it: the hub says no, and the agent tells her ### Three agents change the same app at the same time https://momoto.io/docs/#/p/store/many-agents-on-one-app Several agents can change the same app at the same time. Each one sends its change against the version it started from, and the hub joins the changes it receives line by line. This page explains what happens when two changes touch the same lines. #### What happens - No agent holds a copy of the app to push. Each one sends its change to the hub with the version it read. - If two changes touch different lines of a file, both land. The hub joins them and the app runs with both. - If two changes touch the same lines, the later one is refused with a message: somebody else changed the same thing, nothing landed, bring the app up to the newer version, redo the change on top and send it again. The agent reads the new code and tries again. - For a few seconds after such a collision, those files take changes from the agent that collided only. If another agent sends a change to them meanwhile, it is asked to send it again a few seconds later. Which agent collides, if any, differs from one run to the next. What you should see is one version per agent, and the app running with all of them. #### Handing out the work Your account has an agent named **Admin**. It can hand a job to your other agents, one part each, and then gather their answers. It thinks with the AI you connected in *Your account › AI*, and the model it uses is the one you choose there. On the app's page, «Changes» shows one line for each agent that changed it. #### How it works (technical) Each change carries its `base`. `LandAppChange` compares the files with what landed after that base: - Different lines of the same file are joined (`_merge_lines`). - A change that touches what somebody else changed since its base, where the server cannot merge, is refused with `AppChangeConflict` (code `change_conflict`). Its `details` hold the head version and, per file, the three sides, so the agent can redo the change on top. - While a file is being redone after a conflict, a change to it from another author gets `AppPathReserved` (code `path_reserved`) with `retry_after_s`. Nothing of that change was read; the same change sent again later is taken as it is. The turn is per file and lasts a short time (`domain.app_turns`). The `Admin` agent is created for each account (`momoto_core/domain/admin_agent.py`). #### Videos of the real product - **Three agents change the same app at the same time** (2:51): https://momoto.io/docs/proof/act-04/4.05-three-at-once/clip.mp4 1. The one that hands work to her agents is her Momoto's «Admin» agent. It has no owner: it thinks with the installation's AI, which Lucía connects in «Your account › AI» 2. She leaves Admin on the cheapest model 3. She asks it to hand out three changes at once: one to the backend agent, one to the frontend one and one to the security one 4. The three work at once, each in its own conversation, and send their change to the same app. At the end Admin gathers the three answers 5. On the app's page, «Changes» has one version for each agent 6. The app runs with the three changes together ### Open from the web https://momoto.io/docs/#/p/store/open-from-the-web Someone with only a browser can open an app that lives at the hub, once its owner allows it. They ask for access from the store, the owner decides, and then «Open» starts the app at its own address over HTTPS. Nothing is installed on the browser's computer. #### Asking for an app - In the store, an app you may not open shows «No access». Typing its address does not get you in. - Press «Request access», write what you want the app for, and send it. The request waits for the app's owner, wherever that person works. - When it is allowed, the card changes. Open the app again from the store. #### Opening it «Open» asks the hub for a pass to the app. The app opens at its own name, with HTTPS. The pass is short-lived: if it is not used within a minute, you press «Open» again. - The network connects to the app as you. Without your permission, the network does not open the connection. - Apps that live on someone's computer, and apps outside Momoto, follow their own rules. See [An app on your computer](https://momoto.io/docs/#/p/store/an-app-on-your-computer). #### How it works (technical) The store calls `POST /api/v1/me/network/accesses` with the app and your reason. Your request waits for the owner. When you press «Open», the page calls `POST /api/v1/apps/{slug}/web-ticket`. - The handler is `momoto_api.routers.apps_web:web_ticket`, which calls `momoto_core.usecases.open_app_from_web:OpenAppFromWeb`. It returns a link of the form `https://{slug}.{apps web host}/_momoto/enter?ticket=…`, with `Cache-Control: no-store`. - A ticket that is not redeemed within 60 seconds lapses. Redeeming it opens a session at the app. The session lasts for the time left on your Momoto session, up to 12 hours (`MAX_TTL_S = 43200`). - While the network is not ready, the route answers 503 with `Retry-After`. Apps on someone else's computer are not opened from the web by this route. #### Videos of the real product - **Asking for an app from the web** (0:37): https://momoto.io/docs/proof/act-07/7.11a-tomas-asks-for-the-crm/clip.mp4 1. In the hub's store, Tomás sees the CRM, but «No access». If he types its address, he does not get in 2. He presses «Request access», writes what he wants it for and sends it - **Opening an app from the web** (0:27): https://momoto.io/docs/proof/act-07/7.11c-tomas-opens-the-crm/clip.mp4 1. Lucía has approved. As his card told him, Tomás asks for the CRM again, and this time he gets in 2. He opens the CRM in his browser and sees the team's accounts ### Pausing an app, resuming it, and withdrawing another from the store https://momoto.io/docs/#/p/store/pause-and-withdraw Pausing an app stops it for everyone until its owner resumes it, and keeps its data and its place in the store. Withdrawing an app removes it from the store for good, together with everything it had saved. #### Pausing and resuming - The owner, or an admin, presses «Pause». While paused, nobody can open the app, and its card in the store says «Paused». - «Resume» opens it again as it was. Its data and its sharing are unchanged. - An app that lives on a computer is paused and resumed from that computer. - «Changes paused» is a different brake: the app keeps running, but its changes are held. Use it to freeze a working app while you review. #### Withdrawing Withdrawing is final. Momoto asks you to type the app's short name exactly as it is, because it cannot be undone. The app leaves the store, and its container and the data it saved are deleted. Only the person who withdrew the app can later make a new one with the same short name. Anyone else gets a conflict while the name is in use by that app's record. #### How it works (technical) - **`POST /api/v1/apps/{slug}/status` with `{status: published | paused}`**: `SetAppStatus` in `momoto_core.usecases.set_app_status`. Requires the owner or an admin who manages accesses. For a hub app, pausing removes its services, and resuming starts its container and services again. For an app on a computer, the call is refused unless it comes from the computer that hosts it. - **`POST /api/v1/apps/{slug}/changes-paused` with `{paused}`**: `SetAppChangesPaused`. The app keeps running. - **`DELETE /api/v1/apps/{slug}` with `{confirmation}`**: `RetireApp`. The confirmation must equal the slug exactly. The route requires the step-up `NETWORK_ACCESS:UPDATE`. It removes the app's services, grants, permissions and links, deletes its runtime container and its volumes, and sets the status to `withdrawn`. A withdrawn app keeps its row. A new app with the same slug is a new row, created by the same owner. `momoto_core.usecases._apps:holder_of` treats a withdrawn app as free only for the person who withdrew it. #### Videos of the real product - **Pausing an app, resuming it, and withdrawing another from the store** (2:38): https://momoto.io/docs/proof/act-05/5.19-pause-and-withdraw/clip.mp4 1. The CRM opens from its page in the store. Lucía pauses it: nobody can open it until she resumes it 2. With the app paused, its address takes her to its card in the store, which says it is paused 3. She resumes it, and it opens again as it was 4. To see the other switch, she asks her agent for a practice app 5. The agent asks where it lives: at the hub 6. «Draft» is in the store 7. She withdraws it: Momoto asks her to write its short name, because it cannot be undone 8. It is no longer in the store ### The owner's brake: pausing an app's changes https://momoto.io/docs/#/p/store/pause-changes The owner of an app can pause its changes. The app keeps running and people keep using it, but no agent can change it until the owner resumes the changes. It is a brake for the owner, and it is one switch on the app's page. #### What pausing does - The app keeps running. Nobody who may use it is cut off. - No agent can change it: not the owner's agents, and not agents of other people. Each attempt is held at the hub, and the agent is told that the owner paused the changes. It should tell you and not try again on its own. - An agent cannot go back to an earlier version either. You still can, from the store. - Pausing the changes is not pausing the app. «Pause the app» is a different switch on the same page: it stops the app itself, and nobody can open it until you resume it. #### Pausing and resuming - Open the app's page in the store. Pausing is offered there only to the owner, or to someone who manages the organization's network access. - Press «Pause changes». The card shows «Changes paused». - To continue, press the same button again to resume. Once resumed, an agent that tries again can save its change. #### How it works (technical) The switch is `POST /api/v1/apps/{slug}/changes-paused` (`pause_changes`), which runs `SetAppChangesPaused.execute`. It is allowed to the app's owner, or to anyone with `NETWORK_ACCESS:UPDATE` (`require_owner_or_admin` in `momoto_core/usecases/_apps.py`). It is shown only where the app runs at the hub. - Landing a change (`LandAppChange`) and publishing (`PublishApp`) raise `AppChangesPaused` (code `changes_paused`) while the flag is set. - Going back by an agent raises the same error. A person can still go back to an earlier version while changes are paused. «Pause the app» is `POST /api/v1/apps/{slug}/status` with `paused`, which runs `SetAppStatus` under the same owner-or-admin rule. #### Videos of the real product - **The owner's brake: pausing an app's changes** (2:27): https://momoto.io/docs/proof/act-04/4.09-pause-changes/clip.mp4 1. On her app's page, Lucía presses «Pause changes»: the app keeps running and no agent can change it 2. She asks her frontend agent for a change. The agent tries, the hub holds it and the agent tells her 3. She resumes the changes from the same page 4. And the agent now saves the same change 5. The app carries the change ### The first version of an app reaches the store https://momoto.io/docs/#/p/store/publish-the-first-version Publishing puts an app in your organization's store, so the people and agents of the organization can find it and open it. Here an agent makes the first version of a small CRM, with its own database and cache, and the hub starts it for the first time. #### Before you start - You need permission to publish apps in the organization (the check is `NETWORK_APPS:CREATE`). Without it, the publish is refused. - The store lives at the hub. If the hub is not connected, the store says so and fills in again once it is back. - The agent does the building in its own conversation on your computer. You do not write the code. #### Where the app lives Before it publishes, the agent asks you where the app should live. That answer is yours; the agent cannot pick it for you. The choices are: - **In the hub**: Momoto runs the app on the hub, always on, and people open it through the organization's network. - **On my computer**: The app runs on your computer and is reachable only while it is on. The hub is offered only when it can host apps. If it cannot, the only choice is your computer. An app on the hub runs in its own container. The parts it declares, `postgres` and `redis`, are made next to it, and only that app can reach them. The CRM's data stays there. #### What you will notice - The conversation keeps the line of the change: version 1, published. - In the store the card is there, with your name, the version and the place: «In the hub». - «Open» opens the app in another tab, through the organization's network. If it says «Open it from Momoto with the network client», this browser did not come in through the network. Open the app from Momoto's network client instead. #### How it works (technical) The agent publishes with `POST /api/v1/agent-apps` (`agent_publishes`). From a member's Momoto, `_publish_from_the_member` in `momoto_api/routers/apps.py` handles the call: - With no `location`, it answers 422 `where_required` and lists the options. `host` is offered only when the hub reports `can_host`; otherwise only `local`. This is the question the agent passes to you. - `local` publishes on the person's computer. - `host` sends the package to the hub with `location` set to `host`. On the hub, `PublishApp` (`momoto_core/usecases/publish_app.py`) needs `NETWORK_APPS:CREATE`. The parts an app may declare are `PARTS` in `momoto_core/domain/app_kind.py`: `postgres` and `redis`, each made next to the app. #### Videos of the real product - **The first version of an app reaches the store** (1:57): https://momoto.io/docs/proof/act-04/4.03-first-version/clip.mp4 1. Lucía asks her backend agent for the first version of the CRM, with its own database and its cache 2. Before publishing, the agent asks where the app lives. That is hers to answer: at the hub 3. The conversation keeps the line of the change: version 1, published 4. In «More › Store» the card is already there: it is hers and it lives at the hub 5. «Open» opens it in another tab, through the organization's network ### Read the changes https://momoto.io/docs/#/p/store/read-the-changes The Changes section of an app's page is its history: every change, the agent that made it, the person it worked for and when. Open a change to see which files it touched and which lines it changed. #### Reading the list - Each line shows the change's note, the agent, the person it worked for and when it landed. Newest first. - Consecutive changes that one agent made in one conversation are folded into a single line. Open the line to see each change in it. - Going back to an earlier version is its own line, marked «Went back to version N». - «See more» loads older changes. It appears only when there are more than one page of them. - «Whose» appears once the agents of more than one person have changed the app. It keeps only that person's changes. It filters the changes already loaded, so press «See more» first if you want to find an older one. #### Opening a change - The files are marked *new*, *changed* or *deleted*. Open a file to see its changed lines. - If a file is not text, or is too long to show, the page says so: «It isn't text, or it's too long to show.» - If the change answered a request, the page shows what was asked. If it added packages, it shows them, with the versions that fixed known problems. You see the list if you can see the app. You open the lines of a change, and go back to a version, only if you own the app or may modify it. Others see the list alone. #### How it works (technical) The list is `GET /api/v1/apps/{slug}/changes`, paged with `before` and `limit`. One change's files and lines are `GET /api/v1/apps/{slug}/changes/{version}` (`change_detail`, which calls `diff_of`). From a member's Momoto, both are answered by the hub (`changes-of` and `change`). Folding and the «Whose» filter run in the web app (`momoto-web/src/v2/store/Changes.tsx`). A line folds two changes when they have the same agent, the same person, the same conversation, and neither is a going back. The filter is applied to the page already loaded; the server does not filter by person. #### Videos of the real product - **An app's history: who changed what, and when** (0:25): https://momoto.io/docs/proof/act-04/4.06-changes/clip.mp4 1. On the app's page, «Changes» lists every change with the agent that made it, the person it worked for and when 2. She opens a change and sees which files it touched and which lines it changed - **Whose each change is** (0:23): https://momoto.io/docs/proof/act-04/4.18d-whose-changes/clip.mp4 1. In «Changes» the one by Diego's agent now appears, next to those of her own agents 2. With «Whose» she keeps only Diego's ### The security review: an agent questions the running app https://momoto.io/docs/#/p/store/review-an-app A reviewer is an agent that reads an app's code, questions the running app with single requests, fixes what it finds, and leaves its findings for you. It never opens the app in a browser. Before you start a review, decide how far its internet access may reach. #### Before the review: limit its internet access - Open the reviewer agent's settings and go to its security section. - Under **Chat internet exit**, choose **Only the list**. «Open» is the usual choice; «Only the list» limits the agent's chat session to the domains in the list above, plus what the platform needs to keep working. «Only the list» is offered only when the computer's daemon reports that it can measure this limit. If it is not offered, the option is disabled. #### What the reviewer can do - It reads the app's code and its history. - It sends single requests to the running app through the store, and reads the answers. It cannot name a host, an address or a port: the app is the only target. - It can ask an app only if you may modify it, or if its owner labelled the app an agent service and you may use it. Otherwise the request is refused with a message saying so. - Its fix is saved as a change under the reviewer's name, like any other change. On the app's page, «Changes» shows the reviewer's change, with its name. #### How it works (technical) The reviewer's requests go to `POST /api/v1/agent-apps/{slug}/ask` (`agent_asks`), which calls `AskApp.execute` (`momoto_core/usecases/ask_app.py`). The use case checks the access (`access.modify`, or `access.use` with `app.agent_service`), refuses an app that is not published, and returns the app's answer. Errors come back as conflicts: the app is down, did not answer in 20 seconds, or its workshop answered with an error. Each call leaves an `app_asked` event with who asked, which app, the method, the path without its query, and the status. The body is not recorded. The fix is an ordinary change: `POST /api/v1/agent-apps/{slug}/changes`. The internet exit is set in the agent's security settings (`components/customize/SecuritySection.tsx`); «Only the list» needs the daemon's `egress_chat_available`. #### Videos of the real product - **The security review: an agent questions the running app** (2:03): https://momoto.io/docs/proof/act-04/4.07-security-review/clip.mp4 1. Before the review, Lucía limits her reviewer's internet exit: only the domains on the list 2. She asks it to review the CRM: read the code, question the running app, fix, and leave its findings in the hub's memory 3. On the app's page is the reviewer's change, under its name ### Share an app https://momoto.io/docs/#/p/store/share-an-app Sharing an app decides who may open it, and separately who may have their agents change it. You do both from the «Share» panel on the app's page, and the change reaches each person's Momoto on its own. #### Before you start - You can share an app if you own it. An administrator of the organization can share it too. - The list shows the people of your organization as the hub has them. Your own Momoto only knows you, so the list comes from the hub. - Each change asks you to confirm it is you (see the note below). Press the box, confirm, and it is done. #### The two boxes - **«Can use it»**: The person can open the app from the store. - **«Their agents can modify it»**: The person's agents can land changes on the app. It appears only for apps that live at the hub. Ticking it also ticks «Can use it». Clearing «Can use it» also clears «Their agents can modify it». Someone who cannot open an app cannot have their agents change it. #### What you will notice - When you tick «Can use it» for Diego, «Open» appears on his card without him asking for anything. - Iván, with nothing given to him, still reads «No access». - The person needs no restart or setup on their computer. Each change in **Share** asks you to confirm it is you, the same as approving a request. The recorded run shows the box being ticked without the confirmation for one of the steps, but the code asks for it on every change; see the note in the technical part. #### How it works (technical) The panel calls `PUT /api/v1/apps/{slug}/permissions/{for_user_id}` with a body of exactly `{use, modify}` (`PermissionBody`, which rejects any other field). A member's Momoto sends the same change to the hub through `POST /api/v1/network/hub/apps/permission`. - **Who may call it:** the owner or an administrator of the organization (`require_owner_or_admin`). - **Modify implies use.** Setting modify true sets use true. Setting both false removes both permissions. - **Modify only at the hub.** An app that lives on the owner's computer refuses modify. - **The person must be a current member** of the organization. - **A withdrawn app** cannot be shared; the call returns a conflict. - **Confirmation:** the route calls `require_step_up` for every change, so the same confirmation applies as for approving. The permission is stored at the hub (`AppPermissionStore`). The person's Momoto reads it from there, and the store card follows. #### Videos of the real product - **Sharing an app with whoever you decide** (0:32): https://momoto.io/docs/proof/act-04/4.16a-share-directly/clip.mp4 1. On her app's page, «Share» lists the people of the organization 2. She ticks «Can use it» for Marisol. It is a sensitive action: her Momoto asks her to confirm it is her 3. And for Diego - **Sharing an app · Diego can open it now** (0:14): https://momoto.io/docs/proof/act-04/4.16b-shared-diego/clip.mp4 1. «Open» appeared for Diego without his asking for anything - **Sharing an app · Iván still has no access** (0:14): https://momoto.io/docs/proof/act-04/4.16c-shared-ivan/clip.mp4 1. Nobody gave Iván anything: still «No access» - **Opening «Dashboard» and letting someone else change it** (0:39): https://momoto.io/docs/proof/act-05/5.14c-marisol-opens-and-shares/clip.mp4 1. Marisol opens «Dashboard» from the store: accounts by city and deals by stage, from Lucía's CRM 2. In «Share», Lucía may use it and her agents may change it - **Someone else's agent changes your app** (1:24): https://momoto.io/docs/proof/act-05/5.14d-lucias-agent-changes-it/clip.mp4 1. Lucía asks «CRM · Frontend» for a new title on «Dashboard» 2. On the page of «Dashboard», the newest change is her agent's - **The last permissions · Lucía** (0:39): https://momoto.io/docs/proof/act-10/10.01d-the-last-shares-lucia/clip.mp4 1. In «Share» of «Quetzal CRM»: Iván may use it 2. In «Share» of «Quoter»: Marisol and Diego may use it - **The last permissions · Diego** (0:31): https://momoto.io/docs/proof/act-10/10.01e-the-last-shares-diego/clip.mp4 1. In «Share» of «Automations»: Marisol and Iván and Lucía may use it - **The last permissions · Marisol** (0:41): https://momoto.io/docs/proof/act-10/10.01f-the-last-shares-marisol/clip.mp4 1. In «Share» of «Catalog»: Iván and Lucía may use it 2. In «Share» of «Sales Board»: Tomás may use it ### Share with someone who is off https://momoto.io/docs/#/p/store/share-with-someone-who-is-off You can give someone access to an app while their computer is off. The permission is kept at the hub, and when their Momoto starts again it asks the hub and tells them what they were given. #### What happens - You tick «Can use it» for the person in «Share». The hub keeps it and the network allows it at once. - The person's computer is off, so their Momoto does not yet know. Nothing is lost. - When they turn the computer on, their «Approvals» shows, under «From your organization», what they were given. - They press **Ready**, and the app opens for them. #### What you will notice - On your side, nothing waits. The change is applied as soon as you confirm it. - On their side, the app opens only after they press **Ready**. #### How it works (technical) The permission is written with `PUT /api/v1/apps/{slug}/permissions/{for_user_id}` at the hub, not on the person's computer. When the person's Momoto starts, it reads the changes from the hub (the list shown in «From your organization»). Acknowledging them with **Ready** sends the response back, and the card is recomputed. The same is true for removals: the notice tells the person what was taken away while they were away. #### Videos of the real product - **Giving access to someone whose computer is off** (0:23): https://momoto.io/docs/proof/act-04/4.21a-given-while-off/clip.mp4 1. Renata turned her computer off. Lucía gives her the CRM back anyway: she ticks «Can use it» - **Turning her computer on: what she was given while away** (0:28): https://momoto.io/docs/proof/act-04/4.21c-renata-accepts/clip.mp4 1. Renata turns her computer on. In «Approvals», «From your organization» tells her she was given the CRM 2. She presses «Ready»: noted 3. And the CRM opens for her again ### Take access away https://momoto.io/docs/#/p/store/take-access-away Taking access away is done in the same «Share» panel as giving it. It takes effect at the hub at once: the person's card reads «No access» again, and what they had open stops working. #### Taking away use or modify - Clear **«Their agents can modify it»** to stop someone's agents changing the app. Their use of the app stays. - Clear **«Can use it»** to take the app away from the person. Their agents lose the change permission with it. Every change in «Share» asks you to confirm it is you, including taking access away. The recorded run shows this step without a confirmation for the first clearing; the code asks for it. Plan on confirming. #### What the person will notice - A coordinator that asks for a change the person is no longer allowed to make is refused by the store. - If they have the app open, it stops answering. Nothing on their computer is told to disconnect; the hub removes the permission. - Their card reads «No access» again. - In their «Approvals», under «From your organization», they see that the app was taken from them. They press **Ready** to clear the notice. #### Limits - You do not need to know whether the person has the app open. - The owner's choice holds even when the person is the one who asked the agent. What counts is the permission the owner gave, not who the app's operator is. #### How it works (technical) Both boxes are sent through `PUT /api/v1/apps/{slug}/permissions/{for_user_id}` with `{use: false, modify: false}` to remove the permissions. When both are false, the stored permission is removed; the store card and the network grant are then recomputed from it. The member's Momoto reads the change from the hub, and it shows the notice in «From your organization». The permission removal is written at the hub, so the next change request is refused there. Since the app's page reads the card on each open, the person's card returns to «No access». #### Videos of the real product - **Taking a permission away: their agents no longer change it** (0:23): https://momoto.io/docs/proof/act-04/4.20a-take-modify-away/clip.mp4 1. Lucía takes «Their agents can modify it» away from Marisol. «Can use it» stays - **Without the permission, the next change does not go in** (0:42): https://momoto.io/docs/proof/act-04/4.20b-marisols-agent-is-refused/clip.mp4 1. Marisol asks her coordinator for a change to the CRM. Lucía already took that permission away: the store refuses it - **Her access is taken away with the app open** (0:48): https://momoto.io/docs/proof/act-04/4.20c-cut-while-open/clip.mp4 1. Renata is working in the CRM 2. At that moment Lucía takes her access away from her own computer. The app stops answering her 3. Back in the store, her card says «No access» again 4. In «Approvals», «From your organization» tells her what happened: the CRM was taken from her. She presses «Ready»: noted - **Taking access away from someone who is using it** (0:27): https://momoto.io/docs/proof/act-04/4.20d-lucia-cuts/clip.mp4 1. Lucía opens «Share» on her app's page 2. And clears «Can use it» for Renata ### Real work in the app: loading customers and opening deals https://momoto.io/docs/#/p/store/use-an-app An app in the store does real work. Here a CRM loads a list of customers from a file and opens deals on a board. The file travels from your browser to the app through the organization's network, and the rows are kept in the app's own database at the hub. #### Opening the app - On the store's card, press «Open». The app opens in another tab, through the organization's network. - If it says «Open it from Momoto with the network client», this browser did not come in through the network. Use Momoto's network client to open it. - Only the people the owner shared the app with can use it. The owner sets that in «Share», on the app's page. #### Where your data goes When you upload a file, it goes from your browser to the app through the organization's network. Momoto does not read the file. The customers and deals are written to the app's own PostgreSQL database, in the app's own container at the hub. Only the app reaches that database. Changing the app later does not erase those rows. Going back to an earlier version does not restore them either. #### How it works (technical) The app's parts are declared in its package. The only parts Momoto knows are `postgres` and `redis` (`PARTS` in `momoto_core/domain/app_kind.py`), and each one is made next to the app. Use of an app is granted through the `POST /api/v1/apps/{slug}/permissions/{for_user_id}` route (`share`). The «Open» button asks for a web ticket with `POST /api/v1/apps/{slug}/web-ticket` (`web_ticket`) and then opens the app. #### Videos of the real product - **Real work in the app: loading customers and opening deals** (1:56): https://momoto.io/docs/proof/act-04/4.11-real-work/clip.mp4 1. Lucía wants to load her list of customers. She asks her frontend agent for an «Import CSV» 2. She opens the CRM from the store and uploads her file of 200 customers 3. On the deals board she opens the first two by hand ### What each person sees https://momoto.io/docs/#/p/store/what-each-person-sees The store shows every app of the organization to every member, with a card that says what that person can do with it. The same app can read «Open» for one person and «No access» for another, and the difference is only the permission its owner gave. #### What the card says to each person - **«Open»**: The app's owner has let you use it. Press it to open the app. - **«No access»**: You have no permission for it yet. You can see that it exists and whose it is, but you cannot open it. If the card offers «Request access», you can ask the owner. - **«It's yours»**: You own the app. Only you, and anyone you share it with, decide who uses it. In the recorded run: - **Lucía** owns her app, so the card reads «It's yours». - **Marisol** is the administrator of the organization, and the app is still not hers: the card reads «No access» until Lucía shares it. - **Iván**, on his own computer, sees the card, but «No access». - **Diego**, on his Windows computer, sees «No access», and can ask for it. - **Renata** sees that the app exists and whose it is, and cannot open it. Being an administrator does not open another person's app. An administrator can share apps (see [Share an app](https://momoto.io/docs/#/p/store/share-an-app)), but the card of an app you do not own shows only what its owner gave you. #### Why «No access» is enforced, not just shown «No access» is more than a label. Without access, the network refuses the connection to the app, whatever the browser asks. Typing the app's address does not get around it. What the card offers is only a way to ask. Each card is built from the app's record at the hub, so the same app can show different things to two people. When the owner changes a permission, the card of each person follows, without anyone restarting Momoto. #### How the card is built (technical) The store screen (`packages/momoto-web/src/v2/store/Store.tsx`) reads each app's card from `GET /api/v1/apps/{slug}`. The card carries `my_access`, computed for the caller by `access_of` in `momoto_core/usecases/_apps.py`. The label «Open» depends on `my_access.use`. «Request access» appears only when you are not the owner and do not have use. «Request a change» appears when you are not the owner and the app does not live on another computer. The permissions themselves are rows the owner writes with `PUT /api/v1/apps/{slug}/permissions/{for_user_id}`. Owners and administrators of the organization may call it; see [Share an app](https://momoto.io/docs/#/p/store/share-an-app). On the network side, a store app is also a network service. A computer may open it only when the hub has granted its identity that app, which is how the refusal happens below the browser. #### Videos of the real product - **The store as each person sees it · For its owner** (0:14): https://momoto.io/docs/proof/act-04/4.14a-store-as-lucia/clip.mp4 1. Lucía sees her app in the store: «It's yours» - **The store as each person sees it · For the administrator** (0:14): https://momoto.io/docs/proof/act-04/4.14b-store-as-marisol/clip.mp4 1. Marisol is the administrator, and even so the app is not hers: «No access» until Lucía shares it - **The store as each person sees it · For Iván** (0:14): https://momoto.io/docs/proof/act-04/4.14c-store-as-ivan/clip.mp4 1. Iván, on his computer: the card is there, but «No access» - **The store as each person sees it · For Diego** (0:14): https://momoto.io/docs/proof/act-04/4.14d-store-as-diego/clip.mp4 1. Diego, on his Windows computer: «No access», and he can ask for it - **The store as each person sees it · For Renata** (0:15): https://momoto.io/docs/proof/act-04/4.14e-store-as-renata/clip.mp4 1. Renata, the same: she sees that the app exists and whose it is, and cannot open it - **Who has access to what, at the end** (1:21): https://momoto.io/docs/proof/act-10/10.02-who-has-access-to-what/clip.mp4 1. «Sensitivity › Who reads»: who reaches the organization's class 2. «Network › People», «Iván's apps…»: the apps of the network that computer may open 3. «Network › People», «Lucía's apps…»: the apps of the network that computer may open 4. «Network › People», «Diego's apps…»: the apps of the network that computer may open 5. In «Store», each app with what its card offers Marisol: to open it, or «No access» 6. In «Share» of «Sales Board», one of her two apps, each person with what they may do 7. In «Share» of «Catalog», one of her two apps, each person with what they may do ### Where an app lives https://momoto.io/docs/#/p/store/where-an-app-lives An app lives at the hub, on its owner's computer, or outside Momoto. You can move an app between the hub and a computer and keep its card, its address and the people it is shared with. What the app has saved does not move with it. #### Choosing a place An app made in your Momoto can live in one of two places, and you choose when you ask an agent to make it. The agent asks where it lives: - **At the hub.** It opens while the hub is on, even with your computer off. Good for a page or a tool that others use. - **On my computer.** It opens while your computer and the hub are both on. Good for an app that depends on your own files. Other people can use it, but only you can change it. To put an app on the hub, your role needs the permission «Upload apps to the organization's host». Without it, the hub refuses, and the app stays on your computer. #### Moving an app - **«Upload to host»**: On the card of an app on your computer. It says what changes and asks you to confirm. The code goes to the hub, with the same card, the same address and the same people it was shared with. What the app had saved stays on your computer. - **«Move to my computer»**: On the card of an app at the hub, if you are its owner. It says what changes and asks you to confirm. The app now opens only while your computer and the hub are on, and other people's agents can no longer change it. What the app had saved stays at the hub, because the hub keeps its container and its data. Only published apps can move. Moving to the computer does not need the upload permission. #### Limits and gotchas - An app's data does not travel. Plan a copy before a move if the data matters. - After a move, the card and the address stay the same, so links from other apps keep working. #### How it works (technical) The moves are two routes in `momoto_api.routers.apps_move`, both called by the member's Momoto: - **`POST /api/v1/me/network/member/apps/{slug}/to-host`**: `MoveAppToHost` in `momoto_core.usecases.move_app`. It requires `NETWORK_APPS:CREATE`. It refuses an app that is not published. The app's permissions are kept. - **`POST /api/v1/me/network/member/apps/{slug}/to-my-computer`**: `MoveAppToLocal`. No permission needed. The hub keeps the app's container and its data volume. The modify rights and the workshop grants are removed, so other people's agents can no longer change it. Both routes keep the device that hosts the app in the record, so the app is served from the right computer. #### Videos of the real product - **A role that may not put apps on the hub** (1:40): https://momoto.io/docs/proof/act-05/5.17c-a-role-that-cannot-upload/clip.mp4 1. Renata asks her assistant for «Catalog», a site of plain pages 2. The agent asks where it lives: on her computer 3. «Catalog» is in the store, on its owner's computer 4. She wants it to open even with her computer off: «Upload to host». The hub says no: her role may not - **With the permission, the app goes up to the hub** (0:39): https://momoto.io/docs/proof/act-05/5.17e-now-she-uploads-it/clip.mp4 1. Marisol has given her role the permission. Renata presses «Upload to host» again 2. «Catalog» lives at the hub and opens as before - **An app on its owner's computer, with that computer off** (0:27): https://momoto.io/docs/proof/act-05/5.18a-its-owner-is-off/clip.mp4 1. Diego's computer is off. In Lucía's store, «Prices» says so: its owner is not connected 2. Her CRM, which takes its prices from there, still opens; the prices do not reach it - **Moving an app from my computer to the hub** (0:33): https://momoto.io/docs/proof/act-05/5.18b-he-moves-it-to-the-hub/clip.mp4 1. Diego turns his computer on. In his store, the card of «Prices» offers «Upload to host»: it says what changes and asks him to confirm 2. It now lives at the hub: the same card, with the way back - **At the hub, the app opens even with its owner's computer off** (0:23): https://momoto.io/docs/proof/act-05/5.18c-it-answers-with-his-computer-off/clip.mp4 1. Diego's computer is off again. «Prices» no longer depends on it: Lucía opens it from her store - **Moving an app from the hub to my computer** (1:58): https://momoto.io/docs/proof/act-05/5.18d-and-the-other-way/clip.mp4 1. Diego asks his agent for a practice app 2. The agent asks where it lives: at the hub 3. «Labels» is in the store, at the hub 4. Its card offers «Move to my computer»: it says what changes and asks him to confirm ### An image of its own https://momoto.io/docs/#/p/apps/an-image-of-its-own An app runs on the store's image, which has Python, Node and a shell. When an app needs more, such as a system library or a tool, it says how to add it in a momoto.Dockerfile. The hub builds that image only where the administrator has turned building on. It is off as Momoto comes. #### What the app may write The file must start with `FROM momoto-app`, once. After that it may use `RUN`, `ENV`, `ARG` and `WORKDIR`. The app's files are not copied into the image; they live where the app runs. Lines that only describe how an image runs (such as `CMD` or `EXPOSE`) are read and left aside: Momoto starts the app as its own user, as it does every app. Anything else is refused, with a note of what to write instead, and nothing is built or published. #### When it is refused - If the hub does not build images, the agent tells you so in words it can pass on. Nothing is published. - In the store, the app then says its first publication did not finish, and offers **Delete** instead of **Open**. #### What you will notice once it is on - The first save with a new `momoto.Dockerfile` takes minutes, because the image is built before the code is swapped. The agent waits and asks again by itself. - The same file is never built twice. - The file is part of the version. Going back to an older version brings back the image it ran with. #### Turning it on (for admins) Building runs commands as root during the build, with internet access and nothing else of the installation. That is why it is off as Momoto comes. Turn it on only if you accept that. The switch is `MOMOTO_APPS_DOCKERFILE` in the installation's `.env`: `on` or `off`. It is read by the **docker-broker** service, which makes the app containers, so restart that service to apply it: ``` # is it there? no line means off $ grep "^MOMOTO_APPS_DOCKERFILE=" .env || echo "(not there: off)" $ echo "MOMOTO_APPS_DOCKERFILE=on" >> .env # restart the broker, which reads the switch $ docker compose up -d docker-broker $ docker compose exec -T docker-broker printenv MOMOTO_APPS_DOCKERFILE ``` To turn it off again, set the value to `off` and restart the same service. #### How it works (technical) - The rules are in `momoto_core.domain.app_image`. An instruction outside the allowed list makes the publish fail with `AppImageNotAllowed`; a failed build with `AppImageFailed`. - The switch is read with `settings_from(os.environ)` in `momoto_adapters_runtime.docker_broker_server`, through `momoto_adapters_runtime.app_containers:settings_from`. Only `on` and `off` are accepted; any other value is an error. #### Videos of the real product - **An app that needs its own image, where the hub does not build them** (1:21): https://momoto.io/docs/proof/act-05/5.15a-an-image-of-its-own-is-refused/clip.mp4 1. Lucía asks her agent for «Quoter»: quotes as PDF. It needs system libraries, and they go in a momoto.Dockerfile 2. The hub refused it: this installation does not build images. The agent tells her so. In her store the app says its first publication did not finish, and offers «Delete» instead of «Open» - **The administrator's switch: images of their own for the apps** (0:45): https://momoto.io/docs/proof/act-05/5.15b-the-switch/clip.mp4 1. As Momoto comes, the hub builds no images: the variable is not there 2. Marisol turns it on in the installation's file and restarts Momoto's API - **With the switch on, the hub builds the image and publishes the app** (1:23): https://momoto.io/docs/proof/act-05/5.15c-built-and-published/clip.mp4 1. Lucía tells her agent the hub now builds images, and to publish again 2. «Quoter» is in the store. She opens it and asks for a quote: it comes as a PDF ### From a repository https://momoto.io/docs/#/p/apps/from-a-repository An agent can bring an app's code from a Git repository into Momoto. Momoto fetches the code itself and records it as a version of the app, with the commit it came from. Bringing it again adds only what changed in the repository. #### Before you start - Ask the agent for the repository's address. You can also name a branch or a tag; if you do not, the repository's own branch is used. - The repository may say in its `momoto.json` which other apps it uses, such as a CRM. Such a use waits until the owner of that app allows it. In the recorded run, Lucía owns the CRM, so the use of it waited for her. #### What you will notice - The app's page says where it was brought from. - When the repository changes, bringing it again creates one new version in **Changes**. Your changes made in Momoto stay, joined with the repository's new code. - An app's use of another app that was allowed stays allowed after a new bring. #### How it works (technical) The agent calls `POST /api/v1/agent-apps/import` (handler `momoto_api.routers.apps_bring:agent_brings`), with `repository` (up to 300 characters) and an optional `ref`. Momoto fetches the tree of one commit. - The tree lands as a change. A new app's first version is that tree. - An app brought before takes what is new in the repository over what changed in Momoto. The base is the last commit brought from that repository; the repository does not say which version it was made from. - The uses are read from `momoto.json` (`uses_of` in `momoto_core.domain.app_kind`). A use waits for the owner of the other app to allow it. #### Videos of the real product - **Bringing an app from a repository** (0:50): https://momoto.io/docs/proof/act-05/5.14a-bring-it-from-a-repository/clip.mp4 1. Marisol asks her coordinator to bring «Dashboard» from its public repository 2. The page of «Dashboard» says where it was brought from, and that it waits for Lucía to use her CRM - **Bringing it again when the repository changes** (1:10): https://momoto.io/docs/proof/act-05/5.14e-bring-it-again/clip.mp4 1. Marisol asks her coordinator to bring the repository again into the same app 2. In «Changes», one new version brought from the repository 3. She opens it: Lucía's title stays, and the repository's new panel is there ### Agents of members https://momoto.io/docs/#/p/memory/agents-of-members An agent on a member's computer can write to the organization's memory with the flag --hub. What it writes is saved at the hub for the whole organization, under the agent's name and the person's. This guide covers what gets saved, where it is seen, and what is still waiting. #### What you ask the agent Tell the agent to write to the organization, not only to your own project. For example: «Leave a note in the project Operations, and propose a lesson, both in the organization.» The agent uses the organization's memory for these two writes. - A **note** is saved in the project, for everyone in the organization to read. - A **lesson** is saved as proposed. It waits for a person to promote it. #### What you will see at the hub - In **Memory › Project** the note shows which agent wrote it and whose it is. - In **Lessons** the proposal waits, marked as proposed, until someone promotes it. Agents read it as not confirmed in the meantime. The agent does not say who signs. Your name is on the note as the person it works for. #### Limits and common mistakes - Without an organization, the agent is told it has not joined one and that it should write without `--hub` for its own entity. - Write to the organization only what serves the organization. What only serves you stays in your own entity, without `--hub`. #### How it works (technical) The skill `momoto-memory-write` takes the flags `--hub`, `--layer project|lesson` and `--team`. With `--hub` it does not send `--entity`: the hub resolves the organization from the agent's owner. The request waits up to 45 seconds for the hub before it answers «pending». Notes go to `POST /api/v1/org-memory/notes` and lesson proposals to `POST /api/v1/org-memory/lessons`. A lesson written this way is saved as proposed. #### Videos of the real product - **A member's agent writes to the organization's memory** (1:05): https://momoto.io/docs/proof/act-06/6.01a-a-members-agent-writes-at-the-hub/clip.mp4 1. Diego asks «Automation» to leave a note in the project «Operations» and to propose a lesson, both in the organization - **What a member's agent wrote, seen at the hub** (0:26): https://momoto.io/docs/proof/act-06/6.01b-marisol-reads-it-at-the-hub/clip.mp4 1. In «Memory › Project», the note of «Operations» says which agent wrote it and on whose behalf: Diego's 2. And in «Lessons», the one it proposed: it waits for a person to promote it ### Decisions are kept in the organization's memory https://momoto.io/docs/#/p/memory/decisions-of-a-project What a member's agents decide for a project is kept at the organization's hub, so the whole team can find it. Each note says which agent wrote it and for whom. This guide shows how an admin reads a project's memory and promotes a lesson that a member's agent proposed. #### Reading a project's notes - Open **Memory › Project** and pick the project. The notes the organization's agents left are there, including those from members' computers. - Each note shows the agent that wrote it and the person it worked for. Use this to know who decided what, and on whose behalf. #### Promoting a lesson (for admins) Open **Lessons** and find the one that is **proposed**. Read it, then promote it. Promoting asks for an approval. Once approved, the lesson is **firm**, and the agents of the organization read it as a rule from their next conversation. If a lesson is wrong later, dispute it. The agents stop reading it, and it stays in the list. See [Lessons](https://momoto.io/docs/#/p/memory/lessons). #### How it works (technical) Notes written from members' computers are stored at the hub with the writing agent and the person it works for. The hub memory is served by `/api/v1/network/hub/memory`. Promotion is `POST /api/v1/lessons/{lesson_id}/promote`. The lesson's state moves from `proposed` to `firm` only after the approval is granted. Agents read the organization's firm lessons from their next conversation. #### Videos of the real product - **Decisions are kept in the organization's memory** (0:47): https://momoto.io/docs/proof/act-04/4.13b-decisions-kept/clip.mp4 1. In «Memory › Project», Marisol finds what Lucía's agents left in the project «CRM»: the plan and the security findings 2. Each note says which agent wrote it and on whose behalf 3. In «Lessons» is the one Lucía's reviewer proposed. Marisol promotes it: from now on agents read it as firm ### Documents of the memory: what the agent writes and what she writes https://momoto.io/docs/#/p/memory/documents The memory holds documents as well as notes: plain Markdown files that agents can write and people can edit. Writing is a sensitive skill, so an agent can only do it after an administrator approves it. This guide shows how a person and an agent can change the same note without losing either change. #### Before you start - Agents write only into the open folders of the memory: `03_sessions`, `99_inbox` and `02_agents`. The other folders are fed by lessons and decisions. - Giving an agent the skill to write documents is a sensitive change. Open **Customize › Skills** and tick it. The row is marked *sensitive*. - Enabling a sensitive skill needs an approval. Approve it in **Approvals**, then save again. #### Editing a note while an agent works You can open a note, edit it and save. If the agent or someone else saves the note while you are editing, Momoto does not overwrite the change. A box says the note changed after you opened it and that your draft is still there. You can: - **Keep editing**: stay on your draft. - **Load the new version**: see the new text. Your draft is kept, so you can copy from it. - **Overwrite with mine**: replace the new version with your text, on purpose. While you have a saved draft, **Edit** is not offered again, so a new edit cannot overwrite the draft by accident. Recover it or **Discard** it first. #### Renaming **Rename** gives the note a new name. Its text stays the same. #### How it works (technical) The note is a file of the vault. Read and write go through `/api/v1/vaults/{vault_id}/files` (`GET`, `PUT` and `DELETE` per file). A save carries the version that was read, in `If-Match`. If the file changed, the save is refused and the conflict box opens (`components/vault/VaultConflictModal.tsx`). `VaultFileViewer.tsx` holds the edit, the draft and the rename. The agent writes with the skill `momoto-vault-write`. Its `SKILL.md` marks it `sensitive: true`, and the platform keeps the same name in its list of sensitive skills. It is opt-in: an agent that has no explicit skill list does not get it. #### Videos of the real product - **Documents of the memory: what the agent writes and what she writes** (2:20): https://momoto.io/docs/proof/act-02/2.16-documents/clip.mp4 1. Writing documents is a skill apart, and a sensitive one. She ticks it in «Customize › Skills» and saves 2. Being sensitive it waits for her approval. She gives it in her inbox and saves again 3. She asks the agent to write a procedure as a note of the memory 4. She asks for a fourth step, and while the agent works she goes to look at the note 5. She opens it to edit and adds who is responsible 6. She saves. Momoto does not overwrite the agent's change: it says the note changed and her draft is still there 7. She loads the new version: there is the agent's fourth step. Her draft is not lost 8. She discards the draft, edits on top of the new version and saves: both changes stay 9. Last, she renames the note ### Lessons: proposing, promoting, looking for contradictions and disputing https://momoto.io/docs/#/p/memory/lessons A lesson is what the agents carry from one job to the next: a short statement the team learned. Each lesson has a state that tells the agents how much to trust it. This guide covers the four states, how to promote and dispute a lesson, and how Momoto looks for lessons that contradict each other. #### The four states - **Proposed**: Written, not yet confirmed. Agents read it marked as not confirmed. - **Firm**: Confirmed. Agents read it as a rule. - **Suspicious**: Flagged for review. Agents do not read it as a rule. - **Disputed**: Marked as wrong. Agents do not read it. It stays in the list. Nothing is deleted. A lesson changes state, and the change stays in its history. #### Writing and promoting - Open **Memory › Lessons**. You see the organization's lessons with their state. - To write one by hand, use the form and pick the agent group it is for. It starts as proposed. - To promote a proposed lesson, press **Promote**. Promoting asks for an approval. When it is approved, the lesson is firm, even if it goes against another firm lesson. #### Looking for contradictions Press **Detect contradictions** to look among the lessons of an agent group for ones that clash. The search reads the lessons with the AI of the person who asks, and it needs the semantic search of the memory to be on. - Two firm lessons that clash both stay firm. They are sent for review. - A person decides which one was wrong, and disputes it. #### Disputing a lesson Press **Dispute** on a lesson you know is wrong. The agents stop reading it. It stays in the list with its new state. Disputing a firm lesson needs the right to approve memory changes. #### Turning off the search (for admins) The contradiction search is on by default. Whoever runs the installation can turn it off with `MOMOTO_CONTRADICTION_DETECT=0`. Then **Detect contradictions** does not run. #### How it works (technical) The routes are in `momoto_api/routers/lessons.py`: `GET /api/v1/lessons/` lists the lessons of an entity, `POST /api/v1/lessons/` proposes one (a lesson that is already firm, disputed or suspicious returns 409), `POST /api/v1/lessons/{lesson_id}/promote` asks for the approval that makes it firm, `POST /api/v1/lessons/{lesson_id}/dispute` marks it disputed, and `POST /api/v1/lessons/detect-contradictions` runs the search for one agent group. Detection needs `MEMORY:UPDATE`; disputing a firm lesson needs `MEMORY:APPROVE`. #### Videos of the real product - **Lessons: proposing, promoting, looking for contradictions and disputing** (1:22): https://momoto.io/docs/proof/act-06/6.03-lessons/clip.mp4 1. In «Memory › Lessons» are the organization's, with their state. Marisol writes one by hand 2. She promotes it: it becomes firm, though it goes against another that already was 3. She asks to look for contradictions among the group's lessons 4. The one that was wrong, she disputes: agents stop reading it, and it stays in the list ### A member's agent proposes a lesson to the organization https://momoto.io/docs/#/p/memory/lessons-from-members An agent on a member's computer can propose a lesson to the whole organization, so that what one project learned reaches every agent. A proposed lesson does not count as a rule until a person of the organization promotes it at the hub. This guide shows how a proposal travels and what the organization sees. #### What happens - You ask an agent on your computer to propose a lesson to the organization. - The agent sends it to the hub. The lesson is saved there under the agent's name and yours. - It appears as **proposed**. Agents read it marked as not confirmed. - A person of the organization promotes it at the hub. From then on the agents read it as firm, from their next conversation. #### What you will notice - The proposal is not a rule yet. The agents of the organization treat it as a hint until it is promoted. - Promotion is done by a person at the hub, not by the agent. #### How it works (technical) The agent uses the skill `momoto-memory-write` with `--hub --layer lesson`. The request goes to the hub through the member's Momoto. The hub keeps who wrote it: the agent and the person it works for. The agent does not say who signs. A lesson written this way is saved as proposed. Promotion is `POST /api/v1/lessons/{lesson_id}/promote` at the hub, and it goes through the approval gate described in the lessons guide. #### Videos of the real product - **A member's agent proposes a lesson to the organization** (1:15): https://momoto.io/docs/proof/act-04/4.13a-lesson-from-a-member/clip.mp4 1. Lucía asks her security reviewer to propose to the organization what the review taught it ### The memory an agent writes: notes, lessons and questions https://momoto.io/docs/#/p/memory/notes-and-lessons An agent can write to the project's memory while it works: notes about what it found, and lessons it proposes for later. You can read, correct or delete everything it wrote, and the replaced or deleted text stays in the history. #### Before you start - Agents write into the memory of the project they work on. You see the notes in **Memory › Project**. - Correcting and deleting a note are for people. An agent cannot do them. - «Ask» searches the documents of the memory. It needs an index first (see [Searching the memory by meaning](https://momoto.io/docs/#/p/memory/search-by-meaning)). #### What you will see Each note shows its text, the agent that wrote it and whose it is. When you correct a note, the text changes and the old text goes to the history. When you delete a note, Momoto asks first: the box says that agents will no longer read it, and the history keeps what was deleted and who did it. A lesson that an agent proposes waits in **Lessons**, marked as proposed, until a person promotes it. Promoting asks for an approval first. #### Limits and common mistakes - The history is for people. Agents read only the current notes, not the replaced or deleted ones. - If two people change the same note at the same time, one of the saves can be refused. Reload the note and make your change again. #### How it works (technical) The panel is `components/vault/ProjectMemoryPanel.tsx`. Routes under `/api/v1/project-memory`, from `momoto_api/routers/project_memory.py`: - **POST /api/v1/project-memory/**: Records a note: entity, kind and text, optionally the session and project. - **GET /api/v1/project-memory/**: Lists the current notes of an entity. - **GET /api/v1/project-memory/history**: Lists the replaced and deleted notes, with who changed them. - **PATCH /api/v1/project-memory/{entry_id}**: Corrects the text. The old text stays in the history. - **DELETE /api/v1/project-memory/{entry_id}**: Deletes the note from what agents read. The text stays in the history. Correcting and deleting are for people only and need `MEMORY:UPDATE` in the note's organization. Lessons are proposed with `POST /api/v1/lessons/`; a lesson that is already firm, disputed or suspicious is refused with a 409. #### Videos of the real product - **The memory an agent writes: notes, lessons and questions** (2:45): https://momoto.io/docs/proof/act-02/2.15-memory/clip.mp4 1. She asks the agent to save two notes in the project's memory 2. And to propose a lesson 3. In «Memory › Project» are the two notes, with the agent that wrote them and whose it is 4. She corrects one: the supplier delivers on Wednesdays, not Thursdays 5. And she deletes the other. Momoto asks first 6. The history keeps what was corrected and what was deleted, with who did it. Agents no longer read it 7. In «Lessons» is the one the agent proposed. She promotes it 8. Back with the agent: it reads the memory and now says Wednesdays 9. Without an index «Ask» cannot be used: in the Documental layer she creates the memory's index 10. «Ask» answers from the documents of the memory and says where it read it ### The organization's memory: context, facts and a first lesson https://momoto.io/docs/#/p/memory/organization-memory The memory is what Momoto's agents know before they start: the organization's context, its business facts, the lessons it has learned, and the notes of each project. This guide walks through the four layers you write by hand, and what each one changes for the agents. #### Before you start - Open **Memory** from the menu. The layers are **Documentary**, **Context**, **Lessons**, **Project** and **Organization**. - Writing to the context and the lessons needs the right to change the organization's memory. Without it, the screen shows the layer but no save button. - Writing the business facts is for admins: the form needs the permission to update users in the organization. #### The layers you will write - **Context**: One note the agents read when they start: what the organization is, how it sells, its rules. It applies to every agent of the account. - **Organization**: Business facts as subject, predicate and value, for example the minimum order. Each fact has a date from which it holds. - **Lessons**: Short things the team learned, one per entry. A lesson is read by the agents as a rule once it is firm. - **Project**: Notes that agents and people write about a project. Each note shows who wrote it. #### Context: a change asks for approval The context is one note. When you save it, Momoto does not save straight away. It shows what changes and who has to approve it. Approve it in **Approvals**, then save again. Agents take the new text from their next start. Personal accounts have no organization context to edit. #### Business facts, and personal data A fact is one value about the organization, for example the minimum order, with the date it starts to hold. If you record a new fact with the same subject and predicate, it replaces the earlier one. When a fact holds data about a person, for example a phone number, mark it as personal data. Momoto then keeps the fact at the confidential level by itself. It does not depend on the level you chose. Facts marked this way never leave the organization's hub, so a member's agent does not get them, whoever asks. #### Lessons Write a lesson in your own words and it starts as **proposed**: agents read it marked as not confirmed. Promote it when the team agrees, and it becomes **firm**. Promoting asks for an approval first. See [Lessons](https://momoto.io/docs/#/p/memory/lessons) for the states, contradictions and disputes. #### How it works (technical) The context is the file `contexto-grupo.md` in the base vault of the account. The panel `GroupContextPanel` saves it with `PUT /api/v1/vaults/{vault_id}/files/{file_path}`; a save that needs a signature returns a 409 and opens the approval box. Business facts are written with `POST /api/v1/business/facts` and read with `GET /api/v1/business/facts`, from the router `momoto_api/routers/business.py`. A fact marked as personal data is stored with the confidential class. Lessons are written with `POST /api/v1/lessons/` and promoted with `POST /api/v1/lessons/{lesson_id}/promote`. See the lessons guide for the rest. #### Videos of the real product - **The organization's memory: context, facts and a first lesson** (1:15): https://momoto.io/docs/proof/act-01/1.15-organization-memory/clip.mp4 1. In Memory, the Context layer is the note every agent reads when it starts 2. Marisol writes what her organization is, how it sells and its rules 3. She saves it: she is changing the instructions of every agent of the account 4. Momoto treats it as an approval: it shows what changes and who asks. She approves it herself 5. In the Organization layer she records a business fact: the minimum order 6. Another fact carries a person's data. She marks it, and it becomes confidential by itself 7. In Lessons she leaves the first one: something her team learned selling ### Organization memory for members https://momoto.io/docs/#/p/memory/organization-memory-for-members When you join an organization, your Momoto keeps a copy of what the organization lets you read. Your agents use that copy from the first conversation, even offline. This guide explains what arrives on your computer, and what stays at the organization's hub. #### What you will see - In **Memory** a block called **your organization** appears. It holds what the organization does, its rules, its facts and its lessons, as the organization's admin wrote them. - Your agents know these rules without anyone repeating them. They read the copy your Momoto keeps. - The copy is brought up to date whenever your computer is connected to the hub. #### What stays at the hub A business fact that holds a person's data, for example a customer's phone number, never leaves the hub. It is not copied to your computer, and no agent can read it, whoever asks. The **Memory** screen counts how many facts were kept back, so you know they exist. Which other parts of the memory you reach depends on the sensitivity level the organization gives you. Your admin sets it. #### Limits and common mistakes - The copy can be older than the hub while your computer is offline. Your agents read it as it was at the last update. - A fact with personal data is kept at the hub on purpose, so it will not appear in your own copy. #### How it works (technical) The member's Momoto reads the organization's memory with `GET /api/v1/org-memory` and the organization's notes with `GET /api/v1/org-memory/notes`. The skill `momoto-memory-read` serves the copy with `--hub`; it asks the hub and waits up to 45 seconds before answering from the copy. A personal data fact is filtered out at the hub before anything is sent to a member, so the copy never has it. #### Videos of the real product - **The organization's memory arrives with the person** (1:38): https://momoto.io/docs/proof/act-03/3.12a-memory-arrives/clip.mp4 1. In «Memory» her Momoto brings a new block, «your organization». It is what Marisol wrote at the hub: what they do, their rules, their facts and their lessons 2. Her agent was born a while ago, on her computer, and already knows it. Not the fact with a person's phone: that one does not leave the hub - **His agent already knows the organization's rules, and not what is reserved** (1:41): https://momoto.io/docs/proof/act-03/3.12b-memory-on-windows/clip.mp4 1. Diego asks his agent for something that goes against a rule of the organization, and for a customer's phone 2. In «Memory» is where it got that from, and the count of what did not leave the hub ### Searching the memory by meaning: the manuals, the index and an embeddings engine of her own https://momoto.io/docs/#/p/memory/search-by-meaning A memory can be searched by meaning, so a question finds a note even when it shares none of its words. For that, Momoto needs an index of the documents and an embeddings engine. This guide covers both, including the optional engine that runs on your own computer. #### Before you start - Open **Memory** and go to the **Documentary** layer. Each memory is an index of a set of notes. - Without an embeddings engine, search by meaning is off. Momoto says so on the search screen and finds only the notes that contain the words you type. - Creating an index is for people only, and needs the right to change the organization's files. #### Reindexing When notes change, the index does not know yet. Momoto shows the notice *there are changes not indexed*. **Reindex** puts the changes in the index, file by file, and shows the progress. If you change the embeddings engine, the index made with the old one stops working. Search finds nothing until you reindex. Open the index's menu (⋯) and choose **Reindex**. Search says why it stopped and what to do. #### Which model an index uses The index's details show the **embedding model** it was made with. Use it to check that an index was rebuilt with the engine you expect. #### The engine that runs on your computer Momoto ships an optional embeddings engine as a service in Docker, based on Ollama with a small open model. Nothing leaves the computer and no key is needed. It is off by default and uses about 1.2 GB of memory when the model is loaded. Turn it on, then point Momoto at it. The terminal steps in the recording are the operator's: ``` $ docker compose --profile embeddings-local up -d embedder $ docker compose exec -T embedder ollama pull qwen3-embedding:0.6b $ docker compose exec -T embedder ollama list # in .env: the backend and the engine's address $ docker compose up -d momoto-api $ docker compose logs momoto-api | grep "embeddings:" ``` The two variables in `.env` are `MOMOTO_EMBEDDING_BACKEND=openai-compat` and `MOMOTO_EMBEDDER_URL=http://embedder:11434`. Then reindex each index. The engine and the model form one space: changing either one needs a reindex. #### How it works (technical) The engine is chosen at start by `MOMOTO_EMBEDDING_BACKEND`. The value `openai-compat` calls the server at `MOMOTO_EMBEDDER_URL`. Each index records the model it was built with (`embedding_model`). A search against an index built with another engine is refused with a reason, which the search screen turns into the reindex advice. Searching is `POST /api/v1/kbs/{kb_id}/query`. The answer says whether it was by meaning (`semantic`). Creating an index is `POST /api/v1/kbs/`, for people only, and needs `VAULT:UPDATE`. A reindex streams its progress from `GET /api/v1/kbs/{kb_id}/reindex/stream`. A reindex already running returns 409, and a per-hour limit returns 429. The compose service `embedder` sits in the profile `embeddings-local`. It is pinned to an Ollama version and digest, and its memory is capped. #### Videos of the real product - **Searching the memory by meaning: the manuals, the index and an embeddings engine of her own** (2:39): https://momoto.io/docs/proof/act-02/2.18-knowledge-base/clip.mp4 1. In Memoria she opens the notes and uploads the roaster's four manuals 2. Momoto says there are changes not indexed. «Reindex» puts them in the index, file by file 3. She searches in her own words. With no embeddings engine Momoto only finds the exact words, and says so 4. In the terminal she turns on the engine Momoto ships as an optional service and pulls an open model for it 5. She points Momoto at that engine, two lines of its .env, and restarts the service 6. Back in Memoria the notice is gone. She reindexes: the index is made again with the new engine 7. The index's details say which model it was made with 8. The same search: now it finds the credit manual, though it shares not one word with the question 9. From the result she opens the note ### Correcting the organization's memory from your own Momoto https://momoto.io/docs/#/p/memory/write-to-the-organization A member can correct a note in the organization's memory from their own Momoto. The correction goes to the hub as a new version, and the earlier text stays in the history. What a member can change depends on their role in the organization. #### What you can do - Open **Memory** and find your organization's block: what it is, its rules, its facts and its lessons, up to date. - Open a project note and correct it. - Save. The correction goes to the hub. The earlier text stays in the history. The block only offers what your role in the organization allows. If you do not see a save button, your role does not let you change that part. #### Limits and common mistakes - Your computer keeps a copy of what you can read. A correction reaches the hub when your computer is connected. - You do not delete the old text. It is kept in the history, so anyone can see what it said before. #### How it works (technical) The organization's memory lives at the hub. Your Momoto keeps a copy of what your level reaches and sends what you write. A correction to a hub note goes through `POST /api/v1/network/hub/memory/notes/fix`, and the hub saves it as a new version of the note. #### Videos of the real product - **Correcting the organization's memory from your own Momoto** (0:36): https://momoto.io/docs/proof/act-06/6.02-a-person-writes-to-the-hub/clip.mp4 1. In «Memory», Lucía opens her organization's block: what it is, its rules, its facts and its lessons, up to date 2. She opens the project notes and corrects one Marisol wrote 3. The block only offers her what her role in the organization allows ## Inside Momoto What runs underneath: installing, operating, the identity network and the computers your agents may use. ### Linux https://momoto.io/docs/#/p/install/linux One command installs all of Momoto on a Linux computer: the database, the API, the web app, the image agents run in, and the background service that starts them. It never installs system packages for you. It names what is missing and waits. Run it again and it changes nothing. #### What you need - A Linux computer. The recorded run used a clean Ubuntu 24.04 with 2 CPUs and 8 GB of memory. - Docker with Compose 2.24.4 or newer and buildx, and your user in the `docker` group. Restart once after you add the group. - Node 22.14 or newer, `uv`, a C++ compiler, and the backup tools (`postgresql-client`, `sqlite3`). - You do not need to know this list in advance. The first run names what is missing on *your* computer, with the command to install each item. #### Running it From the folder where you unpacked Momoto, run the installer. It asks nothing: ``` $ scripts/install.sh ``` At the end it gives you the address to open in your browser, ending in `/setup#token=…`. It creates the first admin account. The code works **once** and expires in **60 minutes**. It is also saved to `~/.momoto/open-setup-momoto.url`. If you run it again, it changes nothing. Once the install is finished, Momoto comes back after a restart without anyone signing in to start it. #### Common mistakes - Running the installer before you restart after adding the `docker` group. The group only counts in a new session, so Docker is refused. - On a system that restricts unprivileged user namespaces, the installer also asks for an AppArmor profile. It names the command to install it, and waits for you to run it. #### How it works (technical) `scripts/install.sh` runs eight stages through a `stage()` wrapper. Each stage is timed and logged to `~/.momoto/logs//.log`. A stage that is already done is skipped. That makes a second run a no-op, and a failed run safe to repeat. - **requirements**: Checks Docker, Compose 2.24.4 or newer, buildx, and Node 22.14 or newer (the version in `nanoclaw/.nvmrc`). It also checks `corepack`. The AppArmor profile is checked only when `apparmor_restrict_unprivileged_userns` is 1. - **environments**: Writes `.env` and `nanoclaw/.env` under `umask 077`. It generates the secrets (`POSTGRES_PASSWORD`, `JWT_SECRET`, `MOMOTO_MFA_SECRET_KEY`, `MOMOTO_SECRETS_KEY`, `MOMOTO_SIGNING_SECRET_KEY`, `MOMOTO_EGRESS_HOOK_TOKEN`) and sets `MOMOTO_STORAGE_PROFILE=containerized`. Secrets are never printed. - **onecli**: Starts the credential gateway from `deploy/onecli/docker-compose.yml` in `~/.momoto/onecli`. - **agent_image**: Builds `nanoclaw-agent-v2-:latest` with `nanoclaw/container/build.sh`. Most of the wait happens here, once. - **exit_filter**: Builds `momoto-egress-holder:1`, the filter for an agent's internet access. - **daemon**: Runs `pnpm install`, `pnpm run build` and `scripts/apply-customizations.sh` in `nanoclaw/`. Then it registers the systemd user unit `nanoclaw-v2-`, and enables lingering for your user (`loginctl enable-linger`), so it starts at boot. On macOS it registers a LaunchAgent. - **stack**: Builds the compose images and starts `docker-broker` and `momoto-api`, then `momoto-web` once the API gate is ready. - **setup_url**: Asks `GET /api/v1/setup/status` whether setup is still needed, and prints the setup address. Overrides, for when a default clashes with something already on the machine: `MOMOTO_INSTALL_PROJECT` (compose project name, default `momoto`), `MOMOTO_INSTALL_DATA` (default `~/.momoto`), `MOMOTO_INSTALL_UNIT` (a transient `systemd-run` unit), `MOMOTO_AGENT_IMAGE` (an image you already built), and `--lang es|en`. The default ports are API 8020, web 3020, Postgres 5443, sandbox 5445 and OneCLI 12254–12255. When a stage fails, the message names it. Read that stage's log, fix the cause, and run `scripts/install.sh` again. Stages that finished are skipped. `./momoto status` shows what is up once the stack exists. #### Videos of the real product - **Install Momoto with one command** (0:30): https://momoto.io/docs/proof/act-01/1.01-install/clip.mp4 1. Marisol has downloaded Momoto. In its folder she runs one command 2. It asked nothing. At the end it gives the address to open in the browser 3. Run again, it changes nothing - **Installing Momoto on a computer with nothing on it** (1:43): https://momoto.io/docs/proof/act-03/3.07-fresh-computer/clip.mp4 1. Iván unpacks Momoto and runs the installer. It installs nothing yet: it says at once everything that is missing 2. He installs what it named: Docker, a C++ compiler and the backup tools, his user in the Docker group, Node 22 with nvm, uv and the AppArmor profile 3. He restarts, as the installer told him, so the Docker group counts for everything of his 4. The second time it installs: it builds what it needs and ends with the address to open in the browser 5. He restarts the computer. Momoto comes back by itself, with nobody signing in to start it ### Windows https://momoto.io/docs/#/p/install/windows On Windows, Momoto runs inside WSL2, the Linux that Windows itself provides. One PowerShell script turns WSL on, installs Ubuntu and what Momoto needs in it, then runs the same installer as on Linux. Momoto then starts by itself each time the computer starts. #### Before you start - Open PowerShell **as administrator**. The installer needs that to turn on Windows features and to create the start-up task. - You need the Momoto archive, `momoto.tar.gz`, and enough disk for Ubuntu and the agents' image. - The recorded runs used Windows Server 2025, one with 2 CPUs and 8 GB of memory. The path is the same on Windows 10 and 11, but that was not recorded. #### What happens, in order - The first run only turns on what Windows needs, and asks you to restart. - Restart. Then run the same command again. It installs Windows' Linux (Ubuntu), what Momoto needs in it, and Momoto. - Restart Windows once more. Momoto comes back by itself, because a Windows task starts it. ``` $ tar -xzf momoto.tar.gz $ powershell -ExecutionPolicy Bypass -File momoto\scripts\install.ps1 -Archive momoto.tar.gz $ Restart-Computer $ powershell -ExecutionPolicy Bypass -File momoto\scripts\install.ps1 -Archive momoto.tar.gz $ Restart-Computer ``` When it is done, check the task and the web app: ``` $ (Get-ScheduledTask -TaskName "Momoto WSL").State; curl.exe -s -o NUL -w "Momoto: %{http_code}" http://localhost:3020/ ``` #### How it works (technical) `scripts/install.ps1` runs on Windows and does the parts that need Windows. Inside the WSL distribution it runs the Linux installer, `scripts/install.sh`, with the same stages as the Linux page. Momoto's Docker runs inside WSL, not in Docker Desktop. The script creates the scheduled task **Momoto WSL** (only when run as administrator). The task starts at boot, runs `wsl.exe -d --exec sleep infinity` and restarts up to 3 times if it stops. The script starts the task at the end of the install, so you do not need to reboot to test it. #### Videos of the real product - **Installing Momoto on Windows** (2:08): https://momoto.io/docs/proof/act-03/3.10a-windows-computer/clip.mp4 1. In PowerShell as administrator, Diego unpacks Momoto and runs the Windows installer 2. The first time it only turns on what Windows needs and asks for a restart. He restarts 3. He runs the same command again: it installs Windows' own Linux, what Momoto needs, and Momoto 4. He restarts Windows once more. Momoto comes back by itself: a task of Windows starts it - **Momoto on a smaller Windows** (1:46): https://momoto.io/docs/proof/act-03/3.14a-second-windows/clip.mp4 1. In PowerShell as administrator, Renata unpacks Momoto and runs the Windows installer 2. The first time it only turns on what Windows needs and asks for a restart. He restarts 3. He runs the same command again: it installs Windows' own Linux, what Momoto needs, and Momoto 4. He restarts Windows once more. Momoto comes back by itself: a task of Windows starts it ### A memory ceiling for the apps of the store https://momoto.io/docs/#/p/operate/memory-for-each-app Each app of the store runs in a container, and you can cap how much memory each one may take on this machine. The cap is one value for every app, set from the System page. It is off by default. #### Before you start (for admins) - Only a platform admin sees «Memory for each app», on the **System** page. - The cap covers the apps of the store that run at this hub. It does not cover the database or cache an app asks for. - Saving restarts the apps that are running, so each one is unreachable for the seconds its start takes. What you saved is kept. #### Setting a limit (for admins) - **No limit** lets each app take what it needs. This is the default. - **At most** sets a cap, in MB or GB. For example, 2 GB. The smallest amount is 6 MB. - Press **Save**. If apps are running, they restart to take the new value. If none can be restarted now, each app takes it the next time it is published. To take the cap off, choose **No limit** and save. The apps come back with no ceiling. #### How it works (technical) The section is `packages/momoto-web/src/components/system/AppsMemorySection.tsx`, shown in `System.tsx` to platform admins only. It calls `GET /api/v1/system/apps` and `PUT /api/v1/system/apps`, served by `momoto_api.routers.apps_settings`. The body of the PUT is `{"memory": "2g"}`, or `null` for no limit. The value is one string in the installation's key-value store, read as Docker reads a memory limit. The use case accepts an amount of 6 MB or more. Saving asks the runtime to make the running apps again, through `runtime.refresh()`. The reply has an `applying` flag that says whether that happened. If the installation has never had a choice saved, the file's `MOMOTO_APPS_MEMORY` decides, and unset means no limit. #### Videos of the real product - **A memory ceiling for the apps of the store** (0:45): https://momoto.io/docs/proof/act-05/5.16-memory-for-each-app/clip.mp4 1. In «More › System», «Memory for each app» says how much each app of the store may take on this machine 2. She sets a ceiling of 2 GB and saves. The apps that are running restart to take it 3. Then she takes it off: «No limit». The apps come back with no ceiling ### Operating Momoto: status, logs and the first backup https://momoto.io/docs/#/p/operate/status-logs-backup Three commands tell you whether your installation is healthy: `status` shows each part, `logs` shows what a service last said, and `backup` keeps a copy of your data. The first backup needs a key, and this page shows how to make one. #### Before you start - Run the commands from the folder where Momoto is installed, with `./momoto`. - Keep a copy of the backup and its key somewhere other than this computer. A backup on the same disk is lost with the disk. #### Checking the status and the logs `./momoto status` lists each part of the installation and says whether it is up. It exits with an error code when a part is not right, so you can use it in a script. `./momoto logs` shows what a service last said. Name the service to see only its lines, and `--tail` sets how many. Add `-f` to follow the log as it grows. ``` $ ./momoto status $ ./momoto logs momoto-web --tail 6 ``` #### Your first backup `./momoto backup` backs up every part of the installation. Parts that hold secrets are kept only encrypted, so they need a backup key. Without one they refuse, and the others still run. ``` $ ./momoto backup # the parts that hold secrets refuse: there is no key yet ``` Make the key once, with permissions that only you can read: ``` $ (umask 077 && openssl rand -base64 32 > ~/.momoto-quetzal/backup.key) $ ./momoto backup ``` On a computer with more than one Momoto, keep each key in its own installation's data folder, and point that installation at it with `MOMOTO_BACKUP_KEY_FILE` in its `.env`. Otherwise the default is `~/.momoto-backup.key`. **Watch for skipped parts.** If no key path is set and no key exists, the parts that need one print a warning and are skipped, and the command still exits without an error. Read the output after every backup. #### How it works (technical) `./momoto backup` runs `make -k backup-all`. Each part writes its own file under `backups/`. The installation's settings file, `.env`, is written in the encrypted configuration backup, `backups/config/*.tar.enc`, together with `deploy/network/secrets.env`. Encryption and decryption are in `scripts/backup/lib-crypto.sh`. The key is read from `MOMOTO_BACKUP_KEY_FILE`. If that variable names a file that does not exist, the part stops with an error. If no key path is set anywhere and no key exists, the part warns and skips. #### Videos of the real product - **Operating Momoto: status, logs and the first backup** (0:42): https://momoto.io/docs/proof/act-01/1.17-operate-backup/clip.mp4 1. «./momoto status» says, part by part, whether the installation is up 2. «./momoto logs» shows the last things a service said 3. Her first backup. Whatever carries secrets is only kept encrypted, and there is no key yet: those parts refuse 4. She makes the backup key, once. A copy must live outside this computer 5. She runs the backup again: now every part writes its file ### Where the secrets are https://momoto.io/docs/#/p/operate/where-the-secrets-are Momoto keeps the passwords and keys of your connections in files, encrypted with a key that lives in the installation's settings. This page shows what that means for a backup: the database holds no readable secret, and the key travels only inside the encrypted backup. #### What is protected - The secrets of a connection, such as an SSH key or a database password, are stored encrypted, never in clear text. - The encryption key is `MOMOTO_SECRETS_KEY`, in the installation's `.env`. Nobody needs to type it. - The database holds those secrets only in encrypted form, so a dump of it does not reveal them. #### What the backup carries (for admins) The `.env` file, which holds the key, is written only into the encrypted configuration backup. That archive is authenticated. If it was made with another key, or if anyone changed it, the restore refuses it before any byte is decrypted. So you need the backup and its key together, and the backup key must be kept apart from the copy. #### How it works (technical) The file vault stores each secret at `////.secret`, under the `secrets` folder of the data directory (`/root/.momoto/dev/secrets` inside the API container). Each file is encrypted with `MOMOTO_SECRETS_KEY`. Connection secrets in Postgres are encrypted with the same key. To check it yourself, look at one file, then dump the database and search it for the key material. Neither should show readable text: ``` $ docker compose exec -T momoto-api find /root/.momoto/dev/secrets -name "*.secret" $ docker compose exec -T momoto-api sh -c 'head -c 96 /root/.momoto/dev/secrets/*/*/WAREHOUSE/ssh_key.secret | od -An -tx1' # the first bytes are ciphertext, not a PEM header $ docker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' | grep -cF "$(cat ~/.cache/momoto-proof/targets/db-password)" || true # 0 matches: the password is not in the dump ``` To check the backup, restore-test the archive with a different key first, then with the right one: ``` $ (umask 077 && openssl rand -base64 32 > /tmp/other-key.key) $ MOMOTO_BACKUP_KEY_FILE=/tmp/other-key.key bash -c 'source scripts/backup/lib-crypto.sh; decrypt_from "$(ls -t backups/config/*.tar.enc | head -1)" | tar t' # refused: the archive does not open with another key $ bash -c 'source scripts/backup/lib-crypto.sh; decrypt_from "$(ls -t backups/config/*.tar.enc | head -1)" | tar t' $ rm /tmp/other-key.key ``` #### Videos of the real product - **Where the secrets are** (1:21): https://momoto.io/docs/proof/act-05/5.13-where-the-secrets-are/clip.mp4 1. The secrets of the connections are files in Momoto's data folder. She opens one: the SSH key of «WAREHOUSE» cannot be read 2. She dumps the whole database and looks in it for that key and for the password of «SALES»: they are not there 3. The key that opens those files travels in the encrypted part of the backup. With another key it does not open; with its own, it does ### System: the state of the platform and a rule for every agent https://momoto.io/docs/#/p/system/platform-rules A platform rule is an instruction that every agent of every organization reads when it starts. Use it for a rule that must hold everywhere, not one organization at a time. Only a platform admin can write one. #### Before you start - The «Platform rules» section is on the **System** page, and only platform admins see it. Organization admins do not. - Every change asks for your authenticator's code first. - Every agent reads these rules, so keep secrets and personal data out of them. #### What you will notice - A saved rule takes effect the next time each agent **starts**. An agent that is already running keeps the instructions it started with. Restart it to make it read the rule. - The top of **System** shows the platform's health, its version, how long it has been powered on, and how many agents there are. - The box has a character limit. It is 4,000 characters unless the server sets another. - If the file the agents read no longer matches what is saved, the page shows a note and a «Publish again» button. Press it to publish the saved text once more. - To stop the rules, press «Remove the platform rules». The browser asks you to confirm. Agents stop receiving the rules at their next startup. #### How it works (technical) The section lives in `packages/momoto-web/src/views/System.tsx`. It calls three routes, served by `momoto_api.routers.prompt_config`: - **`GET /api/v1/prompt/global`**: Reads the saved text and the `max_chars` limit. The page falls back to 4000 when the server does not send one. - **`PUT /api/v1/prompt/global`**: Saves the text. Needs step-up on `PROMPT:UPDATE`, so the authenticator's code is asked. - **`DELETE /api/v1/prompt/global`**: Removes the rules. Also needs step-up on `PROMPT:UPDATE`. There is one set of rules for the whole installation. Each agent's container reads it when the container starts, which is why a change waits for the next startup. The status tiles at the top read the health check and `GET /api/v1/system/status` (for `uptime_seconds`). #### Videos of the real product - **System: the state of the platform and a rule for every agent** (1:11): https://momoto.io/docs/proof/act-01/1.10-system-platform-rules/clip.mp4 1. System says how the platform is: health, version, uptime and how many agents there are 2. She writes a rule that holds for every agent of every organization 3. She saves it. Momoto confirms it's her with her authenticator's code, and she presses Save again 4. She restarts her agent, so that it starts with the rule, and asks it something 5. The answer carries the signature 6. Back in System, she removes the rule. The browser asks whether she is sure 7. She restarts the agent and asks whether today's instructions carry any platform rule: not any more ### Sensitive skills: which ones ask for an admin's signature https://momoto.io/docs/#/p/system/sensitive-skills A sensitive skill is one that asks for an admin's signature before an agent may use it. Platform admins decide which skills are sensitive. Momoto shows whom a change reaches before it applies, so one switch does not hit every agent by surprise. #### Before you start - The «Sensitive skills» section is on the **System** page, and only platform admins see it. - Adding or removing a skill asks for your authenticator's code first. #### The five built-in skills Five sensitive skills come with Momoto: `momoto-vault-write`, `momoto-db-proxy`, `momoto-transparent-ssh`, `momoto-transparent-vpn` and `momoto-spawn-agent`. They are listed with a lock and cannot be removed. Removing any other sensitive skill leaves them in place. #### Adding a skill - Press «Add skill» and choose the skill. - Before you confirm, Momoto says whom it reaches. A skill that reaches agents by default shows the impact and asks you to type the skill's name to confirm. - Mark it as sensitive. Momoto asks for your authenticator's code before it applies. The rule applies to the skill's name in every organization on the installation. #### Removing a skill Press «Remove» on the skill's row. The five built-in skills have no such button. Removing a skill you added also asks for your authenticator's code. #### How it works (technical) The section is `packages/momoto-web/src/components/system/SensitiveSkillsSection.tsx`, with the add dialog in `AddSensitiveSkillModal`. It calls the routes of `momoto_api.routers.sensitive_skills`: - **`GET /api/v1/skills/sensitive`**: Lists the skills, including the built-in ones. - **`GET /api/v1/skills/sensitive/impact?name=`**: Says which agents the skill reaches. The screen calls it before you confirm. - **`POST /api/v1/skills/sensitive`**: Marks a skill as sensitive. Returns 201 when it is new, and 200 when nothing changes. - **`DELETE /api/v1/skills/sensitive/{name}`**: Removes a skill. The five built-in names return 409. Both the add and the remove need step-up on `SKILLS:UPDATE`. If the store of sensitive skills cannot be reached, the routes answer 503 with `sensitive_skills_not_available`. #### Videos of the real product - **Sensitive skills: which ones ask for an admin's signature** (0:33): https://momoto.io/docs/proof/act-01/1.11-sensitive-skills/clip.mp4 1. System lists the sensitive skills: five come built in and cannot be removed 2. Marisol adds one: searching the internet will ask for an admin signature 3. Momoto says whom it hits: it reaches her two agents by default. To confirm, she types the name 4. She marks it as sensitive. Momoto asks for her authenticator's code before applying something like this 5. And she takes it off: the five built-in ones still hold ### Changes not accepted https://momoto.io/docs/#/p/network/changes-not-accepted When you change what a member can reach, the change applies at once. The network also keeps count of the changes that member's Momoto has not yet confirmed, so you can see who has not seen them yet. #### What the count means (for admins) In **Network › People**, a person's line can say **1 change pending acceptance**, or the number of changes if there are more. These are changes to what that person can reach, such as an app given, taken away or changed, that their Momoto has not yet confirmed. The permission is already in force. The count does not mean the change is waiting to take effect. It means the person's Momoto has not yet told the hub that they saw it. When the person presses **Ready**, their Momoto confirms it, and the count goes away from their line. #### What to do as a member - Open **Approvals** and look at **From your organization**. It lists what was given or taken away from you since you last confirmed. - Read it, then press **Ready**. Your Momoto tells the hub you saw the changes. Until you press **Ready**, the changes are already applied, and the administrator still sees them as not accepted. #### How it works (technical) - The count is `GET /api/v1/organizations/{organization_id}/network/changes` (`unaccepted_changes`), shown by `People.tsx` through the label «N change(s) pending acceptance». - The member's list is `GET /api/v1/me/changes`. **Ready** sends the response to `POST /api/v1/me/changes` (`respond_changes`) from `packages/momoto-web/src/v2/inboxes/FromYourOrganization.tsx`. Responses to requests are sent only after the changes are answered. #### Videos of the real product - **Changes their recipient has not accepted yet** (0:15): https://momoto.io/docs/proof/act-04/4.21b-not-accepted-yet/clip.mp4 1. In «Network», Marisol sees that Renata is not connected and has 1 change not accepted - **The change has been accepted** (0:15): https://momoto.io/docs/proof/act-04/4.21d-accepted/clip.mp4 1. In «Network», Renata's line has no changes left to accept ### Creating the organization's network on her computer https://momoto.io/docs/#/p/network/create Creating the network makes the organization's network on the computer you are using. At first only the office can reach it; ways in from outside are added afterwards, in Paths. #### Before you start - The installation's network must be turned on first. See the page on turning it on. - Only a platform administrator can create the network. The screen is in «More › Network». - Creating it may ask you for your second factor, if you have one. Momoto repeats the action once you confirm. #### What each field means - **Who gets notified if it fails?**: Optional. The name or contact of the person who should hear about a failure. The field takes up to 80 characters. - **Create a local-only network**: The button that creates the network. The network is created with only the local network as its way in. Other ways in are added afterwards, in «Paths». #### What you will notice - The network's status is shown at the top. Once it is created it reads active. - «Paths» lists the ways in. At first there is only your local network. - Momoto seals the audit log from time to time. Whoever manages the installation can open the seals screen to check that the log matches its seals. A seal can be sent to be anchored outside the installation; the screen says when it is confirmed. #### Limits Until you add a path, nobody from outside can enter. Ways in such as zrok, a relay in the cloud or your own server are added in «Paths». #### How it works (technical) The screen is `packages/momoto-web/src/views/network/CreateNetwork.tsx`. Its button calls `POST /api/v1/organizations/{organization_id}/network` with `contact` and `address` (empty for a local-only network). The call runs through `withStepUp`, so the second factor is asked for when the server requires it. The handler is `create_network` in `momoto_api/routers/network.py`. It requires a platform administrator; the screen shows the create button only to that role. The view reads the state with `GET /api/v1/organizations/{organization_id}/network`. #### Videos of the real product - **Creating the organization's network on her computer** (0:43): https://momoto.io/docs/proof/act-03/3.03-create-network/clip.mp4 1. In «More › Network», with the hub on this computer, she writes who to tell if the network fails 2. «Local only» creates the network. Momoto confirms it is her and the network is active 3. «Paths»: the ways in. Today only her local network; from here zrok, a relay in the cloud or her own server are added 4. «Audit log»: what happens in the network is sealed. The first seal was already sent to be anchored ### Each on their own computer https://momoto.io/docs/#/p/network/each-on-their-own-computer In an organization every member's agent runs on that member's own computer and thinks with that member's own AI connection. Several people can write to their agents at the same moment, and each person's usage is counted on their own computer. #### What you will notice - You write to your agent, and your agent answers with your own AI connection. - Your usage moves your own computer's meter. The hub's meter does not move, because the hub does not run your agent. - Your agent's answers do not depend on the other members' computers being on. #### Good to know An agent uses the AI connection of the person it belongs to. To give an agent a different AI, change the connection of its owner. For how an agent is created and who owns it, see [Create an agent](https://momoto.io/docs/#/p/agents/create). #### How it works (technical) An agent is owned by one person and runs on that person's computer, using that person's AI connection (the `llm_backend` the owner chose). The hub keeps the organization's records and does not run the agent. Requests for a shared app still go through the hub, which is why those wait when the hub is off (see [When the hub is off](https://momoto.io/docs/#/p/network/when-the-hub-is-off)). #### Videos of the real product - **Everyone at once: Iván** (1:08): https://momoto.io/docs/proof/act-03/3.18a-at-once-ivan/clip.mp4 1. Iván writes to their agent at the same time as the others write to theirs - **Everyone at once: Lucía** (0:57): https://momoto.io/docs/proof/act-03/3.18b-at-once-lucia/clip.mp4 1. Lucía writes to their agent at the same time as the others write to theirs - **Everyone at once: Diego** (0:55): https://momoto.io/docs/proof/act-03/3.18c-at-once-diego/clip.mp4 1. Diego writes to their agent at the same time as the others write to theirs - **Everyone at once: Renata** (0:55): https://momoto.io/docs/proof/act-03/3.18d-at-once-renata/clip.mp4 1. Renata writes to their agent at the same time as the others write to theirs ### Invitations that fail https://momoto.io/docs/#/p/network/invitations-that-fail Sometimes an invitation does not go through: it was cancelled, it was already used, it lapsed, or the person said no. Each case tells you what happened and what to ask for. None of them lets anybody in. #### The cases - **Cancelled**: Whoever invited the person cancelled the link. Ask them for a new one. - **Already used**: A link works only once. If it was passed on after it had been used, it does not work. Ask for a new one. - **Lapsed**: A link lapses fifteen minutes after it was made, used or not. Ask for a new one. - **Turned down**: The person chose not to join. Their computer is shown as revoked, with the reason, on the hub. When you accept, you can take off teams you do not want, but you must keep at least one. Otherwise you decline the whole invitation. Declining leaves your own Momoto as it is: you can use it alone. #### What to do - If your link was cancelled, lapsed or used, ask the person who invited you for a new QR. A new link keeps the same account, role and teams. - If you changed your mind, you do not have to do anything. The invitation is simply not used. #### On the hub (for admins) In «Network › People», the filter «Revoked» lists the computers that no longer come in, with the reason for each one. If a person does not come in and you want to remove them, delete them from the people list. Momoto asks you to confirm first. Deleting closes their sessions and removes their roles; inviting them again creates a new account. A cancelled, used or lapsed link leaves only its line in the audit log. #### How it works (technical) - Cancelling is `DELETE .../network/invitations/{invitation_id}`. It leaves the person in place. - Revoked computers come from `GET .../network/devices`. Revoking with `DELETE .../network/devices/{device_id}` records the reason. - The invitation's state is read from `GET .../network/invitations/{invitation_id}`. #### Videos of the real product - **When an invitation does not go through: cancelled, already used, lapsed or turned down** (1:13): https://momoto.io/docs/proof/act-03/3.11a-invitations-that-fail/clip.mp4 1. Paola picks «Join with a QR» and pastes her link. Marisol had cancelled it: Momoto tells her so 2. She tries the link a colleague passed her, which he had already used: it works only once 3. Marisol sent her a new one, but she left it for later. Fifteen minutes on, it has lapsed 4. With a new QR for the same person the invitation does appear: organization, role and teams 5. This time it is she who decides not to come in. Her Momoto is still hers: she can use it alone - **Who turned their invitation down, seen from the hub** (0:33): https://momoto.io/docs/proof/act-03/3.11b-who-turned-it-down/clip.mp4 1. In «Network › People», the filter «Revoked» lists the devices that no longer come in. Paola's says why 2. Paola is not coming in: in «People», Marisol deletes her. Momoto asks first ### Inviting with a file, to come in from anywhere https://momoto.io/docs/#/p/network/invite-with-a-file Once zrok is on, you can invite a person with an invitation file instead of a QR. The file lets them come in from anywhere, through zrok, and it works once. #### Before you start - The file option appears only when zrok is on, and only for someone who is already in «People». Add a new person first, with «Add with QR», and invite them by file afterwards. - Each computer invited this way takes one of the places of the zrok account. - The file works once and lapses fifteen minutes after it is made. Whoever opens it first comes in as that person. #### Making the file - Add the person in «People», with their name and role, as for any QR. - Choose «New QR» for them and tick «Invite by file, so they can connect from anywhere (zrok)». Momoto reserves them a place on zrok and builds the file. - Download the file and send it only to that person. #### What the file does not offer The file keeps the person's role as it is in «People». The window does not offer a role choice for the file, so the custom roles do not come into it. #### How it works (technical) `POST /api/v1/organizations/{organization_id}/network/invitations/file` takes the person (`user_id`) and an optional `device_name`. It fails with 409 when zrok is off. It reserves the place on zrok, creates the invitation and returns the file. The response is marked `no-store`, and the environment's identity is not kept in any cache. The invitation lives fifteen minutes, like a QR. The handler is `invite_by_file` in `momoto_api/routers/network_zrok.py`; the screen is the invite window in `packages/momoto-web/src/views/network/`. #### Videos of the real product - **Inviting with a file, to come in from anywhere** (0:51): https://momoto.io/docs/proof/act-03/3.14c-file-for-renata/clip.mp4 1. First she adds her in People, like the others: «Add with QR», her name and her role 2. Now «New QR» for her, ticking «Invite by file». Momoto reserves her a place on zrok and builds the file 3. She downloads it and sends it only to Renata ### Invite with QR https://momoto.io/docs/#/p/network/invite-with-qr A QR invitation brings a new person into your organization's network from their own Momoto. You add the person, choose their role and organizations, and send them the link or the QR code. Whoever opens it first comes in as that person. #### Before you start - You need permission to invite people to the network. The invite screen is in «People». - You do not ask for an email. Momoto gives the account an internal address that nobody sees. - Send the invitation only to that person. It works once, for whoever opens it first. #### Adding someone with a QR - In «People», choose «Add with QR». - Enter the person's name, their role and the organizations they belong to. The screen asks for no email. - Momoto asks you to confirm it is you if your second factor is needed. It then shows the QR code, its code and its link. The QR, the code and the link are the same invitation. Send them to that person only. #### What each option means - **Role**: What the person may do with what belongs to the organization. There are five presets: admin, dev/research, ops, member and viewer. - **Organizations**: The teams the person is offered when they join. They can take some off before accepting, but must keep at least one. - **Device name**: Optional. The name this computer has in the network's list of computers. #### The invitation lapses An invitation lapses fifteen minutes after it is made, whether or not it was used. Choose «New QR» for the same person to make another one. The account, the role and the organizations stay as they were. If you change your mind, choose «Cancel invitation». That cancels the code only. The person stays in «People», where you can make a new QR or delete them. #### What you will notice In «People» the person shows as «Enters via the network», with their role and organization, until they join. #### How it works (technical) - `POST /api/v1/organizations/{organization_id}/network/members` creates the person and their invitation together. It takes `name`, `role` (one of the five presets), `entities` (the organizations, 1 to 64) and an optional `device_name`. If the invitation cannot be issued, the new account is removed again. - `POST .../network/invitations` makes a new invitation for a person who already exists (`user_id`, `device_name`). This is what «New QR» uses. - `DELETE .../network/invitations/{invitation_id}` cancels the code. It does not delete the person. - `GET .../network/invitations/{invitation_id}` is what the screen reads for the status. The lifetime is fifteen minutes, set by `CODE_VALIDITY_MS` in `momoto_core/usecases/_network_code.py`. The response of `members` is marked `no-store`. #### Videos of the real product - **Adding someone with a QR** (1:02): https://momoto.io/docs/proof/act-03/3.06-qr-for-ivan/clip.mp4 1. In «People», «Add with QR». It asks the name, the role and the organization; it asks for no email 2. Momoto confirms it is her and shows the QR, its code and its link: they work once and lapse in fifteen minutes 3. If she changes her mind, «Cancel invitation» leaves that code without effect. Iván stays in the list, not yet in 4. «New QR» makes another one for the same person. She sends it only to him 5. In People, Iván shows as «Enters via the network», with his role and his organization - **The QR lapsed: a new one for the same person** (0:29): https://momoto.io/docs/proof/act-03/3.08a-new-qr/clip.mp4 1. Iván took a while to install and his code lapsed. In People, «New QR» makes him another, without adding him again 2. She sends it only to him: whoever opens it first comes in as him - **Another person, another role: Lucía's QR** (0:29): https://momoto.io/docs/proof/act-03/3.09a-qr-for-lucia/clip.mp4 1. «Add with QR» again, now for Lucía and with the role «Dev/Research»: she makes agents and publishes apps - **An invitation to two organizations** (0:29): https://momoto.io/docs/proof/act-03/3.10b-qr-for-diego/clip.mp4 1. For Diego, the role «Ops» and her two organizations: besides the roaster, the shop ### Joining an organization when you already used Momoto https://momoto.io/docs/#/p/network/join-from-your-account If you already use Momoto on your own, you can join an organization without making a new account. You stay who you were, with your agents and conversations, and you gain the organization's store and memory. #### Before you start - You need an invitation from the organization's administrator: the link they sent you, copied whole, or the `.momonet` file. - Open *Your account*. It has **Join an organization**. - You will confirm accepting with your password and your second factor, as for any sensitive change. #### What happens, step by step - Paste the invitation link into **Your invitation link**, or choose the file under **Or upload the invitation file (.momonet), if you were sent one**. Choosing a file clears the link, and pasting a link clears the file. - Momoto shows the offer: **You're invited to** the organization's name, your name, your role and the **Teams** list. Untick the teams you do not want to be in. - You must stay in at least one team. To refuse the whole invitation, press **I don't want to join**. - Press **Accept** and confirm with your password and code. Momoto takes you to the organization's store. No account is created and no new password is set. Your agents, your chats and your local apps stay where they were. #### Limits and common mistakes - The file must be no larger than 32 KB. A real invitation is a few kilobytes. - If you are not sure the link is complete, paste it again from the message. Only the whole link works. #### How it works (technical) The screen is `JoinWithQr` in `packages/momoto-web/src/components/account/JoinWithQr.tsx`, opened from `views/Join.tsx` without a setup token. It makes two calls: - `POST /api/v1/me/network/join` with `{"link": ...}` or `{"file": ...}` returns the offer (organization, person, role, teams). Nothing is stored yet. - `POST /api/v1/me/network/member` with `{"accepts": true, "rejected": {"teams": [...]}}`, run inside the step-up (`withStepUp`). Rejecting sends `accepts: false` to the same route. Then the app refreshes `/me`, which now carries `network_member`, and opens the store. The handlers are `join_with_session` and `member_with_session` in `momoto_api/routers/network_member.py`. During the first-time setup the same screens run under `/setup/join` and `/setup/member`, and they also ask for a new password. #### Videos of the real product - **Joining an organization when you already used Momoto** (0:48): https://momoto.io/docs/proof/act-03/3.14d-renata-joins/clip.mp4 1. In «Your account» her account is still a personal one. Right there is «Join an organization» 2. She uploads the file Marisol sent her and sees what she is invited to before deciding 3. She accepts. No other account or password is made: she lands in her organization's store 4. Her agent and her earlier conversation are where she left them ### Join with QR https://momoto.io/docs/#/p/network/join-with-qr If someone invited you with a QR, you join their organization's network from your own Momoto. Your Momoto stays yours: your agents, conversations and memory live on your computer and think with your own AI. No email is asked. #### Before you start - You need the link the person sent you, or the invitation file if they sent one. The link works once and lapses fifteen minutes after it was made. - You need a Momoto of your own. On the first screen, choose «Join with a QR». - Your computer reaches the organization through the network's relay, so nothing has to be opened in your modem. #### Joining - Choose «Join with a QR» and paste the link. - Before you decide, the screen shows the organization you would join, your role and the teams you would be in. You can take off any team you do not want. You must keep at least one, or decline the whole invitation. - Accept, then set your password. No email is asked. - Optional: turn on the second factor now, or later in «Your account › Security». You turn it on on your own computer; the organization can require it of you. - Connect your own AI. Your agents think with it, not with the organization's. When you are done, «More › Store» shows the organization's store. It may have no apps yet. #### If you decide not to join Declining is your choice, and it leaves your Momoto as it is. You can keep using it alone. #### How it works (technical) The first screen sends the link to the hub, which reads the offer with `GET /api/v1/network/hub/offer` and answers with `POST /api/v1/network/hub/response`. - `POST /api/v1/setup/join` is used from a fresh installation. `POST /api/v1/setup/member` is the member step for the same invitation. - `POST /api/v1/me/network/join` is used by a person who is already signed in and joins another organization. It asks for the second factor when the account has one. The responses are marked `no-store`. The hub keeps you only in the teams you accepted. #### Videos of the real product - **Joining the organization with a QR, from his own Momoto** (0:56): https://momoto.io/docs/proof/act-03/3.08b-ivan-joins/clip.mp4 1. The first screen of his Momoto offers three ways. He picks «Join with a QR» 2. He pastes the link Marisol sent him. Before deciding he sees which organization he joins, with which role and in which teams 3. He accepts and sets his password. No email is asked 4. He leaves the second factor for later: it can be turned on any time in «Your account › Security» 5. He connects his own AI: his agents think with it, not with the organization's 6. He already has his first agent. In «More › Store» is the organization's store, with no apps yet - **Joining and turning on the second factor right away** (0:46): https://momoto.io/docs/proof/act-03/3.09b-lucia-joins/clip.mp4 1. «Join with a QR», she pastes her link and sees her invitation: her role is «Dev/Research» 2. She accepts and sets her password 3. She does turn on the second factor: she scans the code with her authenticator app and types the 6 digits 4. She downloads her recovery codes and confirms she kept them 5. She connects her own AI. As she now has a second factor, Momoto asks for the code to confirm - **Joining from Windows and staying in only one team** (0:38): https://momoto.io/docs/proof/act-03/3.10c-diego-joins/clip.mp4 1. «Join with a QR» and his link. The invitation brings two teams: the roaster and the shop 2. The shop is not his thing: he takes it off and accepts only the roaster 3. He sets his password, leaves the second factor for later and connects his own AI ### Leaving https://momoto.io/docs/#/p/network/leaving You can leave an organization on your own at any time. Your Momoto stays yours, with your account, agents, chats and local apps; you lose the organization's store and shared memory. #### Leaving - Open *Your account* and go to **Profile**. At the bottom is **Leave the organization**. - Momoto explains what happens to your account, your agents and your apps. Read it. - Confirm with your password and your second factor. Leaving needs the hub to answer. If the hub does not answer, the leave does not go through, and you can try again later. After you leave, your Momoto is yours alone: your agents are where they were, and your conversations and local apps still open. The organization's store is gone from your menu, and the organization's address no longer opens. #### Coming back To return, ask the organization for a new invitation. Use it the same way as the first time: in *Your account*, press **Join an organization** and follow [Joining an organization when you already used Momoto](https://momoto.io/docs/#/p/network/join-from-your-account). Your own Momoto keeps the same account, agents and chats. At the hub you come back as a new account, so anything the organization gave you before does not come back with you. Its owners have to give it to you again. #### If the organization no longer recognizes you If the organization no longer recognizes you, your **Profile** says so and offers **Stay as individual**. Momoto does not choose for you. Pressing it is your own step, and it is separate from leaving: it only makes your Momoto yours alone again. #### How it works (technical) - The screen is `LeaveOrganization.tsx` in `packages/momoto-web/src/components/account/`. The step-up runs before the call. - `POST /api/v1/me/network/member/leave` (`leave_the_organization`) asks the hub to end the membership. It needs the hub's answer, so with the hub off it fails and changes nothing. - `POST /api/v1/me/network/member/individual` (`continue_as_individual`) is the step taken when the organization no longer recognizes the person. It is kept apart from leaving, so the choice stays with the person. - Joining again uses `POST /api/v1/me/network/join` and `POST /api/v1/me/network/member`, as on the join page. #### Videos of the real product - **Leaving the organization on her own** (0:32): https://momoto.io/docs/proof/act-08/8.01a-renata-leaves/clip.mp4 1. In «Your account › Profile», at the bottom, there is «Leave the organization» 2. She presses it. Momoto explains what happens to her account, her agents and her apps, and asks for her password 3. Her Momoto is still hers: her agents are where they were - **What the admin sees when someone leaves, and the way back** (1:02): https://momoto.io/docs/proof/act-08/8.01b-marisol-sees-she-left/clip.mp4 1. On the bell, a notice: Renata left the organization and her app on the host passed to Marisol 2. In «Network › People», with «Show: Revoked», Renata's devices say «Left on their own account» 3. In the store, «Catalog», which Renata had on the host, is now Marisol's 4. She is no longer in «People». «Add with QR»: a new person, her name, her role and her computer 5. She sends the link only to Renata - **Coming back to the organization after leaving** (0:36): https://momoto.io/docs/proof/act-08/8.01c-renata-comes-back/clip.mp4 1. In «Your account» her Momoto is only hers again. Right there is «Join an organization» 2. She pastes the new link Marisol sent her and sees what she is invited to 3. She accepts. No new account or password: she is back in her organization's store - **Giving the CRM again to someone who came back** (0:25): https://momoto.io/docs/proof/act-08/8.02a-given-again/clip.mp4 1. In the CRM's «Share», Renata is listed once: the new account, with nothing given 2. Lucía ticks «Can use it» for her again - **She is removed from the organization with the CRM open** (0:59): https://momoto.io/docs/proof/act-08/8.02b-renata-is-let-go/clip.mp4 1. In «Approvals», «From your organization»: she was given the CRM again. She presses «Ready» 2. She opens the CRM and works in it 3. At that moment Marisol removes her from the organization at the hub. The CRM stops answering her 4. In «Your account › Profile», her Momoto tells her: «The organization no longer recognizes you» 5. She presses «Stay as individual»: her Momoto is only hers again, with her agents - **Removing a person from the organization** (0:55): https://momoto.io/docs/proof/act-08/8.02c-marisol-lets-her-go/clip.mp4 1. In «People» at the hub, Renata enters through the network from her computer 2. «Delete»: Momoto reminds her that her sessions close and that inviting her again would be another account. She accepts 3. In «Network › People», with «Show: Revoked», her devices say «Removed from the organization» 4. Five people remain in «People» - **What she keeps: her Momoto, her agents and her conversation** (1:21): https://momoto.io/docs/proof/act-08/8.03a-renata-keeps-her-momoto/clip.mp4 1. She opens the conversation with her assistant: its history is still there, and it answers her 2. In «Agents» her agents are there, as before 3. The menu has no «Store» or «Network» any more: nothing of the organization 4. The CRM address she used no longer opens anything ### Can it be reached from outside? A test with someone on another network https://momoto.io/docs/#/p/network/outside-test The outside test checks whether someone on another network can actually reach your network. You make a test link, open it from another network, and Momoto tells you whether it arrived and by which way. #### Before you start - You need a second device that is already in the network, on a different network from yours: a phone on mobile data is enough, or someone else's computer. - The test only checks the way in you have set up. It does not give anyone access. #### Running it - In «Network › Paths», at the end, choose «Can it be reached from outside?» and make a test link. - Send it to the other person. They open it on their computer with `momoto-network probe`, as the screen explains. - Your screen reports the result. #### What the result means - **Reached from outside**: Someone arrived by a direct path. The screen shows the address it was seen from. - **Someone got in from outside**: They arrived through a relay or through Docker, which hide the address. Momoto knows the way they came in, not the address. - **No one arrived**: Check the modem, the firewall, or whether your provider shares the address with other customers (CGNAT). When no one arrives, the screen cannot tell which of these is the cause. Check them yourself. #### How it works (technical) - The screen creates a probe with `POST /api/v1/organizations/{organization_id}/network/probes` and reads its result from `GET .../network/probes/{probe_id}`. - The result comes from the gate's record of the arrival. The address is included only when the arrival was direct and the address was visible; through a relay it is not. #### Videos of the real product - **Can it be reached from outside? A test with someone on another network** (0:52): https://momoto.io/docs/proof/act-03/3.08c-reached-from-outside/clip.mp4 1. In «Network › Paths», at the end: «Can it be reached from outside?». She makes a test link 2. She sends it to Iván, who is on another network. He opens it on his computer with «momoto-network probe» 3. Her screen says it: someone got in from outside. They came in by the relay, so Momoto does not see from which address ### A direct way in: the hub by its name https://momoto.io/docs/#/p/network/own-server If your organization's hub has its own public address, you can tell Momoto to reach it by that name, without a relay. Every device then gets the new route by itself, and nobody on the members' computers has to type or scan anything. #### Before you start (for admins) - You need a public name or IP address for the hub, and the three network ports open on it. Momoto shows which three ports this installation uses, in the dialog. - Your modem or firewall must let those ports through to the hub's machine. Momoto cannot open them for you. - You need permission to change the network's paths. #### Adding your own server (for admins) - Open **Network** and go to **Paths**. The list still has the paths from before: a local network, a relay or zrok, if you used them. - Press **Add my own server**. In the dialog **My own server**, type the hub's name or public IP in **Address**, without `https://` and without a path. The dialog shows the three ports for this installation and the note about the modem. - Press **Add**. Then check the new path. Use **Verify** on a local or direct path to test it. The check runs from the server itself, so it shows that the name and the ports answer from there. It does not prove that every device can reach the hub from outside. Use a path's menu to change it. **Disable** and **Activate** turn it on or off, **Move up** moves it above the others, and **Remove…** deletes it. Devices try the paths in the order of the list, so put your path first once it works, and disable the old ones. #### What you will notice (for admins) - Each computer asks the hub for the path list every ten minutes. Nothing needs to be done on the computers: each one switches when its next check comes. - To see which path a computer uses now, run this on that computer: `docker compose exec -T momoto-network-client /momoto-network status`. #### How it works (technical) - The paths page is `packages/momoto-web/src/views/network/Paths.tsx`. The dialog is `views/network/MyOwnServer.tsx`, which checks the address before it sends it: a name or a public IP, with no scheme and no path. - `GET` and `POST /api/v1/organizations/{organization_id}/network/paths` list and add paths. `PATCH` and `DELETE .../network/paths/{path_id}` change and remove one. `POST .../paths/{path_id}/verify` runs the check. The server dials only from itself, so only the local and direct paths offer **Verify**. - The clients refresh the path list every ten minutes and try the paths in order of priority. **Move up** changes that priority. #### Videos of the real product - **A direct way in: the hub by its name** (1:58): https://momoto.io/docs/proof/act-07/7.07a-a-direct-way-in/clip.mp4 1. «Network › Paths» still has the paths from before the move: the old office's local network, the relay and zrok 2. «Add my own server»: the address is the hub's name. Once it is added, she checks it 3. The old office's path no longer leads anywhere: she checks it, it fails, and she turns it off 4. Devices try the paths in the order of the list. With «Move up», hers goes above the ones still working 5. Nobody touches the four computers: each one asks the hub for the new list when its turn comes and moves to the new path 6. On Iván's computer, his Momoto says where it gets in now: the new path, with the new version of the list ### What the administrator sees of her network https://momoto.io/docs/#/p/network/people-and-devices In «Network › People» the administrator sees who is inside the organization's network, from which computer, and whether each computer is connected right now. Everything that changes in the network is also written to a log that is sealed, so later edits can be detected. #### Who is inside (for admins) Open **Network** and stay on **People**. Each person is listed with their computers. A computer shows whether it is connected right now. - **Inside**: The people and computers in the network now. This is the default view. - **Pending**: Invitations that are not used yet. - **Revoked**: Computers that were removed from the network. - **All**: Everything: the invitations that lapsed, were cancelled or were turned down, and every computer that was removed. Use it to see the history. A line that says **1 change pending acceptance** (or the plural) means you have changed what that person can reach, and their Momoto has not yet confirmed it. The permission already applies; the count only tells you the person has not seen it. It goes away when they press **Ready** (see [Changes not accepted](https://momoto.io/docs/#/p/network/changes-not-accepted)). #### What you can do with a computer (for admins) - **Help bring back**: starts a new invitation so that a computer that lost its place can come back. - **The person's apps**: opens which apps of the network that person may open. You need permission to change access. - **Revoke**: removes the computer from the network. You need permission to delete devices. - A pending invitation can be cancelled from its line. What you can see and do depends on your role. If a button is missing, your role does not allow it. #### The audit log and its seals (for admins) **Audit log** lists what happens in the network. Momoto seals it every five minutes. Each seal is a fingerprint of the lines written in that window and of the seal before it. If a line is changed or removed afterwards, the chain no longer matches. Once a day Momoto also sends the fingerprint of the latest seal to public Bitcoin timestamp calendars, so the record can be checked against a source outside Momoto. The confirmation on Bitcoin takes time, so a fresh seal may show as waiting. The Audit log tab appears only for a platform administrator who can read the audit log. #### How it works (technical) - The network tabs and People list are in `packages/momoto-web/src/views/network/`, with the filters *Inside*, *Pending*, *Revoked* and *All*. - The computers come from `GET /api/v1/organizations/{organization_id}/network/devices`; the invitations from `GET .../network/invitations`; unaccepted changes from `GET .../network/changes`. - **Help bring back** calls `POST .../network/devices/{device_id}/relocate`. **Revoke** calls `DELETE .../network/devices/{device_id}`. - Sealing runs in the API process when `MOMOTO_NETWORK_SEAL` is on. `docker-compose.network.yml` sets it to 1. Each seal links to the one before, which is what makes an edit visible. - The anchor is written once a day, and it covers the latest seal. It is an OpenTimestamps proof, which is confirmed on Bitcoin later. #### Videos of the real product - **What the administrator sees of her network** (0:50): https://momoto.io/docs/proof/act-03/3.15-what-the-admin-sees/clip.mp4 1. «Network › People»: who is inside, from which computer and whether they are connected right now 2. The filter «All» keeps the history: every invitation that lapsed, was cancelled or was turned down, and every computer that was removed 3. In each computer's actions: help it come back, revoke it, or see which apps of the network that person may open 4. «Audit log»: everything that happens in the network is sealed every five minutes, and the first seal is anchored outside Momoto ### Relay https://momoto.io/docs/#/p/network/relay A relay is a small server in your own cloud account that gives people a way into your network from outside. Your computer dials out to the relay, so nothing has to be opened in your modem. Momoto creates and removes the server for you, but the cloud bill is yours. #### Before you start - You need an account with a cloud provider, and a credential for it. Momoto stores the credential encrypted and never shows it again. - Where the provider allows it, use a credential that can only manage servers in the region you choose. - The relay is a server in your account, so your provider charges for it. Momoto does not. - Turning a relay on or off asks for your second factor if you have one. #### Turning one on - In «Network › Paths», open «Relay in the cloud» and connect a cloud account with its credential. - Choose «Turn on a relay». The screen shows the regions and sizes with their approximate monthly price. Pick the smallest that fits. - Momoto creates the server in your account, starts it and connects it to your network. The screen shows each step until it works. - The new path, «Cloud · Relay», appears at the top with its own state. «Verify» is for paths your computer can dial by itself, such as your local network. #### Turning it off Choose «Turn off» on the relay. Momoto warns that whoever enters through it loses access, and that it deletes the server from your account. The path is removed at once. If no relay is left, the cloud account is no longer needed. Choose «Remove» next to the account. Momoto deletes the credential it kept. #### Limits and gotchas - The relay only passes sealed traffic along. It cannot read what goes through it. - A relay that does not become ready within about ten minutes is deleted again, so you are not billed for a server that never worked. - Turning the relay off cuts off everyone who enters through it. Check first who relies on it. #### How it works (technical) The screens are in `packages/momoto-web/src/views/network/Cloud.tsx`. The account is connected with `POST /api/v1/organizations/{organization_id}/network/accounts`, and its credential can be replaced with `PUT .../accounts/{account_id}`. The regions and sizes come from `GET .../network/cloud/options`. - `POST .../network/relays` creates the relay. `GET .../network/relays` lists them with their state. - `DELETE .../network/relays/{relay_id}` turns it off: it removes the server and its path. - `DELETE .../network/accounts/{account_id}` removes the account and deletes the credential stored for it. Creating and turning off a relay run through `withStepUp`. The server-side handling is in `momoto_api/routers/network_cloud.py`. #### Videos of the real product - **A way in from outside: a relay in the cloud** (1:35): https://momoto.io/docs/proof/act-03/3.04-relay/clip.mp4 1. In «Network › Paths», «Relay in the cloud»: she connects a cloud account with a key that only manages servers in one region 2. «Turn on a relay» shows the region and the sizes with their approximate monthly price. She picks the smallest 3. Momoto creates the server in her account, starts it and connects it to her network 4. The new path, «Cloud · Relay», appears at the top and reports its own state. «Verify» is for what her computer can dial by itself, like her local network - **The relay is turned off and the cloud account removed** (1:12): https://momoto.io/docs/proof/act-07/7.07b-the-relay-off/clip.mp4 1. In «Network › Paths», further down, the cloud relay still works, though nobody gets in through it any more 2. «Turn off»: Momoto warns that whoever gets in through it loses access and that it deletes the server from her account 3. With no relay, the cloud account is no longer needed: she removes it, and Momoto deletes the key it kept ### Turning the installation's network on https://momoto.io/docs/#/p/network/turn-on Before anyone can create a Momoto network, whoever operates the computer turns the installation's network on, once, from a terminal. This publishes the network to the office's own network; nobody can enter from outside until a way in is added on the screen. #### Before you start - You need a terminal on the computer that runs Momoto, in Momoto's folder. This is not done on the screen. - Choose the mode first. `lan` publishes the network to the office's own network. `local` keeps it to this computer. - Run it once. After that, the screen can create the network. #### The two modes - **lan**: The network is published to the local network. Other computers in the office can reach it. Nobody from outside can enter until a way in is added in «Paths». - **local**: Only this computer reaches the network. With this mode the create screen will not create a network: it says the installation's network is not enabled and asks whoever operates it to enable it. Use `lan` if people will come in from other computers at the office. Use `local` only for a single-computer test. #### What you will notice Before the change, «More › Network» says this installation's network is not on. After it, the network can be created from the same screen. The command prints the services it started, and `docker compose ps` shows them as running. #### Running it (for admins) ``` # name the network's site and store its startup password (once) $ ./momoto network site # publish it to the local network and start its services $ ./momoto network mode lan --turn-on 2>&1 | grep -E "^network-mode|Started|Healthy|Built" | tail -14 # check the services $ docker compose ps --format "table {{.Service}}\t{{.Status}}" | grep -E "SERVICE|network" ``` Without `--turn-on`, the command only changes the mode and warns that the services are not started. #### How it works (technical) `./momoto network mode` runs `scripts/network-mode.sh` with `lan`, `public` or `local`. `--turn-on` turns on the `network` profile, builds the images and starts the services. `./momoto network site` runs `scripts/network-site.sh`, which sets the site name and stores the controller's startup password. - In `lan` mode the network is published on ports 1280, 3022 and 1290 at the computer's address. - Docker publishes its ports through its own firewall rules, which run before `ufw`. `./momoto network firewall` prints the rules to apply; it does not apply them for you. #### Videos of the real product - **Turning the installation's network on** (0:57): https://momoto.io/docs/proof/act-03/3.01-network-on/clip.mp4 1. In «More › Network», Momoto says this installation's network is not on 2. In the terminal, once: she names the network's site and stores its startup password 3. And she publishes it to her local network. Momoto builds and starts the network's services 4. Back on the screen, the network can now be created ### What changes in your Momoto when you join https://momoto.io/docs/#/p/network/what-a-member-sees When you join an organization, your own Momoto stays yours: you still manage your agents, memory, log and system. The organization adds its store and its shared memory, and the organization's role only limits what belongs to the organization. #### What stays the same - The menu is the usual one: your agents, your memory, your log and your system. At home you are the one who manages them. - Your account is still yours. You can change your password and your second factor in *Your account*. - You still see and use your own agents and conversations. #### What the organization adds - **The Store** lists the organization's apps. You open the ones you may use. For the others you see **No access** and can press **Request access**. - **Memory** has a block for the organization. It holds the organization's shared facts and notes, kept at the hub, with a copy on your computer. - If your role is an administrator of the organization, the organization's memory block offers **Add a fact**. What you write there is stored at the hub, so every member sees it. Members without that role do not see the button. #### Leaving In *Your account*, at the bottom of **Profile**, is **Leave the organization**. Momoto asks for your password and needs the hub to answer. See [Leaving](https://momoto.io/docs/#/p/network/leaving) for what happens to your account and apps. #### How it works (technical) - After joining, `/me` returns `network_member`, and the app shows the Store. `GET /api/v1/me/network/member` returns your membership. - The Store reads `GET /api/v1/me/network/member/store`. Requests for an app go to `POST /api/v1/me/network/member/requests`. - The memory block button depends on the hub's answer that you may write facts (`writes_facts`, the permission to manage the organization's users). Writing goes to `POST /api/v1/me/network/member/memory/facts` (`note_fact_in_hub`), which the hub stores. - Leaving calls `POST /api/v1/me/network/member/leave` (`leave_the_organization`) inside the step-up. #### Videos of the real product - **What changes in your Momoto when you join** (0:37): https://momoto.io/docs/proof/act-03/3.16-a-members-own-view/clip.mp4 1. The menu is the usual one: his agents, his memory, his log, his system. At home he is the one who manages 2. In «Your account» there is no email: he came in with a QR. The way out is there too, «Leave the organization» 3. In «Memory», his organization's block. As an administrator of it, he is offered «Add a fact»; what he writes there is kept at the hub 4. And in «More › Store», his organization's apps ### No access is no connection https://momoto.io/docs/#/p/network/what-no-access-means Being in an organization does not give you every app. An app you may not use shows «No access» in the store, and its address does not open for you, not even for an administrator. #### What you will see - In the Store, an app you may not use shows **No access**, with a way to ask for it: **Request access**. - An administrator sees the same «No access» on an app that belongs to someone else. Being an administrator of the organization does not open every app. - If you type the app's address into your browser, it does not open. Your Momoto tells you to ask for it in the store. #### What to do - Open the app's card in the Store and press **Request access**. - The owner of the app sees your request and decides. Until then the app stays closed to you. - When the owner gives you access, the app opens from the Store. You do not need to type its address. If the hub is not connected, your request is kept on your computer and sent when the hub is back. See [When the hub is off](https://momoto.io/docs/#/p/network/when-the-hub-is-off). #### How it works (technical) - The Store shows each app with `my_access`. When it is not «Open», the card shows **No access** and **Request access** (`packages/momoto-web/src/v2/store/Store.tsx`). - Asking sends `POST /api/v1/me/network/member/requests` (`request`). The owner sees and answers it through `GET` and `POST /api/v1/me/network/member/requests-for-me`. - The address of an app is not a way around the store. The hub opens the way to an app only for people it has granted it to; the rule is enforced by the network, not by the app's own login page. #### Videos of the real product - **No access is no connection** (0:24): https://momoto.io/docs/proof/act-04/4.19-no-access-no-connection/clip.mp4 1. Iván is an administrator, and even so the store tells him «No access» to Lucía's CRM 2. He types the app's address directly: it does not open. His Momoto tells him to ask for it in the store ### When the hub is off https://momoto.io/docs/#/p/network/when-the-hub-is-off The hub is the computer that holds the organization's store, shared memory and connections. When the hub is off or unreachable, each person's own things keep working and what belongs to the organization waits. When it returns, everything resumes without anyone touching their computer. #### What keeps working - **Signing in**: your own Momoto checks your password, so you can sign out and in again. - **Your agents**: they run on your computer with your own AI, and they still know the organization's rules, from the copy your Momoto keeps. - **Your chats** and **your local apps**: an app that lives on your computer keeps opening there. - **Your permissions**: what you had keeps applying. #### What waits - **The Store** reads from the hub. Your Momoto says: *The store lives at the hub and is not connected. It fills in on its own once it's back.* Apps your own computer hosts still appear and open, and your Momoto says so. - **Apps that others host** show **Pending: the owner is not connected** or **Its owner is not connected**. You cannot ask for or open them until the hub is back. - **Requests** you send wait on your computer and go out by themselves once the hub is back. - **Accepting changes** waits too: **Ready** is sent when the hub answers. Your Momoto shows a notice when the hub is not connected. It tells you what keeps working and what waits. It goes away by itself when the hub answers. #### When the hub is off, in practice Where the hub lives decides how often this happens: - If the hub runs on an owner's computer, it is off whenever that computer is off or asleep. - If the hub is a cloud server and loses power, it does not stop in order. Its apps stop answering, because the hub is the way to them. Requests you sent meanwhile stay on your computer. - An app that runs on an outside server keeps running, but nobody reaches it while the hub is down, because the hub is the way in. - People who use Momoto only through the hub's web address cannot get in while the hub's machine is off. Their agents live at the hub too, and wait with it. #### When the hub is back Each Momoto keeps trying the hub on its own. When it answers, the notice goes, the Store fills in, and your requests and answers are sent. Nobody has to restart anything, and each computer keeps its own identity. The web session on the hub expires after 15 minutes without use by default. If the hub was off longer, you sign in again with your password and your second factor, as on any day. #### How it works (technical) - The store reads `GET /api/v1/me/network/member/store`. When the hub gives no answer, the Store shows the notice and, for the apps this computer hosts, the cards it last saw. The notice texts are in `packages/momoto-web/src/v2/store/Store.tsx` and the hub notice component. - Your own sign-in does not call the hub. Your password is checked by your own Momoto. - Requests and answers are kept on your computer until the hub accepts them. Changes are confirmed with `POST /api/v1/me/changes`. - The web session idle time defaults to 15 minutes (`idle_min` in the auth session store); the absolute life of a session is set separately. #### Videos of the real product - **The owner's computer sleeps: what a colleague sees** (1:42): https://momoto.io/docs/proof/act-06/6.07a-the-hub-sleeps-lucia/clip.mp4 1. Marisol's computer is off. Lucía's Momoto tells her so, and what keeps working 2. Her agent keeps working: it runs on her computer, with her own AI 3. The store lives at the hub: it says so, and that it fills in by itself when it is back - **With the hub off, his local app keeps opening** (0:29): https://momoto.io/docs/proof/act-06/6.07b-the-hub-sleeps-diego/clip.mp4 1. Diego's store says it lives at the hub, and lists the apps his computer hosts 2. «Labels» lives on his computer: its card is still there, and «Open» opens it - **With the hub off: signing in with your password, and what waits** (0:33): https://momoto.io/docs/proof/act-06/6.07c-the-hub-sleeps-renata/clip.mp4 1. Renata signs out and in again: her Momoto greets her by name and asks only for her password 2. In the store she cannot ask for anything yet: it lives at the hub. Requests wait until it is back - **With the hub off, everyone keeps going with their own** (1:18): https://momoto.io/docs/proof/act-06/6.07d-the-hub-sleeps-ivan/clip.mp4 1. Iván's Momoto says it too: the hub is not connected 2. His agent answers all the same, and still knows the organization's rules: his Momoto keeps a copy 3. In «Memory», his organization's block says it is his Momoto's copy, and up to when it is up to date - **The hub is back: everything resumes by itself** (1:19): https://momoto.io/docs/proof/act-06/6.07e-the-hub-is-back/clip.mp4 1. Marisol turned her computer on. On Renata's Momoto the notice goes away by itself 2. The store filled in by itself. Now she does ask for access to «Automations»: her request reaches the hub and waits for its owner - **The hub goes down without warning: what Diego sees** (1:24): https://momoto.io/docs/proof/act-08/8.05a-the-hub-goes-down-diego/clip.mp4 1. Diego works in the CRM, which lives at the hub: he opens it from the store 2. With no warning, the hub loses its power. The CRM stops answering: the way to it goes through the hub 3. Diego closes the tab. His Momoto tells him by itself that the hub is not connected 4. Meanwhile he asks for access to «Dashboard». His request stays on his computer and waits for the hub to come back - **With the hub down: signing in, his local app and his agent** (1:25): https://momoto.io/docs/proof/act-08/8.05b-the-hub-is-down-diego/clip.mp4 1. Diego signs out and in again: his Momoto checks his password without asking the hub 2. His store keeps the apps his computer hosts. «Labels» lives there, and «Open» opens it 3. His agent «Automation» answers: it runs on his computer, with his own AI - **With the hub down: what Lucía sees** (1:21): https://momoto.io/docs/proof/act-08/8.05c-the-hub-is-down-lucia/clip.mp4 1. Lucía's Momoto tells her the hub is not connected, and what keeps working 2. Her agent keeps working: it runs on her computer, with her own AI 3. The store lives at the hub: it says so, and that it fills in by itself when it is back - **With the hub down: what keeps going and what waits** (1:29): https://momoto.io/docs/proof/act-08/8.05d-the-hub-is-down-ivan/clip.mp4 1. Iván's Momoto says it too: the hub is not connected 2. His agent answers, and still knows the organization's rules: his Momoto keeps a copy 3. «External reports» keeps running on its server, but it does not open: the way to it goes through the hub - **With the hub down: whoever only uses the web cannot get in** (0:35): https://momoto.io/docs/proof/act-08/8.05e-the-hub-is-down-marisol/clip.mp4 1. Marisol opens the hub's address, as every day. Nothing answers: her Momoto is the hub - **The hub is back: Diego's things resume by themselves** (0:34): https://momoto.io/docs/proof/act-08/8.05f-the-hub-is-back-diego/clip.mp4 1. The hub is on again. On Diego's Momoto the notice goes away by itself 2. His request for «Dashboard», which waited on his computer, has gone out by itself: now it waits for its owner 3. And the CRM, which lives at the hub, opens again - **The hub is back: the web answers again** (0:38): https://momoto.io/docs/proof/act-08/8.05g-the-hub-is-back-marisol/clip.mp4 1. Marisol opens the same address and Momoto answers. More than a quarter of an hour went by without using it, so she signs in again with her password and her code 2. In «Network», each person's computer came back to the network by itself, without scanning anything ### Where does the hub live? On an always-on server https://momoto.io/docs/#/p/network/where-the-hub-lives The hub is the computer that keeps an organization's network. When you create the network, Momoto asks where the hub will live: on the computer you are using, or on an always-on server. #### Why it matters While the hub is off, nobody can open other people's apps, and no access is given or taken. A hub on a personal computer is fine to start with, but then keeping it on and backed up is up to you. An always-on server is the better place for an organization that depends on the network every day. A network on a personal computer can be moved to a server later. #### The two choices - **This computer**: The hub runs here. Pick it to start; you keep it on and backed up. - **On an always-on server**: Nothing is created on this screen. It shows three steps and the command that installs Momoto on the server. Run those steps on the server, then open Momoto there to create the network. #### What to do Choose **This computer** to go on. The next screen asks for the contact and creates the network. #### How it works (technical) The screen is `packages/momoto-web/src/views/network/CreateNetwork.tsx`. The choice is only shown in the screen; it is not sent to the API. The server option renders the install steps and does not call any route. The network is created by `POST /api/v1/organizations/{organization_id}/network`, only for a platform administrator with permission to create networks. #### Videos of the real product - **Where does the hub live? On an always-on server** (0:30): https://momoto.io/docs/proof/act-03/3.02-hub-on-a-server/clip.mp4 1. «Create your Momoto network» asks where the hub lives. On her computer: keeping it on and backed up is on her 2. The other answer, «On an always-on server», creates nothing: it gives three steps and the command to install Momoto there 3. She goes back to «This computer», which is where she will start ### Zrok https://momoto.io/docs/#/p/network/zrok zrok is a free service (zrok.io) that gives your network a way in from outside, with no server to pay for and nothing opened in your modem. It is slower than a relay, and a free account has room for a limited number of computers. #### Before you start - You need a free zrok.io account. You paste its line, or its token, on the screen. - Only a computer invited with an invitation file can come in this way. See the page on inviting with a file. - A free account has a limited number of places. The card shows how many are used. #### Turning it on - In «Network › Paths», choose «Enter from outside with zrok». The window says where to get the line of your free account. Paste it. - «Turn on zrok» warns first that everything is a little slower this way: each request takes 0.15 to 0.3 seconds longer, and opening a session takes about 5 seconds. Accept, and Momoto publishes your network on zrok.io. - There are now three paths at the top: your local network, the relay and zrok. #### The places left The card shows the seats used out of the total on your account. Each computer invited by file takes one of them. #### Turning it off, and removing the account - «Turn off» shuts zrok down. Whoever came in through zrok stops reaching the network that way. - Once zrok is off, the account can be removed with «Remove» next to it. Momoto deletes the credential it kept for the account. #### How it works (technical) - `GET .../network/zrok` reads the state and the seats in use. - `POST .../network/zrok` turns it on, for the account chosen. The screen shows the slow-path warning before it calls this. - `DELETE .../network/zrok` turns it off. - The account is connected with `POST .../network/accounts`. The screen accepts the line as pasted, including its `zrok2 enable` prefix, and keeps the token. The screens are in `packages/momoto-web/src/views/network/Zrok.tsx`, and the server handling is in `momoto_api/routers/network_zrok.py`. #### Videos of the real product - **A way in from outside with no server: zrok** (1:07): https://momoto.io/docs/proof/act-03/3.13-zrok/clip.mp4 1. In «Network › Paths», «Enter from outside with zrok». The window says where to get the line of her free account; she pastes it 2. «Turn on» warns first that everything is a little slower this way. She accepts, and Momoto publishes her network on zrok.io 3. There are now three paths at the top: her local network, the relay and zrok. The card counts the places left in her account - **Without the relay, she comes in by zrok** (1:08): https://momoto.io/docs/proof/act-03/3.14e-zrok-carries/clip.mp4 1. Her Momoto is connected to the organization's network. It comes in by the relay, the preferred path 2. We cut her computer off from the relay, as if it had gone down 3. She is still connected, and she did nothing: now she comes in by zrok 4. We take the cut off. Her Momoto goes back to the relay by itself ### Add computer https://momoto.io/docs/#/p/connector/add-computer The Connector lets your own agents work on a computer of yours, such as a laptop with a spreadsheet on it, without opening any port to the internet. You add the computer in your account, download its key file, and join it to the network. The key works once. #### Before you start - Your organization's admin must have the Connector turned on. If it is off, the screen says so and you cannot add a computer. - You can register up to three computers. - The computer itself needs Ziti Desktop Edge, the network client that the screen tells you to install. It is downloaded from the OpenZiti site. #### The steps - In your account, open **My computer**. - Name the computer and press **Add computer**. - Press **Download the key file (.jwt)**. The key works **once** and expires in **3 hours**. Do not share it. - Follow the steps the screen shows for your computer. On Windows you install Ziti Desktop Edge, open it, choose **Add by JWT**, and pick the key file. A green check means the computer is on the network. - Run the two commands the screen shows in an administrator terminal on the computer. The first turns on its SSH server, so Momoto can reach it. The second gives your agents the public key that lets them connect. #### Who can use it Under **Who can use this computer**, you decide whose agents may reach it. In the recorded run the choice was **Only your agents**. Only add people you trust: a person you add can have their agents use the computer. #### What you will notice - The computer appears in **My computer** as connected once the green check shows. Only you see your computers. - Your administrator cannot see your computer, even with all the organization's data in view. #### How it works (technical) `POST /api/v1/me/network/computers` creates the computer for the signed-in person. `POST /api/v1/me/network/computers/{device_id}/key` returns the enrollment key as a file named `computer-.jwt`, with `Cache-Control: no-store`. The key lasts 180 minutes. The adapter keeps at most one live key per identity, and none once the computer has enrolled. Momoto does not write the key to disk or to the log. `PUT /api/v1/me/network/computers/{device_id}/people` sets who else may use the computer; the log records only the number of people. `PUT …/{device_id}/paused` pauses it. Each computer is an identity made in the Ziti network by the reconciler. Ziti Desktop Edge shows it by its network name, not by the name you gave it. #### Videos of the real product - **Connecting your computer** (0:30): https://momoto.io/docs/proof/act-07/7.20a-tomas-adds-his-laptop/clip.mp4 1. In «Your account» he opens «My computer» 2. He names it and presses «Add computer» 3. He downloads the key file. It works once and expires in 3 hours 4. Below, the steps for his computer, and «Only your agents» under who can use it - **Your computer joins the network** (1:56): https://momoto.io/docs/proof/act-07/7.20b-tomas-connects-his-laptop/clip.mp4 1. He opens the Ziti Desktop Edge installer, downloaded from the OpenZiti site 2. Next, Next, Install 3. He opens Ziti Desktop Edge 4. «Add by JWT»: he picks the key file in Downloads 5. His laptop is connected: the green check 6. He opens an administrator terminal 7. He pastes the first command of «My computer»: the SSH server of Windows 8. He pastes the second: his agents' key, the public one ### The administrator reaches nobody's computer https://momoto.io/docs/#/p/connector/admin An administrator can switch the Connector off for the whole organization, and nothing more. No one else's computer is visible to an administrator, even one who is the platform owner. Each member decides which of their own computers reach their agents. #### What an administrator can and cannot do - **See a member's computer**: **No.** It does not appear in **Network**, even with everything of the organization in view. - **Open, enter or use it**: **No.** Momoto does not name, show or open a member's computer to an administrator. Their agents cannot reach it either. - **Revoke it**: **No.** Only the owner can cut off their computer, from their own account. - **Switch the Connector off**: **Yes.** It stops every computer in the organization from serving agents. It takes access away and never gives it, and it tells nothing about any one computer. #### Switching the Connector off (for admins) - Open **Network** and press **⋯**. - Choose **Switch the Connector off…**, read the dialog, and confirm. Cancel if you only wanted to look. While it is off, computers stop serving agents. The computers themselves stay registered to their owners. #### Your own computers (for admins) In your own account, **My computer** holds only the computers you added. An administrator has no view of other people's computers from there either. #### How it works (technical) The switch is `PUT /api/v1/organizations/{organization_id}/network/connector` with `off`, and it needs `NETWORK:UPDATE`. The audit entry is `network_connector_switched` and carries only `{off}`. The screen wraps the call in a step-up for a second factor. Member devices of class `computer` are hidden from every admin entry. `admin_device` in `momoto_core/usecases/_network.py` answers them as `DeviceNotFound`, so the admin's revoke route (`DELETE /api/v1/organizations/{organization_id}/network/devices/{device_id}`) cannot reach one. A computer's own events are kept to its owner; neither the administrator nor the global administrator reads them. #### Videos of the real product - **The administrator reaches nobody's computer** (1:13): https://momoto.io/docs/proof/act-07/7.20e-marisol-cannot-reach-his-computer/clip.mp4 1. In «Network», with everything of the organization in sight, Tomás's computer does not appear 2. Her one control is «⋯» › «Switch the Connector off…», switching it off for the whole organization. She reads it and cancels 3. In her account, «My computer» holds only her own: none 4. She asks her agent to enter Tomás's laptop: it has no computer to enter ### Agent uses computer https://momoto.io/docs/#/p/connector/agent-uses-computer Once a computer is connected, your agents can work on it: read a file, total a spreadsheet, run a command. The agent reaches the computer by its identity on the network, never by an address. You can see in My computer which sessions used it, and when. #### Before you start - The computer must be connected (see [Add computer](https://momoto.io/docs/#/p/connector/add-computer)), and not paused. - The agent must be one that may use the computer. A computer reaches your own agents, and the people you let use it. #### What you will notice - A computer connected while a conversation is open reaches the agent in its **next session**. Restart the agent first, so the session starts with your computer. - In **My computer**, under the computer, **Latest sessions with access** lists which agent used it, who started it, and when. - That list shows that Momoto opened the way to the computer for a session. It does not show what the agent did once there. - The computer opens no port to the internet. The agent reaches it through the network. #### Try it - Open the conversation with your assistant and restart it. - Ask for a figure from a file on your computer, such as the totals of an expenses sheet. - Open **My computer** and check the latest sessions for the computer. #### Sending the result on An agent does not need an address to send what it found anywhere. In the recorded run, the agent sent its totals through a flow that Diego had set up in n8n, which posted them to Slack. The agent makes one request to that flow, and the flow holds the Slack key. #### How it works (technical) Before an agent's session starts, the host calls `POST /api/v1/internal/connections/computers-open` with the service token. The use case returns the computers the agent's owner may use, with the ports the reconciler gives them, and the session's own network for them. Each use is recorded for that computer's owner, with the agent's id and name, who started it and when. Owners read these uses in `GET /api/v1/me/network/computers`. #### Videos of the real product - **Your agent works on your computer** (1:06): https://momoto.io/docs/proof/act-07/7.20c-tomas-agent-reads-his-laptop/clip.mp4 1. He opens the conversation with his assistant and restarts it, so it starts a session that already knows his laptop 2. He asks it for the totals of his expenses spreadsheet, which is on his laptop 3. In «My computer» he sees which session used his laptop, and when - **From a spreadsheet on your computer to Slack** (0:43): https://momoto.io/docs/proof/act-07/7.20d3-tomas-totals-reach-slack/clip.mp4 1. He asks it to send those totals to the sales channel, through Diego's notices flow ### Remove your computer https://momoto.io/docs/#/p/connector/remove-computer Revoking a computer cuts off what it can reach, so your agents can no longer use it. Do this when you stop using a computer, or when you think someone else has its key. Only you can revoke your own computer. #### The steps - In your account, open **My computer**. - Find the computer and press **Revoke**. - Confirm. Momoto says how fast the access was cut. The computer then leaves your list of active computers. #### What you will notice - The computer's access stops within seconds. Momoto reports the time it took. - The confirmation says the revoke is still pending until the network confirms it. - Ziti Desktop Edge stays installed on the computer. Its identity no longer opens anything. #### How it works (technical) `DELETE /api/v1/me/network/devices/{device_id}` revokes a device of the signed-in person. The use case is `RevokeDevice.own` in `momoto_core/usecases/revoke_device.py`: a device that is not the caller's is answered as not found. Before the revoke is written, the SSH keys held for the computer (`computer_key_ref`) are deleted from the vault, so a failed vault delete leaves the computer as it was. The reply reports how long the cut-off took. #### Videos of the real product - **Remove your computer** (0:43): https://momoto.io/docs/proof/act-07/7.20f-tomas-removes-his-computer/clip.mp4 1. In his account, «My computer»: his laptop, connected 2. «Revoke», he confirms, and Momoto says how fast it was cut 3. His list no longer holds it as active ## Anywhere Momoto beyond one machine: servers, backups, upgrades, a warm standby and two hubs with a witness. ### Backup https://momoto.io/docs/#/p/hub/backup A backup is a copy of everything the hub needs to come back: its database, its settings and keys, its agents, its network, and the data each app saved. One command makes it, a second command keeps a copy on another server, and a timer can run it every day. #### Before you start - A **backup key**. It opens every encrypted part of the backup. Make it once and keep a copy outside the hub's computer: without the key, the encrypted parts cannot be opened, not even by Momoto. - The key file is the one named by `MOMOTO_BACKUP_KEY_FILE` if that is set (the file must exist). Otherwise it is `~/.momoto-backup.key`. - Run the backup as whoever runs the hub, from Momoto's folder on the hub's computer. If the hub has never had a key, the encrypted parts are skipped with a warning and the run still ends without an error. Read the warnings after each run. #### What the backup contains - **Database**: Momoto's database: people, roles, agents' records, the store, notices and approvals. - **Vault and agents**: The vault, the agents' sessions and their conversations, and the Executor (the outside tools' store). - **Network and credentials**: The network's state and the credential gateway (OneCLI). Without the gateway the AI connections do not keep working after a restore. - **Config**: The settings and the keys the hub needs to open its own data. - **Apps**: What each hosted app saved, one encrypted file per data volume, plus an index. An app's code is not in the backup. It comes back from Momoto's database. What the app saved, such as a CRM's customers or a workflow tool's flows, lives in its own data volumes, and those are in the backup. The database dump, the vault and the Executor are written as plain archives, not encrypted with the key. The database dump starts with `PGDMP`, so anyone who opens the file can read it. Keep the `backups` folder private. #### Running it The backup stops each app for a few seconds while it copies that app's data, then starts it again. Other parts keep running. Each part writes its own file, and a checksum file sits next to every file. ``` $ ./momoto backup # one encrypted file per app data volume, and their index $ ls -1 backups/apps | grep -v sha256 | tail -12 ``` Each part removes its own files older than `BACKUP_RETENTION_DAYS` days, 7 by default. The copies on the other server are not removed by the backup. #### Keep a copy off the machine (for admins) The backups live on the hub's own disk. If that machine is lost, they go with it. Send a copy to another server with `BACKUP_OFFSITE_DEST` in `.env`. The value is `user@host:/path` over SSH, or a folder that is already mounted on this machine. Then run `./momoto backup` as usual. At the end the copy travels to the other server and is checked there, file by file. - The copy never deletes or overwrites what the other server already holds. - The `.env` file never leaves the hub. - Every file is checked again after it arrives. A file that arrived damaged is sent again on the next run. - The copy holds the database, the agents' sessions and the Executor as they are. Choose a server you trust, and keep its disk private. #### Run it every day with a timer (for admins) A timer runs the backup every day at the hour you choose, so nobody has to remember it. The generator only writes two unit files. It installs nothing, so you install them yourself: ``` $ python3 scripts/backup/generate-systemd-timer.py --out ~/.config/systemd/user --time 02:30 $ systemctl --user daemon-reload && systemctl --user enable --now momoto-backup.timer $ systemctl --user list-timers momoto-backup.timer --no-pager ``` The timer runs when the hour comes, and also at the next boot if the machine was off at that time. Your user's services must keep running when nobody is logged in, so turn linger on for that user. The timer's log is in the service's journal: `journalctl --user -u momoto-backup.service`. If a run fails, the service tries again after 10 minutes. #### A damaged copy is repaired on the next run (for admins) The copy on the other server can be damaged, for example by a disk error or a file changed by hand. The hub does not check the copy between runs. The next run compares every file with its original and sends again any file that differs. The log of that run names the file that arrived bad, and the file is the original again once it is sent. #### How it works (technical) `./momoto backup` runs `make -k backup-all` (`momoto_cli.ops.backup`). The `-k` flag keeps going after a failed part, so one broken part does not stop the others. The parts are `backup-pg`, `backup-vault`, `backup-nanoclaw`, `backup-executor`, `backup-network`, `backup-config`, `backup-onecli`, `backup-apps`, `backup-outside`, and `backup-standby` (only when a standby is set). **Key.** `scripts/backup/lib-crypto.sh`: `backup_key_file` returns `MOMOTO_BACKUP_KEY_FILE`, else `~/.momoto-backup.key`. `require_backup_key` stops a part that needs the key, and never falls back to plain files. **Apps.** `scripts/backup/backup-apps.sh` copies the data volumes of this installation's apps only: the volumes named `-datos` and `-`. For each app it stops the app's containers, copies, and starts them again. The index is written last. Each volume becomes one `.tar.enc`, and the output folder is `backups/apps`. **Offsite.** `scripts/backup/offsite-copy.sh` reads `BACKUP_OFFSITE_DEST`. It uses `rsync -rt` over SSH, and refuses the rsync daemon form. The destination is set to private (`--chmod=D700,F600`). After the transfer it compares sums and re-sends any file that differs. **Timer.** `scripts/backup/generate-systemd-timer.py --out DIR --time HH:MM` writes `momoto-backup.service` (`ExecStart=/usr/bin/env make -k backup-all`, `Restart=on-failure`, `RestartSec=10min`) and `momoto-backup.timer` (`OnCalendar=*-*-* HH:MM:00`, `Persistent=true`). The generator refuses to overwrite the units of another checkout. **Settings.** `MOMOTO_BACKUP_KEY_FILE`, `BACKUP_RETENTION_DAYS` (default 7), `BACKUP_OFFSITE_DEST`, `BACKUP_STANDBY_DEST`. #### Videos of the real product - **The backup before the move: what the apps saved, too** (0:41): https://momoto.io/docs/proof/act-07/7.03-the-backup-before-the-move/clip.mp4 1. The backup opens only with its key. Marisol confirms it exists; a copy lives outside this computer 2. She runs the backup. Every part writes its file; the apps' part stops each app a few seconds while it copies what it saved 3. In «backups/apps» there is one encrypted file per data volume, and their index - **The backup, kept outside the hub too** (0:55): https://momoto.io/docs/proof/act-08/8.06a-the-backup-kept-elsewhere/clip.mp4 1. The hub's backups live on its own disk: if the machine is lost, they go with it. Iván tells it where to send a copy: another server 2. He runs the usual backup. At the end the copy travels to the other server and is checked there, file by file 3. The copy is on the backup server: the same files as on the hub - **The scheduled backup and the repaired copy** (2:11): https://momoto.io/docs/proof/act-08/8.08-the-scheduled-backup-and-the-repaired-copy/clip.mp4 1. Iván does not want to remember to run the backup. He generates the hub's timer, for 14:08, a few minutes ahead so it can be seen to run 2. The generator installs nothing: Iván installs it himself, turns it on and looks at when it is next due 3. The hour comes and the timer starts the backup by itself, with nobody running it 4. The timer has fired, and the service's journal says what it did: the backup ran, and the copy kept elsewhere was checked there 5. One file of the copy: the backup's configuration, momoto-config-20261125T140832Z.tar.enc. Its sum at the hub, the original 6. On the backup server, without the hub knowing, that file is damaged: a few of its bytes are changed. Its sum is no longer the original's 7. The backup runs again, with the timer's own service. At the end it compares every file with its original and finds the damaged one 8. On the backup server, the file is the original again: its sum is the hub's again ### Leaving https://momoto.io/docs/#/p/hub/leaving To leave Momoto's network behind, take the outside doors and the connections down first, then delete the network. Each step is small, but the order matters: deleting the network is refused while a relay or a zrok environment still exists, and it cannot be undone once done. #### The order (for admins) - **Turn off zrok.** In `Network › Paths`, turn zrok off. Momoto warns you that whoever gets in through zrok stops reaching the network. Momoto disables the network's environments on zrok.io. The other ways in stay as they are. - **Delete the relay** from the network's cloud, if the network has one. Deleting the network is refused while a live relay exists. - **Delete each trigger.** In `Integrations`, open each trigger and choose **Delete**, then **Delete for real**. Choose **Better not** to keep it. - **Disconnect Slack.** Disconnect the Slack socket; the app token is deleted. Remove the Slack bot token as well. - **Remove every outside tool** the hub has mounted, from `Integrations`. - **Delete the network.** In `Network`, open **More network actions** and choose **Delete the network…**. Type your account's name exactly as the window shows it, confirm that it is you, and confirm. #### What you should know before deleting (for admins) - Turning zrok off does not remove your zrok.io account. Momoto has no control that does that. Close the account on zrok.io yourself if you want it gone. - Deleting the network is final. Every device loses access, and the unused invitation codes stop working. The screen then offers to create a network again, but the old one cannot be brought back. - The network takes a short while to go away. Its status reads as being deleted until the background work finishes. #### What stays Each person's own Momoto keeps its agents and chats as an individual install. Deleting the organization's network does not delete them. #### How it works (technical) **Zrok.** `DELETE /api/v1/organizations/{organization_id}/network/zrok` turns zrok off, and it needs permission to change the network. The zrok environments are disabled on zrok.io; the account is not touched. **Network.** `DELETE /api/v1/organizations/{organization_id}/network` takes the body `confirmation`, the account's name. It needs `NETWORK:DELETE`. In order, the use case: - Returns at once if the network is already being deleted. - Compares `confirmation` with the account's name, exactly. A different name stops it with the message «To delete the network, type your account name exactly as it appears.» - Refuses with a conflict while a live relay exists («First delete the relay from your network's cloud.») or while any zrok environment exists («First turn off zrok in your network.»). - Deletes the network's accounts' credentials and paths, moves the network to `deleting`, and records a `network_deleted` event. The reconciler finishes the teardown. **Triggers and Slack.** `DELETE /api/v1/integrations/triggers/{trigger_id}` deletes a trigger; `DELETE /api/v1/integrations/triggers/slack/socket` stops the Slack socket worker and deletes its app token; `DELETE /api/v1/integrations/triggers/slack/bot` deletes the bot token. #### Videos of the real product - **Leaving nothing behind: zrok, triggers and outside tools** (2:17): https://momoto.io/docs/proof/act-10/10.05a-zrok-triggers-and-tools-off/clip.mp4 1. In «Network › Paths», «Turn off» zrok: Momoto warns that whoever gets in through zrok stops reaching it 2. In «Integrations», she deletes each trigger: «Delete» and «Borrar de verdad» 3. She disconnects the Slack socket: the app token is deleted 4. She removes every outside tool the hub has mounted - **Leaving nothing behind: deleting the network** (0:48): https://momoto.io/docs/proof/act-10/10.05g-the-network-is-deleted/clip.mp4 1. In «Network», the menu «More network actions» offers «Delete the network…» 2. She types her account's name, as the window asks, and confirms it is her 3. The network is gone: the screen offers to create one again ### Move to another machine https://momoto.io/docs/#/p/hub/move-to-another-machine You can move a whole hub to another machine, such as a cloud server. You take a backup, turn the old hub off, and restore the backup on the new machine. The people who use the hub keep their accounts, agents and connections, and nobody scans or enrolls again. #### Before you start - A **backup** of the old hub, made with `./momoto backup`, and its **backup key**. Keep a copy of the key outside both machines. - The new machine with Momoto installed and its network turned on, the way the old hub had it. The install guide covers the first part; the restore guide covers the network. - Only one hub may be running with the same name. Two hubs would fight over the same members, so the old hub goes off first. #### What comes along and what does not The restore brings back the database with the people and their roles, the vaults, the agents with their conversations, the network (so each member's Momoto reconnects by itself), the credential gateway (so the AI connections keep working), and what each hosted app saved. It does not bring back the machine's own settings: its name with HTTPS, its email server, its switches, its engines, or where its backups are copied. The restore ends with a note for each one the old hub had. Read them and set each one again. The restore guide lists them. Anything saved after the last backup is not in the copy. Back up just before the move. #### What you will notice - Each member's Momoto finds the hub again by itself. Nobody is invited or enrolled again. - An address that pointed at the old machine stops working. A name that is pointed at the new machine keeps working. - Until the hub has its own HTTPS name, its web is published only on the server itself. Someone can reach it through an SSH tunnel to that server, as the recorded run did. The guide [Marisol works from a browser](https://momoto.io/docs/#/p/hub/web-only) covers the name. #### The order (for admins) - Turn the old hub off. Stop its agent service and its containers, so nothing answers for the hub's name. - Copy the backup folder and the key to the new machine. - On the new machine, run the restore. It checks the whole backup before it changes anything, then stops the services, puts the data back and starts them again. - Check the status and sign in as a member. The restore asks for confirmation. It needs `--yes`, or the variable `CONFIRM_RESTORE_HUB` set to the project name, or the project name typed at the prompt. #### How it works (technical) `./momoto hub restore [--yes] [--allow-older] [--accept-unauthenticated] [--keep-reconciler-off] [--skip-onecli] ` runs `scripts/backup/restore-hub.sh`. The CLI command is `hub-restore`. **Checks before anything changes.** Each required part must be present: the database, the vault, the sessions database, the config, and the network and OneCLI parts when present. Every file's sum must match. Encrypted parts must open with the key. No part may be older than the newest set this machine has recorded in `backups/.newest-seen`. An older set is refused unless `--allow-older` is given on purpose. The network part needs the `network-ctrl` service on this machine. The OneCLI part needs OneCLI on this machine unless `--skip-onecli` is given. **Settings carried over.** The restore writes the hub's keys from the backup into this machine's `.env`: `MOMOTO_SECRETS_KEY`, `MOMOTO_MFA_SECRET_KEY`, `MOMOTO_SIGNING_SECRET_KEY`, `JWT_SECRET`, `MOMOTO_NETWORK_SITE` and `MOMOTO_SSO_SESSION_SECRET`. The network mode follows the restored data. Anything the machine must set again is listed in the closing notes, not guessed. **Order.** The reconciler of the network is held off during the restore and turned on again once the controller reports healthy; `--keep-reconciler-off` leaves it off. Then the restore starts the services and waits up to 240 seconds for the setup status to say the hub is set up. #### Videos of the real product - **The move: the hub goes to the cloud server** (1:21): https://momoto.io/docs/proof/act-07/7.04-the-move/clip.mp4 1. First the office hub is turned off: two hubs with the same name would fight over the same members 2. The backup and its key travel to the server 3. On the server, one command restores everything. Before touching anything it checks the whole backup 4. The new hub answers, with the same people in it - **Nobody scans again: every Momoto finds the new hub** (0:38): https://momoto.io/docs/proof/act-07/7.05-nobody-scans-again/clip.mp4 1. The hub now lives on the server. On Lucía's Momoto the «the hub is not connected» notice went away by itself 2. The store has the same apps as before. She opens the CRM: it answers from the new hub, through the network - **Everything came along: people, agents, apps with their data, and memory** (0:59): https://momoto.io/docs/proof/act-07/7.06a-everything-came-along/clip.mp4 1. Marisol signs in to the new hub with her same password and second factor. «People» has the same people, with their roles 2. Her agents and their conversations are where she left them. She writes to the coordinator and it answers: the AI is still connected 3. The store has every app 4. And «Memory» still has the notes and decisions of every project - **The CRM kept its data: customers and deals on the new hub** (0:26): https://momoto.io/docs/proof/act-07/7.06b-the-crm-kept-its-data/clip.mp4 1. Lucía opens the CRM from her store. It now answers from the cloud server, and her customers are still there 2. And the deals board has the ones she opened by hand ### The agent prepares the server: it installs Momoto and turns its network on https://momoto.io/docs/#/p/hub/prepare-a-server-with-an-agent An agent can prepare a server for you: it runs the Momoto installer over the project's SSH connection, installs what the installer names, and turns the server's network on. This guide sets the agent up for that job and explains which settings change what it is allowed to do. #### Before you start - A server the hub can reach over SSH, and an **SSH connection** in the agent's project with its private key stored in the vault. Only active SSH connections are loaded. - The agent never sees the key. When the agent starts, the host loads the key into an SSH agent and the agent only gets the socket. - To change an agent's model chain or daily cap you need permission to change models or budgets (Ops or Admin for the model chain). If the agent has an owner, only the owner can change these settings. #### The three settings - **Model chain**: In «Customize» › «Model chain». One model and, if you want, one fallback. Both must be Claude models from the same provider. A model from another provider is refused: create another agent for it. - **Daily spending cap**: In US dollars per day. `0` means no cap. A Bedrock agent must keep a cap above 0. - **Security**: «Allowed domains» and «Chat internet exit». «Open» is the usual setting. «Only the list» limits the agent's chat session to the domains in the list. That option is offered only when the daemon has measured that it can enforce it. Without it, the list limits only the swarms the agent launches, and its chat goes out to the internet without restriction. The Security section has its own «Save» button. Save it before you leave the section, because closing with unsaved changes asks you first. #### When a change takes effect The agent reads its settings when it starts a new response to one of your messages. That means a new conversation, or a restart of the agent. A response already in progress keeps the old settings. On the server, the agent runs the installer, installs what the installer names, and runs it again. The image the agents run in is built during the install. That is the long wait, and it happens once. The installer never installs system packages on its own. #### How it works (technical) **The SSH key.** When an agent starts, the host calls the internal route `POST /api/v1/internal/connections/ssh-open` (`momoto_api.routers.connections_internal.ssh_open`). It returns the keys of the project's *active* `ssh` connections, read from the vault. If a connection's key is missing from the vault, the route answers 404 with `ssh_key_missing`, and the agent starts without an SSH agent. The keys go to the host only; the agent's container sees `SSH_AUTH_SOCK`. **The model chain.** `PATCH /api/v1/agents/{agent_id}/model-chain` (`momoto_api.routers.model_chain:patch_agent_model_chain`) takes `{"steps": [{"model_id": "..."}]}`. It refuses any field other than `steps` (400, with the field name), more than two steps, a model not in the catalog, a fallback from another provider or a duplicate of the primary, and a change of provider for the agent (409 `provider_change_not_allowed`). The route checks `MODELS:UPDATE` in the agent's own organization and then that the caller owns the agent. **The daily cap.** `PATCH /api/v1/agents/{agent_id}/budget` (`momoto_api.routers.agents:update_agent_budget`) takes `budget_daily_usd`. It needs `BUDGETS:UPDATE` in the agent's organization, and the caller must own the agent. A Bedrock agent with 0 is refused with 422. **The Security section.** It saves in one call, `PUT /api/v1/agents/{agent_id}/security` (`momoto_api.routers.customize_v2:put_agent_security`). The chat exit choice is `egress_chat`. The GET reports whether «Only the list» is available (`egress_chat_available`). #### Videos of the real product - **The agent prepares the server: it installs Momoto and turns its network on** (2:44): https://momoto.io/docs/proof/act-07/7.02-the-agent-prepares-the-server/clip.mp4 1. For this job Iván raises «Infra» to Sonnet, in «Customize › Model chain» 2. He raises its daily cap: installing a server is more work than a normal day 3. And in «Security» he lets its container out only to that server. He restarts the agent so it takes it 4. He asks it to install Momoto on the server. The agent runs the installer, installs what it names and runs it again 5. Then, to turn its network on and tell him the state ### Restore on a new machine https://momoto.io/docs/#/p/hub/restore-on-a-new-machine If the hub's machine is lost, the hub comes back from a copy kept on another server. You install Momoto on a new machine, bring the copy and the backup key to it, and restore. What was saved after the last copy is lost, so the copy is only as recent as the last backup. #### What you lose Everything the hub saved after its last backup exists only on the hub's disk, so it goes with the machine. In the recorded run, a deal opened after the last backup was not in the restored hub. Everything saved before that backup came back. Nothing tells the people using the hub when the last backup ran. Run backups often, with the timer, and keep the copy off the machine. #### Before you start (for admins) - A new machine that meets the install guide's requirements, with the system packages the installer names. - The hub's fixed address moved to the new machine, so the DNS records already point at it. - The backup server that holds the copy allows the new machine's SSH key. - The backup key. It did not travel with the copy. Whoever keeps it sends it to the new machine. #### The steps (for admins) - **Install Momoto** on the new machine with the usual installer, as on any new machine. - **Turn the network on** the way the hub had it: its site, and its own-server mode. `./momoto network site` shows the site; `./momoto network mode public --turn-on` turns on the network in that mode. - **Bring the copy back** from the backup server into the folder `backups/`. The copy must be whole; a partial copy is refused. - **Send the backup key** to the new machine and put it where the backup looks for it. - **Restore** with `./momoto hub restore --yes backups`. It checks the whole copy first. - **Check** with `./momoto status`. #### The notes the restore leaves (for admins) The restore carries the hub's data and the keys that open it. The settings of the machine itself are a choice of whoever runs it, so the restore ends with a note for each one the old hub had and this machine does not. Set each one again: - **The name with HTTPS**: `./momoto https on --apps`, the same as on the old hub. - **Email**: The mail settings (`MOMOTO_SMTP_*`). The old hub sent its invitations and notices to the test mailbox. - **Apps with their own image**: `MOMOTO_APPS_DOCKERFILE`, if the old hub built apps from their own image. - **Backups copied elsewhere**: `BACKUP_OFFSITE_DEST`, so the new hub keeps sending its copy. - **Search by meaning**: The embeddings engine and its model: `MOMOTO_EMBEDDING_BACKEND` and `MOMOTO_EMBEDDER_URL`, with the embedder container running. - **Outside tools**: The Executor's token came back with the backup. Start the Executor and give Momoto its addresses on this machine. - **The Connector**: So each person's agent can use their own computer: the hub's public name (`MOMOTO_NETWORK_PUBLIC_HOST`) and the Connector's compose file. Then one start recreates whatever changed. The hub answers by its name again, with a new certificate. #### Check it is whole (for admins) - The hub answers at its name over HTTPS. - A test email reaches the mailbox: `admin test-email` with a person's address. - Run `./momoto backup` once. Its copy leaves the machine again and is checked there. #### What the members notice Nobody has to do anything on their own computers. Each Momoto keeps trying the hub by the ways it already had, and the restored hub is the same hub to the network, so nobody scans or enrolls again. Their stores, agents and conversations are where they left them, except for what was saved after the last backup. #### How it works (technical) `restore-hub.sh` (run by `./momoto hub restore`) makes the checks described in the move guide before it changes anything. A partial copy, a sum that does not match, a part that does not open with the key, or an older set than the one this machine has recorded, stops the restore. Then it writes the hub's keys into `.env`, restores each part, and starts the services. The closing notes are printed by the script itself. Each note names the setting the old hub had and the variable or command that sets it on this machine. The copy to the backup server is sent by `scripts/backup/offsite-copy.sh`, with `BACKUP_OFFSITE_DEST`. Copy the backup back with `rsync -rt --chmod=D700,F600` so the folder keeps the private permissions. #### Videos of the real product - **A new deal after the backup** (0:29): https://momoto.io/docs/proof/act-08/8.06b-a-deal-after-the-backup/clip.mp4 1. Lucía goes on with her day: she opens her CRM from the store and goes to the deals board 2. She opens a new deal: «Tueste para cafetería nueva · 06:18». No backup has it yet - **The hub's machine is lost for good** (1:47): https://momoto.io/docs/proof/act-08/8.06c-the-hubs-machine-is-gone/clip.mp4 1. The hub's machine no longer exists: the cloud destroyed it with its disk and the backups it kept. Iván has a new machine with Momoto downloaded, and runs the usual installer 2. He turns its network on, as the hub had it: its site and the own-server mode 3. He brings back the copy from the backup server: the one the hub sent there before it was lost 4. The backup key did not travel with the copy: Marisol keeps it on her computer, apart. She sends it to the new machine 5. One command restores the whole hub. Before touching anything it checks the whole copy 6. The hub answers again, now on the new machine - **What the restore does not bring** (2:47): https://momoto.io/docs/proof/act-08/8.06d-what-the-restore-did-not-bring/clip.mp4 1. The restore ended with notes: what the old hub had and this machine does not. First its name with HTTPS, the same command as in clip 7.08 2. Email: the old hub sent its invitations and notices to the test mailbox. Iván writes those lines again 3. Apps that bring their own image, and the copy of the backups on the backup server 4. Searching by meaning: the embeddings engine with its model, as in clip 2.18 5. The outside tools: their token came back with the backup; Iván starts the Executor and gives Momoto its addresses on this machine 6. The Connector, which lets each person give their agent their own computer: the hub's public name and its compose file 7. One start recreates what changed. The hub answers by its name again, with a new certificate 8. A test email goes out and reaches the mailbox 9. And the backup leaves its copy off the machine again, checked there - **The members come back by themselves, and the new deal is gone** (0:44): https://momoto.io/docs/proof/act-08/8.06e-the-members-return-and-the-deal-is-gone/clip.mp4 1. The hub is back, on a new machine. On Lucía's Momoto there is no notice: it found the hub by itself, with nobody scanning anything 2. She opens her CRM from the store and goes to the deals board 3. The deal she opened after the last backup, «Tueste para cafetería nueva · 06:18», is gone: the copy did not have it. Everything else in the CRM is there ### Two hubs https://momoto.io/docs/#/p/hub/two-hubs Two hubs can serve one organization. One is active and serves the members; the other keeps a current copy of the database and can take over. A third controller, the witness, votes on which one leads. This guide describes the arrangement of the recorded run, what each hub keeps when the other goes down, and how the active hub is handed back. #### What runs where - **Hub A**: The active hub. It writes to the database and holds the network's leader lock, so its network serves the members. - **Hub B**: A whole Momoto, running and waiting. It receives every change to the database, and it holds the agents' sessions that hub A copies to it. - **Witness**: A third machine with a network controller and the database monitor. It decides which database is the primary, and it votes on the network's leader. Each person's own computer keeps its agents and its own AI. Those never depended on either hub. #### When hub A goes down In the recorded run, a new network leader took 13 to 15 seconds and the database about 22 seconds. The hub's web name is a DNS record, so browsers follow the change only when the record's lifetime runs out (300 seconds in the run). **What continues on hub B:** - The store, the notices and the approvals, which are in the database. - Each person's account, password and second factor, and their agents and conversations, as of the last copy of the sessions. **What waits for hub A:** - The apps hosted at the hub. They run on hub A's machine and are not started on hub B until it comes back. **What is lost or must be done again:** - What an agent did after the last copy of the sessions stays on hub A. - The AI keys. Each hub keeps them in its own credential gateway, which the database does not carry. The first time a person reaches hub B, it asks her to connect her AI again. - The outside tools connected through hub A's Executor. Hub B runs its own Executor, which does not know those connections. #### Taking over on hub B (for admins) When hub A is really off, bring hub B's sessions up to date with what hub A last copied. Momoto refuses to adopt while hub A still answers: ``` $ ./momoto hub adopt hub-a --peer-url http://172.31.4.218 $ ./momoto status ``` Then move the hub's web name to hub B in DNS. Momoto does not move it. #### When hub A comes back (for admins) Hub A rejoins the network as a follower, and its database comes back as a copy of hub B's. Hub B keeps the lead. Nothing moves back by itself. Hub A's agent service starts with its machine. The recorded run's guide asks you to close, on hub A, the sessions that hub B adopted before that service starts. A machine that comes back on its own gives no such moment, so check the agent service on hub A before you let agents run there. Going back to hub A is a planned move. Use a switchover of the database, then hand the network's leadership to hub A: ``` $ docker exec postgres-ha-pg-monitor-1 pg_autoctl perform switchover --pgdata /var/lib/postgresql/data/pgdata $ scripts/network-ha.sh transfer-leadership ctrl1 $ scripts/network-ha.sh status ``` Writes fail for the moment of the switchover. Then the name goes back to hub A's address, and browsers follow when their copy of the record expires. **Not covered:** what hub B's agents did while it served is kept in hub B's sessions. The procedure does not bring those back to hub A, so an agent's conversation from that time may not be there on hub A. #### Keeping hub B current (for admins) Hub B needs a copy of the sessions to take over with. Send one by hand with `./momoto hub sessions-sync`. The copy goes only from the active hub, and only when `HUB_PEER_DEST` names hub B. Each copy replaces the previous one on hub B. #### How it works (technical) **Network.** `scripts/network-ha.sh` has three commands: `status` lists the controllers and the leader, `transfer-leadership ` hands the lead to another controller, and `remove`. Read the cluster list on the leader: a follower does not hold a channel to the other follower. **Database.** The primary and the copy are managed by `pg_autoctl` in the monitor container. `pg_autoctl show state` reports the roles, and `pg_autoctl perform switchover` makes the planned move. **Sessions.** `scripts/backup/sessions-sync.sh` (`./momoto hub sessions-sync`) runs only when `HUB_PEER_DEST` is set, and only on the active leader. It copies the sessions to the peer, encrypted, and replaces the previous copy there. **Adopting.** `scripts/backup/adopt-sessions.sh` (`./momoto hub adopt --peer-url URL`) first asks the peer's API whether it answers. It refuses to adopt while the old hub still answers. `--force` skips that check; do not use it unless you are certain the old hub is off. `--dry-run` shows what would change. The adoption merges the users' data without overwriting what is already there, replaces the Executor's data when the copy carries it, and restarts the API. Both hubs must share the same `MOMOTO_SECRETS_KEY` and the same Executor organization token. #### Videos of the real product - **Two hubs and a witness** (1:34): https://momoto.io/docs/proof/act-09/9.01-two-hubs-and-a-witness/clip.mp4 1. The database lives on both hubs: hub A writes and hub B copies every change. The monitor, on the witness, decides which one leads 2. Iván sees the network's three controllers: hub A (ctrl1), hub B (hub2) and the witness. All three vote and one leads 3. So that the test is the worst case, Iván hands the leadership to hub A: when it goes off, the network will have to elect another 4. On hub A everything is running 5. Every few minutes hub A sends hub B an encrypted copy of its agents' sessions. Iván sends one now, by hand 6. Hub B is a whole Momoto, running and waiting - **The first hub goes down** (2:06): https://momoto.io/docs/proof/act-09/9.02a-the-first-hub-goes-down/clip.mp4 1. Before the cut: hub A (ctrl1) leads the network 2. Hub A loses its power. The two controllers left elect another leader 3. The monitor sees hub A's database is not answering and makes hub B's copy the primary 4. With hub A really off, Iván tells hub B to adopt the sessions hub A copied to it. Before touching anything it checks that hub A does not answer 5. Hub B is running - **The same address answers from hub B** (0:19): https://momoto.io/docs/proof/act-09/9.02b-the-same-address-answers-from-hub-b/clip.mp4 1. Hub A is still off. Marisol opens the same address as always, and it answers 2. Her session lapsed while she was not using it: she signs in with her password and her code, as any day - **With hub B: what continues and what waits for Lucía** (1:23): https://momoto.io/docs/proof/act-09/9.03a-what-continues-for-lucia/clip.mp4 1. The store comes from the hub, which is now hub B: it loads as always 2. She opens her CRM, which runs on hub A's machine 3. The CRM does not open: it waits for hub A to come back 4. Her agent keeps working: it runs on her computer, with her own AI - **With hub B: what continues and what waits for Marisol** (2:02): https://momoto.io/docs/proof/act-09/9.03b-what-continues-for-marisol/clip.mp4 1. Her coordinator is there, with the conversation it had on hub A 2. The chat tells her her AI is not on hub B: each hub keeps keys in its own gateway 3. And it answers her, now from hub B 4. Her outside tools wait: the connection was made with hub A's Executor, and hub B runs its own 5. She opens her Sales Board, which runs on hub A's machine 6. Sales Board does not open: it waits for hub A to come back - **Hub A comes back** (1:15): https://momoto.io/docs/proof/act-09/9.04a-hub-a-comes-back/clip.mp4 1. Hub A is still off: of the three controllers, two are connected 2. Iván turns hub A's machine on. Its controller rejoins the network, now as a follower 3. Its database comes back as a copy of hub B's, which keeps leading 4. On hub A, Momoto is running again 5. Iván checks hub A's agent service - **Back to hub A** (1:16): https://momoto.io/docs/proof/act-09/9.04b-back-to-hub-a/clip.mp4 1. Hub B leads and hub A is its copy 2. Iván asks the monitor for a planned switch: hub A's database becomes the primary again 3. And hands the network's leadership back to hub A 4. The hub's name goes back to hub A's address - **Back on hub A: what came back for Marisol** (1:02): https://momoto.io/docs/proof/act-09/9.04c-what-came-back-for-marisol/clip.mp4 1. The same address, now from hub A again 2. She opens her coordinator and looks for what she asked it on hub B 3. She asks it what it answered her - **Everything still works · Marisol** (1:05): https://momoto.io/docs/proof/act-10/10.01a-everything-works-marisol/clip.mp4 1. Her coordinator answers: a simple sum, in one line 2. From the hub's web she opens «Dashboard»: the hub reaches it through the network with her identity 3. In «Share» she clears «Can use it» for Iván. It is a sensitive action: Momoto asks her to confirm it is her 4. She gives it back: the rest of the closing reads the story as it ended - **Everything still works · Lucía** (0:51): https://momoto.io/docs/proof/act-10/10.01b-everything-works-lucia/clip.mp4 1. Lucía opens her CRM from her computer's store: it arrives through the organization's network 2. She opens a new deal in «proposed»: «Test close · 14:35» 3. She moves it to «Won». The CRM tells n8n through the network, and n8n posts it in Slack 4. In «Memory», she corrects the suppliers note once more: it is written at the hub - **Everything still works · a change lands** (1:20): https://momoto.io/docs/proof/act-10/10.01c-everything-works-a-change-lands/clip.mp4 1. Lucía asks «CRM · Frontend» for a line at the foot of «Dashboard» 2. On the page of «Dashboard», the newest change is her agent's ### Warm standby https://momoto.io/docs/#/p/hub/warm-standby A warm standby is a second machine that holds a copy of the hub, ready to become the hub. After each backup the hub sends it an encrypted set, and the standby keeps the newest ones. If the hub is lost, the standby is promoted, and it refuses to go back to an older set by mistake. #### What the standby holds The standby cannot read what it receives. The database, the vault, the agents' sessions and the Executor are encrypted with the backup key before they leave the hub. Each set is a group of files plus a sealed list of the set's files, sent last. A set is complete only when that list has arrived, so a set that stopped halfway is never used. The standby keeps the newest 5 complete sets by default (`BACKUP_STANDBY_KEEP`) and removes older ones with a cleanup the hub runs on it over SSH. #### Before you start (for admins) - A second machine with Momoto installed and its network set up as the hub has it. - The hub's SSH key allowed on the standby, so the hub can send files and run the cleanup there. - The backup key, copied **once, by hand**, from the place where its keeper has it. The hub does not send the key, so the standby needs it only on the day it is promoted. #### Setting it up on the hub (for admins) In the hub's `.env` give the standby's address and the cleanup command: - `BACKUP_STANDBY_DEST`: where the sets go, as `user@host:/path`. - `BACKUP_STANDBY_PRUNE_CMD`: the command the hub runs on the standby after each send, to remove old sets. - `BACKUP_STANDBY_KEEP`: how many complete sets to keep. The default is 5. Then `./momoto backup` sends a set at the end of each run and checks every file there. If the cleanup fails, the hub reports it; the failure does not undo the set that was sent. #### Becoming the hub (for admins) Promote the standby only when the old hub is off for good. Two hubs with the same name would fight over the same members. Turn the old hub off first, then move the hub's fixed address to the standby in your cloud console. Momoto does not move that address; the DNS records must already point at it. ``` $ ./momoto hub promote --yes $ ./momoto status ``` Promotion opens the newest complete set with the key, checks all of it before it changes anything, and restores it the same way the move guide does. The temporary folder it decrypts into is deleted when it finishes. #### An older set is refused (for admins) The standby remembers the newest set it has seen. If a promotion would bring back an older set, the promotion stops before it opens anything. That protects you when the latest copy did not arrive: promoting then would take the hub back in time. Use `--allow-older` only when you have decided on purpose to go back to an older set. #### How it works (technical) **Sending.** `scripts/backup/standby-sync.sh` (run as the `backup-standby` part, or `./momoto hub standby-sync`) encrypts the files that would otherwise be readable, the database dump, the vault, the sessions database and the Executor, into an outbox. Files already encrypted go as they are. The sealed set manifest is sent last. Then `BACKUP_STANDBY_PRUNE_CMD` runs on the standby; a failure there only warns. **The inbox.** On the standby, `scripts/backup/standby-inbox.sh [--keep N] [--dry-run] [--allow-older]` keeps the newest N complete, authenticated sets (`BACKUP_STANDBY_KEEP`, default 5). It records the newest set it saw in `backups/.newest-seen`, a plain file on the standby that nothing sends. It refuses to prune when the newest set is older than that record, unless `--allow-older` is given. **Promotion.** `scripts/backup/standby-promote.sh` (the CLI command is `hub-promote`) picks the newest complete set, compares it with the record in `backups/.newest-seen`, and refuses an older one unless `--allow-older`. It decrypts into `backups/.promote.`, a private staging folder that is deleted when the script exits, and then runs `restore-hub.sh` on it. Older staging folders left by a run that died are removed first. #### Videos of the real product - **A standby that waits** (1:52): https://momoto.io/docs/proof/act-08/8.07a-a-standby-that-waits/clip.mp4 1. The standby cannot read what it receives, but it needs the key to open it the day it is needed. Marisol, who keeps it, sends it once 2. At the hub, Iván tells it where the standby is and how to tidy its inbox: the hub runs that command over SSH 3. He runs the usual backup. At the end it encrypts the set with the key, sends it to the standby and checks every file there 4. What the hub said when it sent to the standby: how many encrypted files left, and the inbox cleanup that ran there over SSH 5. For comparison: the database backup at the hub starts with «PGDMP», readable by anyone who opens the file 6. On the standby, the inbox has the whole set, and every file is password-encrypted data: none can be read 7. Searching the whole inbox for «PGDMP» finds nothing: the database, the vault and the agents are not in the clear - **An older set is refused** (1:34): https://momoto.io/docs/proof/act-08/8.07b-an-older-set-is-refused/clip.mp4 1. A night goes by and the hub's backup runs again: it sends its new set to the standby 2. The standby has two whole sets: last night's and the new one, each with its sealed list 3. To see what happens if the last one had not arrived, Iván sets the newest set aside by hand, as if it had not arrived 4. Iván asks the standby to become the hub. It refuses: it has already seen a newer set, and going back to the older one would take the hub back in time. It touches nothing 5. Nothing changed on the standby: its settings file and its services are the same - **The standby becomes the hub** (1:13): https://momoto.io/docs/proof/act-08/8.07c-the-standby-becomes-the-hub/clip.mp4 1. With the old hub off, and not before, Iván tells the standby to become the hub. It opens the newest set it holds with the key, checks all of it before touching anything, and restores 2. The hub answers again, now on what was the standby 3. By its name, momoto-quetzal.hacedores.win, it answers with a valid certificate, issued on the first try 4. Nobody touches the members' computers: each Momoto retries by the ways it already had and finds the hub by itself. Nobody scans or enrols again ### Marisol works from a browser https://momoto.io/docs/#/p/hub/web-only Someone who only uses Momoto in a browser needs no program on her computer. The hub has its own HTTPS address, and she signs in there with the same account and second factor she had before. #### Before you start - An account on the hub with her email and password, and her authenticator app with the code it already gives her. - The hub's HTTPS address, such as `momoto-quetzal.hacedores.win`. Someone who runs the hub must set it up (see below). - Nothing to install on her computer. Any modern browser works. #### Signing in Open the hub's address. Enter her usual email and password. Momoto then asks for the code from her authenticator app, the same second factor as before. Her agents, their conversations and her memory are as she left them. The store works from the browser too. Its apps open from the hub's web when the hub was set up with its apps (see below). #### Turning on the hub's HTTPS address (for admins) Point the name's DNS record at the hub, then run on the hub's machine: ``` $ ./momoto https on momoto-quetzal.hacedores.win # add --apps to open the store's apps as their own addresses under the hub's name $ ./momoto https on momoto-quetzal.hacedores.win --apps $ ./momoto https status ``` The apps' addresses need the network turned on. Without `--apps`, only the hub's own web is published under the name, and running `on` again without it takes the apps' addresses away. `./momoto https off` takes the name down. #### How it works (technical) `./momoto https` passes its arguments to `scripts/https.sh`, which accepts `on [--apps]`, `off` and `status`. - `on ` sets `MOMOTO_PUBLIC_HOST` and `MOMOTO_PUBLIC_URL=https://`, and adds `docker-compose.https.yml` to `COMPOSE_FILE`. That file runs Caddy as the HTTPS proxy. - `--apps` sets `MOMOTO_APPS_WEB_HOST` and adds `docker-compose.https-apps.yml`, so each app opens at `https://./` for people signed in on the hub's web. It refuses to run unless `docker-compose.network.yml` is already in `COMPOSE_FILE`. - If `COMPOSE_FILE` is written in a form the script cannot read with certainty, it refuses and changes nothing. #### Videos of the real product - **Marisol works from a browser** (1:00): https://momoto.io/docs/proof/act-07/7.09-marisol-from-a-browser/clip.mp4 1. On a computer with no Momoto on it, she opens the browser at the hub's address 2. Her usual email and password 3. Momoto asks for the code from her authenticator app, the same second factor as before 4. Her agents are as she left them 5. And so is her conversation with the coordinator. She writes to it, and it answers through the new address ### The hub gets its own name, with HTTPS https://momoto.io/docs/#/p/operations/https One command gives the hub its own name and turns on HTTPS, with a certificate issued and renewed automatically. It can also give the apps of the store addresses under the same name. Until you run it, the web app opens only on the server itself. #### Before you start (for admins) - Create a DNS record for the name, and another for `*.` plus the name, both pointing at the server. - Open ports 80 and 443. Port 80 is how the certificate is issued and renewed. - Check the current state first with `./momoto https status`. #### Turning it on (for admins) ``` $ ./momoto https status $ ./momoto https on momoto-quetzal.hacedores.win --apps $ docker compose up -d momoto-https momoto-api momoto-network-agents ``` The proxy starts and asks for its certificate by itself. The API and the agents' gateway start again to read the new name. Then the hub answers at its name with a valid certificate, and plain `http` redirects to `https`. **About `--apps`:** it gives the apps of the store addresses under the name, and it needs the Momoto network to be on. An app's name gets its certificate only after someone signed in opens that app from the store. Any other name gets none. #### Checking it (for admins) From any browser, the hub's address is now its own name, and it opens Momoto's sign-in. You can check the certificate from a terminal: ``` $ curl -sI https://momoto-quetzal.hacedores.win/ | head -1 $ curl -sI http://momoto-quetzal.hacedores.win/ | grep -iE '^(HTTP|location)' $ openssl s_client -connect momoto-quetzal.hacedores.win:443 -servername momoto-quetzal.hacedores.win /dev/null | openssl x509 -noout -subject -issuer -enddate ``` #### How it works (technical) `scripts/https.sh` handles `on [--apps]`, `off` and `status`. It writes the name into `.env` and changes no other setting. With `--apps` it refuses unless the network is on. The proxy is the `momoto-https` service, which reads `deploy/https/Caddyfile`. For apps it uses `deploy/https/Caddyfile.apps`, with on-demand certificates. Before it issues one, it asks `momoto-network-agents` on port 8480 at `/_momoto/tls?domain=`. The gate answers yes only for `.`, and only when a ticket for that app was admitted since the gate started. Any other name gets a 404. #### Videos of the real product - **The hub gets its own name, with HTTPS** (1:12): https://momoto.io/docs/proof/act-07/7.08-the-hubs-own-address/clip.mp4 1. Until now the hub's web opened only on the server itself. One command gives it its name, and the store's apps go under the same name 2. The proxy starts and asks for its certificate by itself; the API and the agents' gateway start again to read the name 3. The hub answers by its name, with a valid certificate; whoever comes by http is sent to https 4. From any browser the address is now the hub's own: it opens Momoto's sign-in ### The outside tools, at the new hub https://momoto.io/docs/#/p/operations/hub-move When you move the hub to a new computer, the restore brings back the outside tools' data and their organization token. It does not bring back their addresses, because those belong to the old machine. This page covers starting the Executor again and pointing Momoto at it. #### After the restore (for admins) - Your organization's token for the Executor comes back with the backup. The addresses do not, since they were this machine's own ports on the old computer. - The restore's final note says how to start the Executor on the new machine. Run that first. - Then give Momoto the Executor's addresses on this machine and restart the API. When it is done, open **More › Integrations**. The outside tools you mounted before the move are listed again as mounted. #### Starting the Executor (for admins) ``` $ docker compose --profile integrations up -d executor executor-callback-proxy $ docker compose --profile integrations ps executor --format "table {{.Service}}\t{{.Status}}" ``` Then set the three addresses in `.env`, using this machine's address on the Docker bridge, and restart the API: ``` # in .env: the Executor's API, its MCP endpoint, and the proxy that calls back into Momoto MOMOTO_EXECUTOR_API_URL=http://172.17.0.1:4400 MOMOTO_EXECUTOR_MCP_URL=http://172.17.0.1:4400/mcp MOMOTO_EXECUTOR_PROXY_URL=http://172.17.0.1:8020/api/v1/integrations/mcp $ docker compose up -d momoto-api ``` The values above are the ones from the recorded run. Use the addresses of your own machine. #### How it works (technical) `scripts/restore-hub.sh` restores the Executor's volume and the values that identify its organization: `MOMOTO_EXECUTOR_ORG_TOKEN`, the organization, and the session e-mail and password. It deliberately leaves out `MOMOTO_EXECUTOR_API_URL`, `MOMOTO_EXECUTOR_MCP_URL` and `MOMOTO_EXECUTOR_PROXY_URL`, because they point at the old machine. The Integrations screen (`packages/momoto-web/src/views/Integrations.tsx`) lists each integration as *Mounted* or *Curated, not mounted*. The Executor is a system app and is listed among the mounted ones. The list comes from `GET /api/v1/integrations/apps`, and a mounted app is removed with `DELETE /api/v1/integrations/apps/{slug}`. #### Videos of the real product - **The outside tools, at the new hub** (1:04): https://momoto.io/docs/proof/act-05/5.05b-the-outside-tools-at-the-new-hub/clip.mp4 1. The Executor's token came back with the backup; its addresses did not, because they belong to the old machine 2. As the restore's note said, Iván starts the Executor here 3. He gives Momoto the Executor's addresses on this machine and restarts its API 4. In «More › Integrations», Marisol sees again what can be mounted, and the API she mounted before the move is still there ### Upgrading the hub with one command https://momoto.io/docs/#/p/operations/upgrade One command brings your hub to the newest version of Momoto. It downloads the new code and restarts each part in a safe order. People connected from their own computers stay connected the whole time. #### What you will notice - The new code is downloaded first. Then, if an agent is in the middle of a task, the upgrade **stops before it restarts anything** and asks. Nothing restarts until whoever runs it says yes. - Agents that already answered pause for a few minutes. Your next message reaches them on the new version. - Conversations, memory and connections carry over. Nothing needs to be set up again. #### Running it (for admins) Run it on the hub computer, from Momoto's folder. Check the version first: ``` $ git log -1 --format="%h · %cd · %s" --date=format:"%Y-%m-%d %H:%M" $ ./momoto upgrade # an agent is working: it stops and tells you how to go on $ ./momoto upgrade --yes $ ./momoto status ``` It ends with «Upgraded. ./momoto status shows how it is.» If you run it from a script or a timer, there is no one to answer. With agents running it then stops and explains, and you run it again with `--yes`. #### How it works (technical) `packages/momoto-cli/src/momoto_cli/upgrade.py` follows the deploy in `docs/runbook.md`, section 4, step by step. It stops at the first step that fails and names it. - **Pull.** Restores the tracked skill copies, then runs `git pull --ff-only`. If HEAD moved, it starts the new version's script with `--no-pull`, so the steps that follow are always the new version's. - **hooks token.** `MOMOTO_EGRESS_HOOK_TOKEN` must match in `.env` and `nanoclaw/.env`. - **running agents.** Counts the running agents. If there are any, it asks. Without a terminal, or without `--yes`, it fails and says to run it again when they finish. - **agent image.** Rebuilds the agents' image with `nanoclaw/container/build.sh`, unless `MOMOTO_AGENT_IMAGE` pins one. - **daemon.** Runs `pnpm install`, the build and `apply-customizations.sh`, then restarts the daemon and waits for its ready file. - **images, services, api-init, gate, web.** Rebuilds the images, starts the services except the web, waits for the one-shot `api-init`, waits for the API's ready line, and last starts `momoto-web`. The order matters. A new API with an old daemon answers 503, so the daemon goes first. The web goes last, after the gate, so the new web never talks to an API that is not ready. Restarting the daemon stops the agent containers, which is why the agents are checked before it. - **`--pull / --no-pull`**: Run `git pull --ff-only` first. Default: on. - **`--yes, -y`**: Restart the daemon even if agents are running. Their turns are cut. #### Videos of the real product - **Upgrading the hub with one command** (2:00): https://momoto.io/docs/proof/act-07/7.18-upgrading-the-hub/clip.mp4 1. At the hub, Marisol asks her coordinator for a summary of the CRM project, and her agent starts working 2. Iván checks which version the hub runs and upgrades it. It pulls the new code and, since an agent is working, stops before touching anything and says how to go on 3. Marisol gets her answer; her agent now only waits for the next message 4. Iván runs it again telling it to go on: the waiting agent stops; the daemon goes first, then the images, the services and the web 5. Marisol writes to her coordinator again: it answers, now on the new version 6. In «Network › People», her four colleagues are still connected to the hub from their own computers