Skip to content

Latest commit

 

History

History
199 lines (125 loc) · 15.9 KB

File metadata and controls

199 lines (125 loc) · 15.9 KB
title Memory
description Give your agents durable context through memory banks and structured wikis.
icon brain

Tilde provides two related ways to manage knowledge for agents.

Memory banks and wikis can be workspace-owned or personal. Each root has independent visibility and ownership modes. Visibility controls listing, reading, recall, reflection, and other content use. Ownership controls configuration, source policy, schemas, grants, lifecycle, and deletion. A personal resource has no team ID, while a workspace resource remains in its team.

Set either plane to Team or Private. Private access can be granted to an Identity user or group in the same tenant. Ownership and administrator authority do not reveal private memory or wiki content without visibility. Pages, revisions, assets, memories, generated tools, and lifecycle records inherit their bank or wiki root; they are not shared separately.

Personal targets may read an accessible workspace source, but a workspace target cannot bind a personal source. Before removing someone from a workspace, Tilde requires durable personal projections and cross-workspace bindings to be detached or removed.

Owners can promote a personal memory bank or wiki to a workspace they belong to. Workspace administrators may make one personal to themselves. Detach and purge source bindings or durable projections first so changing ownership cannot widen an existing audience.

Resource Use it for Agent access
Memory bank Durable facts, decisions, preferences, and work summaries that agents can recall semantically. retain, recall, reflect, and delete_document tools.
Wiki Agent-maintained Markdown pages, revisions, relationships, graph queries, and media assets. Page, schema, relationship, graph, and asset tools.

Use memory banks when an agent needs relevant context without knowing where it was stored. Use wikis when the knowledge should have an explicit structure that people and agents can browse and maintain.

Memory banks

A memory bank is an isolated store that lasts beyond one conversation. Agents can retain stable documents, recall content relevant to a query, and reflect on the bank to produce a contextual answer.

Tilde memory banks use a managed Helix graph and vector store. Tenant and bank predicates isolate every node, edge, search, and mutation. Recall combines semantic, lexical, exact-title, and graph candidates before reranking a bounded result set with evidence and source provenance. Bank access is resolved in Postgres before a scoped provider query is created, so agents never submit a tenant or bank partition directly. Owners can also import and export portable bank templates for supported configuration, mental models, and directives.

Each retained document has typed fields for its OKF category, title, importance, authorship, overwrite policy, evidence, subjects, supersession, source, and learning agent. The optional metadata object is only for provider-native or application-specific extension facts. It does not affect access, ranking, graph links, provenance, or synthesis.

Open Tilde, select your workspace, and go to MemoryMemory Banks. Click New memory bank, choose Personal or Workspace, then give the bank a clear name and description. Personal banks follow you across agents without becoming visible to the workspace.

Tilde automatically creates a private tool provider bound to the bank and enables these tools:

  • retain stores or replaces a stable document. Reuse its document_id when updating it. Select an OKF memory_type, set importance from 0.0 to 1.0, and use typed relations for evidence, subjects, or supersession.
  • recall searches for memories relevant to a query.
  • reflect answers a question using knowledge held by the bank.
  • delete_document removes a retained document by ID.

Tilde binds the bank ID internally, so it does not appear as an agent-controlled tool parameter.

Recall memory for the effective speaker

ChatKit automatic memory is opt-in. An agent or channel stores one automatic_memory_mode: none, personal, personal_plus_agent, or team. none is the default. memory_bank_ids independently selects the banks that ingest conversations involving that resource.

The recipient agent calls /chatkit/agents/{agent_id}/sessions/{session_id}/automatic-memory/recall with a durable message_id and optional max_tokens. Tilde derives the effective speaker from that stored message and session, applies bank visibility, and returns a bounded projection with provenance. The caller cannot choose another user or use a hidden continuation as someone else's memory context.

Synthesize personal memory in the background

A personal bank can assign a synthesizer with synthesizer_agent_id and synthesizer_team_id. Tilde creates one stable private ChatKit synthesis session for that bank and queues visible completed-turn evidence. Streaming deltas, hidden continuations, and the synthesis session itself do not recursively enqueue more work.

The synthesis agent receives bank-bound recall, retain, and document-deletion operations under /memory/synthesis-sessions/{session_id}. Every mutation and completion receipt must carry the current claim's batch ID, complete evidence-ID set, and fresh lease owner. This prevents a stale worker from adopting another claim's mutation or completion. Clearing a personal bank's synthesizer stops background processing but preserves queued evidence for a later assignment.

OpenBot's automatic-memory wiring is shipped and defaults to `none`. Owners opt in with `OPENBOT_AUTOMATIC_MEMORY_MODE` or an `AGENT__AUTOMATIC_MEMORY_MODE` override. `personal_plus_agent` provisions a lifecycle-owned agent bank; `personal` and `team` select recall without creating that bank. Memory Catcher inherits the installation's selected Codex, direct Gateway, or managed-OIDC inference provider and owns no bank, preventing recursive synthesis.

OpenBot declares the owned bank's synthesizer through the Agent Resource Bundle field memory.bank.synthesizer_agent_id. It is a stable same-team ChatKit agent key. Supplying memory-catcher validates and converges that assignment on creation, update, and portable state import. Omitting the field preserves the bank's current or server-default assignment. Setting memory.bank.enabled to false deletes the lifecycle-owned bank.

Before inference, Memory Catcher validates the prompt's batch digest, exact ordered evidence-ID sequence, and worker lease through /memory/synthesis-sessions/{session_id}/validate-batch. Tilde accepts only the current prompt-sized evidence chunk under that unexpired lease. Every later mutation repeats the same typed binding, so a stale worker, reordered set, or arbitrary subset cannot authorize a mutation or completion.

Account for managed inference with AI credits

Agent-authenticated hosted runtimes can reserve organization AI credits before a model call, then commit the exact provider receipt. Reserve with estimated_cost_microusd and an idempotency_key. Commit with reservation_id, actual_cost_microusd, model_id, input/output token counts, tags, and a second idempotency key. Release an unused reservation explicitly. Human-authenticated top-ups are separate from agent spend.

OpenBot now applies this lifecycle to every model call made through Tilde-managed Vercel project OIDC, including Memory Catcher synthesis. It writes AgentRun effect intent before the provider starts, records the Gateway generation for recovery, and settles the authoritative receipt before reporting hosted cost to the run. Direct owner Gateway keys and Codex subscription inference are outside this managed meter.

Every Gateway call reserves credits first, including BYOK. Vercel can fall back from BYOK to charged system credentials, so BYOK cannot safely bypass preflight. When the authoritative generation receipt reports BYOK, OpenBot releases the reservation. A system or fallback receipt is committed. An organization with no Tilde AI credits cannot start a Gateway call even when BYOK is configured. See Vercel's BYOK behavior.

OpenBot never repeats a planned, uncertain, or reconciled provider call automatically. If the model response cannot be recovered, it fails that AgentRun safely; a later owner message creates a new run. Hosted max_cost_microusd uses authoritative receipt cost after each call and can overshoot by the final call, while organization credit reservation remains a pre-call gate. Non-hosted cost budgets still require configured input and output price rates.

Wikis

A wiki is a structured Markdown knowledge base for you personally or for your team. It can contain nested pages, typed data, version history, semantic relationships, graph queries, and media assets.

Go to MemoryWikis and click New wiki. Choose Personal or Workspace, then select memory banks with the same ownership scope. Tilde synchronizes Wiki changes into those banks, giving agents both structured Wiki access and semantic recall over the same knowledge.

Creating a wiki automatically provisions and enables its private wiki tools. They cover:

  • Pages: list, read, create or update, move, delete, migrate, inspect history, and run bounded literal or regular-expression grep with paths, line numbers, and context.
  • Data model: manage versioned page types, JSON schemas, and relationship types.
  • Graph: relate pages, inspect backlinks and neighborhoods, and traverse relationships.
  • Assets: upload, download, update, delete, and inspect media references.

Each tool is bound to the wiki that created it, so an agent cannot redirect a call to another wiki by changing an input parameter.

Wiki schema packs

A Wiki Schema Pack adds a coherent data model to a wiki. Each pack contains page types with JSON schemas and the semantic relationships allowed between them.

Go to MemoryWiki Schema Packs, choose a pack, and select its destination wiki. Tilde preserves definitions with matching stable keys. Installed definitions remain editable and versioned inside the wiki.

Schema packs do not create a separate tool provider. The wiki's existing tools immediately work with the added page types and relationships.

Keep memory continuously updated

Use automatic ingestion for source data, agent tools for deliberate updates, and bank-sharded background synthesis for durable lessons from conversations.

Ingest supported sources automatically

Open a memory bank and select the sources you want it to ingest. Tilde can ingest ChatKit conversations, signals, wikis, skills, and MCP servers. Personal banks initially accept personal Signal providers and personal Wikis; workspace banks accept workspace sources. Once a source is linked, Tilde backfills it, detects changes, and resynchronizes affected documents into the bank.

A source is not shared with every memory bank automatically. You explicitly choose which banks receive it when configuring the connection, Wiki, or bank. A personal source can bind only to a personal bank owned by the same user and organization.

Let an agent maintain its knowledge

Give an agent the retain tool so it can write directly to its memory bank. Ask it to use a stable document_id for knowledge that should be updated instead of duplicated.

Give the agent wiki page and relationship tools when it needs to maintain structured knowledge. If the wiki is linked to the agent's memory bank, each wiki update is ingested into that bank automatically. The agent can then use semantic recall over the content without writing the same information with retain.

Treat the wiki as a first-class source of truth for common and relational data such as customers, projects, ownership, policies, and dependencies. Use the memory bank for semantic recall, conclusions, preferences, and concise summaries that do not belong in a structured page.

Use background synthesis

Assign a synthesizer agent when you create or configure a bank. Tilde shards evidence by bank and starts the assigned agent when the pending queue reaches 1,000 estimated tokens. One synthesizer can serve many banks, but each invocation receives tools bound to exactly one bank and one active evidence lease. A bank without an assigned synthesizer continues collecting evidence until you configure one.

The synthesizer recalls related facts, writes or supersedes typed memories, and records a cited no-op when the evidence adds nothing durable. Owner-written explicit facts are protected from automatic overwrite and deletion. Mutation and completion receipts are operational records; they are not retained memories or exported configuration.

You can also run a foreground agent when you need immediate synthesis. Its memory tools use the same typed document contract, while its normal conversation remains responsible for user-visible communication.

Review the supplied evidence batch.

Identify durable facts, decisions, preferences, outcomes, and unresolved work.
Ignore greetings, repeated context, temporary instructions, and unverified claims.

Update structured and relational facts in the wiki first.
Use stable page identifiers and preserve existing relationships.

Retain concise summaries that do not belong in the wiki in the memory bank.
Recall related memories before writing, and reuse stable document IDs when updating them.
Do not retain secrets or duplicate content already ingested from the wiki.

This pattern keeps raw event noise out of long-term memory while steadily improving the context available to future sessions.

Expose memory tools to an agent

Memory bank and wiki tools are enabled automatically when you create their resource. You do not need to configure another provider or supply credentials.

Go to **Tools** → **Manage Enabled Tools**. Find the provider named for your memory bank or wiki and review its enabled tools.
Keep destructive tools such as `delete_document`, `delete_page`, and schema deletion out of the agent's MCP server unless it needs them.
Go to **Tools** → **MCP Servers** and open the server used by your agent. Add the memory bank or wiki tools you want to expose.
Enable dynamic mode when you add the full wiki toolset. It lets the agent search for the relevant tool instead of loading every wiki tool schema into its context at once.
Connect to that MCP server with the Tilde SDK. Memory and wiki tools are returned alongside its other tools.
```typescript wherever-you-run-your-agent.ts
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
import { createMCPClient } from "@trytilde/sdk-vercel-ai-node";

const { mcp, closeMcp } = await createMCPClient({
  client: tilde,
  serverId: process.env.TILDE_MCP_SERVER_ID!,
});

try {
  await generateText({
    model: openai("gpt-5.5"),
    messages,
    tools: await mcp.tools(),
  });
} finally {
  await closeMcp();
}
```

See [Tools](/tools) for the complete client and environment setup.

Guide the agent

Tell the agent which knowledge belongs in each resource.

Recall relevant memory before starting work that may depend on past decisions.
Retain durable facts, decisions, and concise work summaries.
Use the wiki for structured knowledge that should be browsed, linked, or maintained.
Follow the wiki's page schemas and relationships when creating or updating pages.
Do not store secrets, temporary instructions, or unverified assumptions.

Memory and ChatKit history

ChatKit history reconstructs one conversation. Memory banks and wikis carry selected knowledge across sessions, channels, and agents.

Do not copy every message into memory. Keep the part another session would need: the decision, its context, and the resulting state.