User global
Stable user facts and preferences that may be useful across projects. Automatic turn writers do not place project chat here.
Automatic memory / 01
TMCRA cannot know what to recall before a user asks something. An automatic integration first uses the new prompt to recall and inject relevant evidence, lets the Agent answer with that context, and only then records the user message and final assistant response as two separate actors.
02 / TURN LIFECYCLE
Automatic means the host owns the timing. It does not mean TMCRA guesses a query in advance, nor that merely connecting an MCP server can observe every conversation.
The prompt becomes the recall query. Nothing from the unfinished turn is written yet.
The host recalls allowed scopes, places bounded evidence in untrusted system context, then calls its existing model or Agent.
The user prompt and final assistant answer are submitted separately to shared project memory, with role, Agent, session, and source provenance preserved.
03 / MULTI-AGENT MEMORY
Specialized Agents should not be split into unrelated project graphs. They share one project boundary, while each conversation keeps its own session and every record keeps its actor attribution.
Stable user facts and preferences that may be useful across projects. Automatic turn writers do not place project chat here.
The default collaboration boundary. Planner, coder, reviewer, and other Agents use the same project scope so each can recall the others’ progress.
Off by default and recall-only in the current Python and JavaScript/TypeScript lifecycle wrappers. Automatic writes still go to the shared project scope.
SCOPE IS NOT SESSION
Use the same stable project key for every collaborating Agent. Keep different session IDs for separate conversations. Agent identity must not be included in the project-scope key, or cross-Agent recall will be broken.
{
"role": "user",
"metadata": { "actor_role": "user", "target_agent_id": "planner" }
}
{
"role": "assistant",
"metadata": { "actor_role": "assistant", "agent_id": "planner" }
}04 / INTEGRATION PATHS
Native adapters attach to host events. SDK wrappers surround your own model call. Generic MCP remains an explicit tool surface unless its host adds lifecycle Hooks.
NATIVE HOOKS · PILOT
Automatic recall and capture through the OpenClaw plugin lifecycle.
before_prompt_buildUses the current prompt to recall global and shared-project evidence, then returns bounded prependSystemContext before model execution.
agent_endAfter a successful, non-aborted turn, queues the user prompt and final assistant answer as separate messages.
gateway_start / gateway_stopDrains the owner-readable durable queue so a temporary API failure does not discard a completed turn.
{
plugins: {
entries: {
"tmcra-openclaw": {
enabled: true,
hooks: {
allowConversationAccess: true,
allowPromptInjection: true
},
config: {
sharedProjectId: "checkout-service",
includeGlobalScope: true
}
}
}
}
}Give every Agent on the same workstream the same sharedProjectId. OpenClaw’s agentId is excluded from the project scope but included in the derived session and message attribution. If sharedProjectId is omitted, the adapter falls back to workspace, then chat identity.
The operator must explicitly allow conversation access and prompt injection. Credentials stay in protected device configuration or Gateway environment, never in the model tool surface.
MEMORY PROVIDER · PILOT
Automatic memory through the current Hermes MemoryProvider contract.
prefetch / queue_prefetchRecalls the exact current query. The queued form warms an exact-query cache without changing recall semantics.
sync_turnQueues the completed primary user/assistant turn. Primary Agents on the same project share a scope but retain distinct sessions.
on_delegationRecords the parent delegation request and delegated result as assistant-side work with distinct parent and child Agent attribution; neither is mislabeled as a user statement.
python -m pip install https://tmcra.com/downloads/integrations/tmcra_hermes_plugin-0.4.1-py3-none-any.whl
tmcra-hermes install
hermes memory setup
tmcra-hermes statusSet one stable TMCRA_PROJECT_ID, project root, or workspace value across cooperating Agents. Hermes derives one shared project scope while agent_identity participates in each opaque session ID and actor provenance.
The provider is single-select and does not patch Hermes core. Normal device authorization can supply protected credentials; the durable pending queue contains conversation content and must remain owner-readable.
OPTIONAL WRAPPER · PREVIEW
Wrap a synchronous or asynchronous model call without replacing your Agent runtime.
SyncMemoryLifecycle and AsyncMemoryLifecycle call prepare_turn first, pass fenced context through PreparedTurn.model_messages(), then call commit_turn only after a non-empty assistant answer exists.
from tmcra_client import (
AutomaticLifecycleConfig,
SyncClient,
SyncMemoryLifecycle,
)
with SyncClient(BASE_URL, api_key=access_token) as client:
memory = SyncMemoryLifecycle(client, AutomaticLifecycleConfig(
project_scope="project_checkout",
global_scope="user_global",
agent_id="planner",
agent_metadata={"specialty": "planning"},
# agent_private_scope="agent_planner_private", # opt in
))
turn = memory.run_turn(
user_text,
lambda prepared: call_model(prepared.model_messages()),
session_id=session_id,
)python -m pip install https://tmcra.com/downloads/integrations/tmcra_client-0.5.0-py3-none-any.whl
OPTIONAL WRAPPER · PREVIEW
The same compiled package serves JavaScript at runtime and TypeScript with declarations.
prepareTurn recalls the configured scopes in parallel and returns modelMessages(). commitTurn writes both actors to projectScope with read-your-writes consistency; runTurn connects both around your answer callback.
import {
TMCRAClient,
TMCRAMemoryLifecycle,
} from "@tmcra/typescript";
const client = new TMCRAClient({ baseUrl, apiKey: accessToken });
const memory = new TMCRAMemoryLifecycle(client, {
projectScope: "project_checkout",
globalScope: "user_global",
agentMetadata: { agent_id: "coder", specialty: "implementation" },
// agentPrivateScope: "agent_coder_private", // opt in
});
const turn = await memory.runTurn(
userText,
(prepared) => callModel(prepared.modelMessages()),
{ sessionId },
);npm install https://tmcra.com/downloads/integrations/tmcra-typescript-0.5.0.tgz
EXPLICIT MCP / OPTIONAL CODEX HOOKS · PREVIEW
Choose explicit memory tools or a host lifecycle that can automate them.
The server exposes tmcra_recall, tmcra_ingest, tmcra_get_job, and tmcra_wait_job. The host must deliberately call recall before answering and ingest afterward. Connecting stdio alone cannot observe a host’s turns.
The codex-hooks setup delegates to the existing TMCRA Codex plugin. UserPromptSubmit recalls and injects memory; Stop captures separate user and assistant records. The user must restart Codex, inspect /hooks, and grant trust.
python -m pip install https://tmcra.com/downloads/integrations/tmcra_mcp_server-0.4.0-py3-none-any.whl
# Generic MCP: explicit tools
tmcra-mcp-setup install --mode explicit
tmcra-mcp-setup status --mode explicit
# Codex: optional automatic lifecycle Hooks
tmcra-mcp-setup install --mode codex-hooks
tmcra-mcp-setup status --mode codex-hooksFor a multi-Agent MCP host, pass the same shared scope, distinct session_id values, preserved message roles, and an optional real agent_id. Generic MCP does not invent an Agent identity when the host provides none.
Open the full Codex installation guideVERIFIED ARTIFACTS
These files are the same artifacts used for clean-install and package validation. Verify SHA-256 before installation.
Source distributions and the machine-readable manifest remain in the same directory for reproducible deployment.
05 / ACCEPTANCE CHECK
Seed a unique fact through Agent A and wait for its write to complete.
Ask a related new question through Agent B in the same project and verify recall occurs before its model call.
Inspect evidence: Agent B should see Agent A’s progress, while role, agent_id, session, and source remain distinguishable.
Verify an Agent-private scope is invisible unless that optional recall scope is explicitly configured.
Interrupt the API briefly and confirm the adapter’s Job or durable queue recovers without duplicating the turn.
06 / ACCESS
Tell us the host, number of Agents, project-boundary rule, and expected traffic. We will review the integration path and scoped authorization requirements.