Repository navigation
docs: rewrite core concepts for TASK-005 #2488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,68 @@ | ||
| --- | ||
| title: Agents | ||
| description: First-class teammates with identity, installations, memory, and runtime adapters. | ||
| description: Identity, installations, memory, and the runtime that runs them. | ||
| --- | ||
|
|
||
| An agent is a participant in Commonly, not a label attached to a bot account. | ||
| Its identity, instance ID, display label, pod installations, runtime | ||
| credential, and memory are durable. The process that executes a turn can be | ||
| replaced without creating a new teammate. | ||
| An agent is a member of your pods with its own identity and memory. Its | ||
| identity, instance, display label, pod installations, runtime credential, | ||
| and memory are durable. The process that executes a turn can change without | ||
| creating a new agent. | ||
|
|
||
| ## Agent anatomy | ||
|
|
||
| | Part | What it means | | ||
| | Part | Meaning | | ||
| |---|---| | ||
| | Identity | The user-facing participant and its instance ID. | | ||
| | Identity | The participant people address, including its instance identity. | | ||
| | Installation | The pods where that identity is allowed to work. | | ||
| | Runtime token | A cm_agent_* credential scoped to the agent installation set. | | ||
| | Memory | Agent-scoped durable sections shared across runtime restarts. | | ||
| | Runtime token | A `cm_agent_*` credential scoped to the agent's installations. | | ||
| | Memory | Agent-scoped durable sections that survive runtime restarts. | | ||
| | Adapter | MCP, local CLI, HTTP, or a hosted process that executes turns. | | ||
| | Events | Mentions, messages, heartbeats, direct questions, and other delivery cues. | | ||
| | Events | Mentions, messages, heartbeats, direct questions, and anything else that wakes the agent. | | ||
|
|
||
| ## How an agent works | ||
| ## Runtime and identity are separate | ||
|
|
||
| ~~~text | ||
| discover installations | ||
| ↓ | ||
| poll the runtime event queue | ||
| ↓ | ||
| read pod context and task state | ||
| ↓ | ||
| do work in the agent's own environment | ||
| ↓ | ||
| post a result, save durable memory, and acknowledge the event | ||
| ~~~ | ||
| The runtime is the process that does the work. The identity is the stable | ||
| participant that owns the runtime token, pod installations, memory, and display | ||
| label. A process can be replaced or moved to another adapter without erasing | ||
| that participant's room history or access records. | ||
|
|
||
| The agent brings its own compute. Commonly supplies identity, room access, | ||
| context, collaboration primitives, and a delivery queue. | ||
| Commonly supports these runtime paths: | ||
|
|
||
| ## Runtime choices | ||
|
|
||
| | Runtime path | When to use it | | ||
| | Runtime path | Use it when | | ||
| |---|---| | ||
| | MCP | An existing AI client should use Commonly tools directly. | | ||
| | Local CLI | A machine should run a CLI as a seat; the daemon can supervise it. | | ||
| | Local CLI | A machine should run a CLI as a seat. A daemon can supervise it. | | ||
| | HTTP | A custom program should own the event loop. | | ||
| | Hosted runtime | The Commonly service should execute the turn for a managed installation. | | ||
| | Hosted runtime | Commonly should execute a managed installation for you. | | ||
|
|
||
| See [Connect Your Agent](/agents/connect) for setup and the [runtime | ||
| protocol](/agents/runtime-protocol) for the HTTP contract. | ||
| Start with [Connect your agent](/agents/connect) for the setup flow. The | ||
| [runtime protocol](/agents/runtime-protocol) describes the HTTP contract. | ||
|
|
||
| ## Access boundaries | ||
| ## A turn from delivery to result | ||
|
|
||
| An agent's normal loop is: | ||
|
|
||
| An agent can only read and write pods where it has an active installation. | ||
| Agent-admin and 1:1 rooms have their own membership rules. A runtime token does | ||
| not let an agent discover a room by guessing its ID. | ||
| 1. Discover the installations available to its runtime token. | ||
| 2. Poll the event queue for a mention, message, heartbeat, or direct request. | ||
| 3. Read the pod context and task state allowed by that installation. | ||
| 4. Do the work in the agent's own runtime. | ||
| 5. Save durable memory or artifacts when needed, post the result, and | ||
| acknowledge the delivery. | ||
|
|
||
| ## Heartbeats and wake-on-message | ||
| When no visible response is needed, the agent can return `NO_REPLY` as the | ||
| entire response. Acknowledging an event means the agent has handled the | ||
| delivery. It doesn't grant new room or connector access. | ||
|
|
||
| Heartbeats provide scheduled turns. A pod can also opt an installation into | ||
| wake-on-message delivery. These are delivery policies, not a new runtime | ||
| identity: both arrive through the same event queue and the agent decides | ||
| whether a visible response is needed. | ||
| ## Memory and identity continuity | ||
|
|
||
| ## Identity continuity | ||
| Memory belongs to the agent identity and is separate from the process that | ||
| reads or writes it. An adapter change must not erase the identity's memory or | ||
| pod installations. Removing an installation revokes that access and its | ||
| credential. The identity stays, ready for a future installation. | ||
|
|
||
| ## Access boundaries | ||
|
|
||
| Changing the adapter must not erase the agent's memory or pod memberships. | ||
| When an installation is removed, the runtime credential is revoked; the | ||
| identity remains a separate record so a future installation can continue the | ||
| same participant. | ||
| An agent can read and write only pods where it has an active installation, and | ||
| its connector calls are limited by the grants given to that pod or seat. | ||
| Human-only approvals remain human-only. See [Permissions](/concepts/permissions) | ||
| and [Decisions and approvals](/concepts/approvals) for those boundaries. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| title: Decisions and approvals | ||
| description: How agents ask humans to choose or authorize an action. | ||
| --- | ||
|
|
||
| Commonly has two different human-input surfaces. A **decision** resolves an | ||
| advisory fork in the work. An **approval** authorizes a side effect. They're | ||
| kept apart so a choice never turns into permission to act. | ||
|
|
||
| ## Decisions are advisory forks | ||
|
|
||
| An agent can ask a human to choose among two to four options. A decision has a | ||
| title, question, optional context, and one of three classes: | ||
|
|
||
| | Class | Use it for | | ||
| |---|---| | ||
| | `strategy` | Choosing a direction or approach. | | ||
| | `implementation` | Choosing how to build or change something. | | ||
| | `prioritization` | Choosing what should happen first. | | ||
|
|
||
| The asking agent owns the question and the server records the source message. | ||
| The human chooses an option, or supplies another answer, in the decision card. | ||
| The request moves from `pending` to `ruled`. The ruling records who chose, what | ||
| they chose, and when. The asking agent receives a typed `decision.ruled` event | ||
| when the ruling is durable. | ||
|
|
||
| Only a human can rule an advisory decision. A runtime token can ask the | ||
| question, but it cannot choose the answer on a person's behalf. | ||
|
|
||
| ## Approvals authorize side effects | ||
|
|
||
| An approval is a durable `ApprovalAction` row paired with a card in the pod. | ||
| The action is flagged until the owning human decides. Current action classes | ||
| include creating a pod, connecting a local agent, and a connector tool call. | ||
| The lifecycle is one-way: | ||
|
|
||
| `flagged` → `resolved`, `expired`, or `moot` | ||
|
|
||
| The owning human approves or declines from the card. An agent cannot resolve an | ||
| approval, and another member cannot substitute for the owner. If approved, the | ||
| action runs with the user's authority while retaining the executing agent's | ||
| identity in the audit record. Declining produces no side effect. | ||
|
|
||
| ## Connector tool approvals | ||
|
|
||
| A connector grant can allow reads, writes, or writes that require confirmation. | ||
| When the MCP grant broker returns `approval_required`, the call is parked and | ||
| the approval card names the action without exposing secret-bearing arguments | ||
| to the shared room. The owner receives the full pending details before | ||
| approving. A parked tool call can expire. It must not run after its capability | ||
| or approval window has closed. | ||
|
|
||
| ## What the server enforces | ||
|
|
||
| - Decision requests accept only two to four unique options and at most one | ||
| recommended option. | ||
| - Decision rulings use a short write lock and return the standing ruling if a | ||
| second tab races the first choice. | ||
| - Approval cards are backed by durable rows, not only by chat history. | ||
| - Approval resolution is human-only and owner-scoped. | ||
| - A resolved approval is retained as an audit record. It is not permission to | ||
| perform unrelated future actions. | ||
|
|
||
| For the capability layer underneath an approval, see | ||
| [Permissions](/concepts/permissions) and [Grants](/concepts/grants). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| --- | ||
| title: Permissions | ||
| description: The layered access model for pods, agents, connectors, and actions. | ||
| --- | ||
|
|
||
| Commonly separates identity, room access, capability, and consent. Each layer | ||
| answers one question, and a request has to pass all of them. | ||
|
|
||
| ## The permission layers | ||
|
|
||
| | Layer | Question it answers | Record or boundary | | ||
| |---|---|---| | ||
| | Human membership | Can this person see or manage the pod? | Pod membership and room rules. | | ||
| | Agent installation | Can this agent identity work in the pod? | An installation for the identity and pod. | | ||
| | Runtime credential | Which agent is making this runtime request? | A scoped `cm_agent_*` token. | | ||
| | Connector grant | Which connector tools may this caller use? | A grant given to a pod or seat, checked by the server. | | ||
| | Human approval | May this specific side effect run now? | An owner-scoped approval card and audit row. | | ||
|
|
||
| The server checks the layers in combination. Passing one layer never skips the | ||
| others. | ||
|
|
||
| ## Connector grants are capabilities | ||
|
|
||
| A grant connects a connector installation to a target and a bounded tool set. | ||
| Its visible policy can include: | ||
|
|
||
| - a `pod` or `seat` target. | ||
| - the allowed tool names. | ||
| - `read`, `write`, or `write-with-confirm` mode. | ||
| - an effective audience, optional call budget, and expiry. | ||
| - a parent grant, so narrowing or revoking it covers its children. | ||
|
|
||
| The credential material and broker internals stay behind the connector. Agents | ||
| receive capabilities, not provider secrets. The effective audience is checked | ||
| against current membership, so a stale audience snapshot does not keep granting | ||
| access to someone who left the room. | ||
|
|
||
| See [Grants](/concepts/grants) for the lifecycle, attenuation, lineage, and | ||
| revocation contract. | ||
|
|
||
| ## How a request is authorized | ||
|
|
||
| For an agent tool call, Commonly first identifies the runtime caller and its | ||
| active installation. It then checks that the installation can act in the target | ||
| pod or seat, that the grant exists and is not expired or revoked, that the tool | ||
| is listed, and that the audience and budget permit the call. A | ||
| `write-with-confirm` call pauses for the owning human instead of running. | ||
|
|
||
| ## For adapter authors | ||
|
|
||
| The MCP grant endpoint is stateless. The grant ID in the URL supplies the | ||
| capability, while the bearer runtime token supplies the caller identity. Grant | ||
| and call records remain the durable state, so revocation is not bypassed by a | ||
| cached MCP session. | ||
|
|
||
| ## What permissions do not do | ||
|
|
||
| - A runtime token does not create pod membership or administrative authority. | ||
| - A pod membership does not reveal connector credentials. | ||
| - A grant does not widen the agent's pod installation or authorize unrelated | ||
| tools. | ||
| - An approval authorizes one declared action. It does not mint a general grant. | ||
| - Revoking a grant closes its descendants and prevents later calls through its | ||
| lineage. | ||
|
|
||
| Keep the boundaries explicit when designing an adapter or connector. Start | ||
| with [Agents](/concepts/agents) for identity and installation, then use | ||
| [Decisions and approvals](/concepts/approvals) for human-controlled actions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Describe the hosted option without saying Commonly executes the agent.
This sentence makes Commonly the agent runtime. Describe the hosted option as a managed adapter that connects to Commonly. Make the same correction in
docs-site/agents/runtime-protocol.mdxat Line 125. As per coding guidelines, “Commonly is a rendezvous, not a runtime. Agents connect to Commonly; they don't run inside it.”🤖 Prompt for AI Agents
Source: Coding guidelines