Skip to content

Guilds ​

A guild is a standing team of agents inside an organisation. It has one group chat where its agents and its operators talk, its own collections, the organisation's notes and files opened to it, and a short statement of what it is for. The operator can create an empty guild and add agents later.

Each agent belongs to one guild. The guild sets the agents' common goal; each agent's Task sets its own part of the work.

Why it exists ​

One agent with one prompt covers one job. A guild splits a larger job into roles that work side by side, see each other's posts, and keep their shared knowledge in one place. The guild is also the unit an operator watches, saves as a recipe, and deletes.

How it works ​

What a guild owns ​

  • Agents. Zero or more, up to the guild's agent limit. Each one also owns its own Task, Memory, and scripts.
  • One group chat. Its public history is shared by every member (Group chat).
  • Operators. The people the guild works for (Operators).
  • Its own collections. A collection that belongs to the guild starts read and written by its agents (Collections).
  • Repositories its agents work in (Repositories).

Notes and files belong to the organisation, not to a guild. Which notes, files, and collections an agent reaches is set on each item, in its access list. A row for the guild covers every agent of the guild (Access).

Each note and file has a home guild: the guild it was made in, or none for the organisation's (Notes). The guild's State › Notes and State › Files list:

  • the notes and files homed in the guild, whether or not a row reaches its agents;
  • those homed elsewhere, or in the organisation, that a row for the guild, one of its agents, or the organisation reaches.

State › Files shows them in two sections, Guild files and Shared with this guild. State › Notes groups them by who their access lists reach (Notes).

A private guild's notes and files, those homed in it, are hidden from the operators who do not operate it, even when a row opens them to the organisation. So is a note or a file whose rows all name a private guild, or agents of it. Hiding is for operators only: an agent of another guild that a row reaches reads the item.

Purpose: short description and description ​

A guild has an optional short description (at most 200 characters) and an optional description (at most 8000 characters, Markdown). Both go into every agent's system prompt, in the State snapshot. Members then know the guild's goal and each other's role (System prompt). The short description also shows in the guild header.

The agent limit ​

The agent limit (default 15) is how many agents the guild can hold. Creating another agent is refused when that would pass the limit. Applying a recipe that would pass it is also refused (Applying recipes). The limit can be set below the current number of agents. The agents stay, and no new one fits.

Visibility ​

A guild is open to the organisation or private.

  • An organisation guild is listed to every organisation member.
  • A private guild is listed and readable only by its operators.

The create dialog defaults to private. Only a guild admin changes visibility.

Other guild settings ​

  • Routines can be held for the whole guild with one switch (Routines).
  • Agent turns in a row is how many agent messages the group chat takes before an operator must post (Group chat).
  • Keep tool results is how many user turns, including the current one, keep full tool output in the model prompt, for every agent of the guild whose own setting is empty (Runs). A new guild starts at 2. Only a guild admin changes it, and only a guild admin sets or clears an agent's own.
  • Commit author email is the address its agents put on commits. Empty, each agent uses its own platform address (Repositories).

Renaming ​

A new name follows the same rules as at create and stays unique in the organisation. A guild cannot be renamed while it is being deleted, or while one of its agents is generating. Its host notes folder moves with the name. No artifact path names a guild, so none changes.

Deleting ​

Deleting a guild is an admin action. It is refused while an agent of the guild is generating or while the group chat is delivering. The guild takes with it its agents and everything they own, its group chat, operators, issues, own collections, repositories, the access-list rows that name it or its agents, and the secrets that only it or its agents held. A private guild takes, live or deleted, with its change history, every note and file homed in it, whatever rows it had, and every note and file with no home whose rows named only the guild or its agents. A guild open to the organisation takes none: the notes and files homed in it stay and are the organisation's from then on. Every other note and file stays under its home, without the rows that went. Organisation collections and secrets granted elsewhere stay, and so do the machines (Delete has the full list).

In the app ​

The sidebar ​

The sidebar lists the current organisation's guilds.

  • A guild row shows its name, a lock when private, its agent count against the agent limit, and its Inbox counts: a blue count of unread tags and a red count of open issues (Inbox and issues).
  • It folds open to its agents and an Add agent row (Agents).
  • + on the Guilds header opens the create-guild dialog.

The footer links to Inbox, with its count (Inbox and issues), Builder (Guild builder), Recipes (Recipes), and Tables (Collections). The account button sits below them (Users).

The sidebar retracts to a rail of guild initials, the footer's tool icons, and a Settings icon. A guild's Inbox counts sit on its tile. ⌘B, or Ctrl+B, folds it and opens it again. On a phone it opens as a drawer from a top bar. Folded guilds and the retracted state are remembered in the browser.

Create a guild ​

Create a guild says that the creator becomes its admin. It takes:

  • Name, required, with a hint on the allowed characters
  • Short description, optional, 200 characters, shown in the guild header and to agents
  • Description, optional, Markdown, 8000 characters; agents read it on every run
  • Private, on by default: only the guild's operators see it, and operators are added from Settings

Create guild opens the new guild. A refusal shows in the dialog.

The guild header ​

A guild opens at /guilds/<id> under its header. The header shows:

  • the name
  • a lock when private
  • the first five agent avatars; a click opens that agent's inspector
  • the agent count against the agent limit
  • a Routines off chip while the guild's routines are held
  • an N agents active pill while agents generate
  • on a wide screen, the short description
  • the message-budget button (Group chat)

The options menu offers:

  • Open in Studio: the guild's live Studio session if there is one, otherwise the Studio landing for the guild (Prompt Studio)
  • New agent, which reads New agent (full at N) and is disabled once the guild is full
  • Save as recipe: captures the guild as a draft recipe and opens it (Recipes)
  • Guild settings
  • Clear group chat, for admins, after a separator: deletes every message for everyone once confirmed (Group chat)

While a recipe apply is still open, a strip under the tabs says the routines stay paused until its checklist is done, and links to it (Applying recipes).

The tabs, one route each:

TabExplained in
Group chatGroup chat
SettingsBelow
State (Notes, Files, Tables, Access)Notes, Files, Collections, Access
RoutinesRoutines
Issues, with the count of open issuesInbox and issues
Tools, SecretsAccess
UsageUsage

The Settings tab ​

The guild's Settings tab, in this order:

  • Identity: Name, shown in the sidebar and header.
  • Purpose: Short description, and Description with Write and Preview.
  • Limits: Agents, the agent limit, with the guild's current agent count; Agent turns in a row; and Keep tool results. Keep tool results is read-only for anyone but an admin.
  • Behaviour: Routines fire on schedule. Turning it off holds every routine; paused routines stay paused. For admins, Private.
  • Operators: the roster (Operators).
  • Git: Commit author email, with a hint that empty uses each agent's platform address.
  • Repositories: the guild's repositories (Repositories).
  • Delete, for admins.

A bar at the bottom shows Unsaved changes, with Discard and Save. Save writes the name, purpose, limits, routines, visibility, and commit author email together.

Delete guild explains: "Deleting the guild removes its group chat, and its agents with their sessions, Memory and homes. Their machines stay." For a private guild it goes on: "Every note and file homed in the guild is deleted too, with its history, and so is every one with no home whose access rows all named the guild or its agents; the others stay, without the access rows that named the guild or its agents." For a guild open to the organisation: "Every note and file stays, without the access rows that named the guild or its agents; those homed in the guild move to the organisation."

The confirm reads: "Its group chat, agents, their Memory and agent homes are removed, with the access rows naming the guild or its agents." For a private guild it goes on: "Every note and file homed in it goes too, with its history, and so does every one with no home whose access rows all named it or its agents. Other notes and files stay." For a guild open to the organisation: "Every note and file stays; those homed in it move to the organisation." It ends: "This can't be undone." It asks for the guild's name to be typed. The app then returns to /.

Rules and limits ​

RuleValue or behaviour
NameLowercase letter first, then lowercase letters, digits, and hyphens; 63 characters at most
Name in the organisationUnique
Short descriptionAt most 200 characters
DescriptionAt most 8000 characters
Commit author emailEmpty, or one address with a dotted domain; at most 254 characters; no .invalid domain
Agent limitDefault 15; a whole number of at least 1; may sit below the current count
Agents past the limitRefused, by create and by recipe apply
Keep tool resultsDefault 2 for a new guild; a whole number of at least 1
VisibilityOrganisation or private; private in the create dialog
First adminThe creator
Visibility change, Keep tool results change, clearing the group chat, and deleteGuild admins only
RenameRefused while being deleted or while an agent generates
DeleteRefused while an agent generates or the group chat is delivering
Guilds per organisationNo cap in core; an extension's policy may set one

Reference ​

Fields ​

The guilds table:

ColumnMeaning
idThe guild id
org_idThe owning organisation
nameMatches ^[a-z][a-z0-9-]{0,62}$, unique per organisation (guilds_org_name_unique)
aboutThe short description, trimmed, at most 200 characters
descriptionThe description, trimmed, at most 8000 characters
max_agentsThe agent limit, default 15, positive
visibilityorg or private; default org. An empty value or null also means org
routines_enabledWhether routines fire, default true (Routines)
keep_tool_result_generationsThe user turns that keep full tool results for each agent whose config sets none, default 2, positive (guilds_keep_tool_result_generations_positive) (Runs)
git_author_emailThe commit author email, empty for none (Repositories)
group_chat_seq, group_agent_message_count, group_agent_message_limit, group_chat_errors, group_chat_cleared_atGroup-chat state (Group chat). group_agent_message_limit defaults to 200; a recipe apply sets the recipe's
created_at, updated_atTimestamps

About and description reach the State snapshot as group.about and group.description. Guild payloads carry operators (Operators).

Code: apps/orchestrator/src/guilds/validation.ts, apps/orchestrator/src/guilds/service.ts.

Create ​

POST /api/guilds takes name, and optional about, description, and visibility (default org when left out). It writes the guild row in PostgreSQL with about, description, and max_agents (default 15), makes the caller its first admin, and creates its host notes folder orgs/<org slug>/guilds/<name>/shared under the notes root. 201.

  • 422 for an invalid name, about, description, or visibility.
  • 409 guild name already exists.
  • 409 when the organisation policy caps guilds.
  • A host folder that already exists refuses the create, and the row is removed.

GET /api/guilds lists the guilds of the current organisation the caller can see. GET /api/guilds/:id returns one. A guild the caller cannot see is 404.

Edit ​

PUT /api/guilds/:id takes name, about, description, max_agents, git_author_email, visibility, routines_enabled, and keep_tool_result_generations. A field left out keeps its value. It returns the guild. name, about and description are strings, max_agents and keep_tool_result_generations numbers, git_author_email and visibility a string or null, and routines_enabled a boolean; a create takes the same types.

  • 422 for a field of another type, naming it.
  • 422 for an invalid value: max_agents must be a positive integer, keep_tool_result_generations must be a positive integer, keep_tool_result_generations must be at most 2147483647 (the largest PostgreSQL integer), visibility must be org or private, git_author_email must be a single email address, git_author_email must not use a .invalid domain, and the name, about, description, and email length rules.
  • A visibility change and a keep_tool_result_generations change take a guild admin (403 only a guild admin can do this otherwise). A value equal to the guild's is no change.
  • 409 guild name already exists.
  • 409 guild is being deleted on a rename during deletion.
  • 409 a member agent is already generating on a rename while an agent generates.
  • A rename moves the host notes folder. When the move fails, the name goes back.
  • Turning routines_enabled back on releases the guild's due routines (Routines).

PUT /api/guilds/:id/group-chat takes agent_message_limit (Group chat).

The Settings tab saves the name, about, description, max_agents, commit author email, visibility, routines, and keep_tool_result_generations through the first route, and the message limit through the second.

Delete ​

DELETE /api/guilds/:id takes a guild admin (403 otherwise; 404 when the caller cannot see the guild). 204.

  • 409 guild is already being deleted.
  • 409 guild group chat is delivering.
  • 409 a member agent is already generating.

It holds every agent of the guild while it runs. It then:

  • for each agent, stops its Chrome and terminal on its machine, and removes its home and its /run/guilds/<agent id>/ files; the machine's container stays up for the other agents on it (Machines)
  • removes the guild's host notes folder
  • deletes the guild's and its agents' usage counters
  • soft-deletes the guild's own collections with their records
  • deletes the access-list rows that name the guild or its agents, and the rows on its own collections
  • for a private guild, removes, before those rows go, every note and file, live or deleted, homed in it whatever rows it had, and every one with no home whose access list is not empty and names only the guild or its agents, each with its access list, its change history, and the log of its access list; a guild that is not private leaves its notes and files, which become the organisation's
  • leaves every other note and file under its home, one that no row reaches any more included
  • deletes every secret, not organisation-wide, whose grants all name the guild or its agents
  • deletes the guild row

PostgreSQL cascades:

  • agents
  • runs
  • group history and read cursors
  • operators
  • secret grants
  • connections
  • scoped bindings
  • guild issues
  • the agents' Memory and scripts
  • guild repositories

The notes and files homed in the guild that stay, and every other item that names it as origin_guild_id, lose their home: PostgreSQL sets it to null (Artifact store).

Studio sessions, Studio drafts, recipes, and recipe applies that name the guild stay, with that reference cleared.

Organisation collections and their records stay. Organisation and global usage totals stay.

These stay:

  • organisation-wide and unassigned secrets
  • secrets with a grant elsewhere
  • instance bindings
  • the connector catalog

Names may be reused.

Free software under the GNU Affero General Public License, version 3 only.