Guides

Source

Connect an AI Client to Thegram Cloud Safely

A practical guide to OAuth, mount discovery, cloud vaults, Drive, safe retrieval and revision-aware updates.

Document#guides

The cloud integration lets a supported AI client use Thegram memory through a remote MCP service. It is useful when people need shared project context without keeping a Mac app connected to every request. That connection does not mean an assistant can copy everything it reads: tool connection, data-source access and permission to save a particular fact are separate decisions. The steps below focus on making those boundaries visible.

Connect and discover

Install the cloud plugin or configure a compatible MCP client for the documented Streamable HTTP service and OAuth flow. Use Thegram’s public install guide for the host in use, sign in through the provider’s normal flow and complete any required authorization or reauthorization prompts. A plugin ZIP, a configured MCP connection and an entry in a host directory are different things; a package being available does not prove end-user installation or host approval.

After connecting, call gram_projects to discover mounts. Use the exact key returned by the service, not its display name or a guessed identifier. A cloud-vault document uses a top-level path such as @mounts/<vault-id>/project.gram. Cloud vault writes are limited to top-level .gram documents; Google Drive mounts can expose folders. Respect the reported access level and the requested destination. A denied write is not a reason to copy the content to another mount.

First discovery can create a default writable vault for an account with none. That is account setup, not consent to create records or import content. A viewer cannot write. If an operation requires provider consent or authentication, ask the person to complete the normal authorization flow rather than attempting a workaround.

Retrieve context before answering

Start with gram_brief for the relevant document or folder. It reports current revisions and hashes, open work and an incremental changes cursor. Use gram_recall to find relevant records, then gram_context with only the fields needed to answer. Use gram_read for an outline or section and gram_relations when explicit links matter. Similar wording does not create a graph edge; only stored links do. Follow pagination and say when coverage is incomplete.

For later visits, pass the next cursor from gram_brief to gram_changes using since: next. The public plugin contract defines this as an exclusive recorded-time continuation, not a request for historical state. For a past state, request an explicit revision, recorded time or effective time. Distinguish when a fact applied from when it was recorded.

Make careful, recoverable changes

Before editing an existing document, take base_revision and expected_hash from the latest brief or a successful write response. Submit one intentional gram_patch with a stable request_id and typed operations. Give real tasks and risks appropriate statuses, place durable prose in its section and use source records for actual provenance. A record that is not placed may exist without appearing in the readable document. Do not invent owners, dates or evidence.

If a write reports STALE_REVISION or STORAGE_CONFLICT, read the current version, inspect affected prose and records, preserve other writers’ changes and construct a new intentional patch. Do not replay a stale patch unchanged. If a response is lost, inspect the destination before retrying; gram_create has no request ID, so check whether the document exists before another create. For Drive, claim remote persistence only when the response reports sync.state as synced. A successful tool call alone does not prove synchronization.

Example: preserve a launch decision

A product lead asks, “What did we decide about the staged launch, and what remains?” Discover the exact writable mount, brief the project document, recall rollout decisions and read relevant decision and task records with context. Answer first without writing. If asked to record an accepted exception, check the evidence, add one decision linked to its project and supporting evidence, place it in Decisions, and add a separate open task only if someone agreed that work remains. Read back the records and body; mention the revision and sync state only after checking the receipt.

Limits and further reading

The public plugin docs at revision 1f92e8a state that cloud semantic search is unavailable and recall mode auto falls back to keyword matching. This describes the cloud integration, not a live capability check; query gram_capabilities for the active service and do not assume local parity. The package implements MCP integration, not Slack or Gmail retrieval itself, although its shipped example prompt can ask an assistant to summarize connected sources. Server onboarding may describe broader automatic capture. Requiring the user’s explicit request before saving and reviewing the result are human operating guidance, not product-enforced consent controls.

Use the official installation guide for the host, public cloud package README and committed contract for versioned behavior, and check runtime capabilities before relying on search or a tool. The internal Vault implementation was inspected separately; it is not publicly available. The local-agent guide covers project-folder hooks and app permissions; installing cloud integration does not include those.

Source
thegram-cloud README

Public package overview, inspected at commit 1f92e8a.

https://github.com/clab-one/thegram-plugin/blob/1f92e8a/README.md
Source
Committed cloud MCP contract

Public contract source at commit 1f92e8a, including the cloud semantic-search limitation and the gram_changes cursor behavior.

https://github.com/clab-one/thegram-plugin/blob/1f92e8a/skills/thegram-cloud/references/contracts.md
Source
Official client installation guide

Public installation instructions; the client’s current authorization flow should be followed.

https://thegram.one/install/
Source
Vault service implementation contract

Internal Vault source reviewed at revision a193a19; not publicly available.

Knowledge
Preserve the requested mount

Use exact mount keys and never redirect a failed write to another destination.

Knowledge
Read back and reconcile writes

After authorized cloud or Drive changes, inspect the relevant records and check reported synchronization state.

Connect an AI Client to Thegram Cloud Safely

r0 · Time unknown · Unknown author

A practical guide to OAuth, mount discovery, cloud vaults, Drive, safe retrieval and revision-aware updates.

0/0Tasks done
0Needs attention

Source4

thegram-cloud README
Committed cloud MCP contract
Official client installation guide
Vault service implementation contract

Knowledge3

Preserve the requested mount
Read back and reconcile writes
Check current cloud search behavior

Source and build provenance

Renderer API: thegram-web-render/1. Core source: git+https://github.com/clab-one/thegram-format.git?rev=625edecee877ddf5f6c303cb478c64fa4cbca651#625edecee877ddf5f6c303cb478c64fa4cbca651.

The download file hash covers exact .gram bytes; the renderer Source sheet reports the source used for its selected revision.

This page was generated from the canonical cloud-agent-guide.gram source.

Download file SHA-256
a70e6f19e6993a1c99164cca0ca32214f3eb610049e82f484e135b42cdf25227
Renderer
Existing local Thegram renderer (local Thegram renderer); rendered at build time.
Renderer document
blog-cloud-agent-guide
Selected revision
r0

Revision navigation and historical search are not offered on this static publication. The displayed revision is the one rendered from this exact source during the build.