Bind Agent Identity
bind_agentBind a sticky agent identity to this MCP session. Once bound, wake_status and load_context default to this agent_id when called without an explicit agent_id= arg — no need to pass identity on every call. Per-call override still works.
Persisted to mcp_sessions.agent_id (migration 0008), so the binding survives setup_account(mode='restore') and the server re-hydrates it automatically on the next tool call.
Call once near the start of a session, ideally from your boot recipe (HANDLER: bind_agent agent_id=). Idempotent: re-binding the same agent_id is a no-op. Pass agent_id='' to clear the binding.
blind_since= (with blind=true) sets when the blind session began, so list_facts_by_key_prefix hides feed comms keyed before it; the default is the session's start minus 60 s.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>"
},
"name": "bind_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blind | No | Optional, default false. true = blind session for a model fitting: from now on the wake bundle, every related/nearest list and the search tools on this session leave out keys under letter-to-emily:, project:*:wake:fresh-eye:, project:*:fitting:, project:*:agent:*:model-upgrade: and earlier fittings' feed comms (comms:...:feed-q-, feed-a-, fresh-eye-, ack-fresh-eye-), plus keyless facts whose text starts with a fitting product marker (FINDINGS, COMPARE, MODEL TRIAL ...); search_facts' include_granted then defaults to false. Remembered for the session; pass false to turn it off. get_fact by exact key is not filtered; list_facts_by_key_prefix lists only feed comms whose key epoch is at or after the moment blind turned on (this run's own feed). | |
| scope | No | Optional project slug (project:<slug>:*). The handed-back closing and opening notes are then chosen the way wake_status(scope=...) checks them: project:<slug>:agent:<id>:self-note:* or the global agent:<id>:self-note:*, newest wins. It also becomes the session's workspace scope, as switch_workspace(<slug>) does, so later wake_status() and load_context() use it too. Defaults to the session's workspace scope. Without any scope the newest note is labelled with its project and other projects' notes are listed by key. | |
| agent_id | Yes | Agent identity slug (e.g. 'emily_code_4.7'). Empty string clears the binding. | |
| blind_since | No | Optional, with blind=true: the blind start in unix epoch seconds (a fitting passes its FITTING_STARTED_EPOCH); list_facts_by_key_prefix then hides feed comms keyed before it, and it must lie within 24 h before and 300 s after the server clock. Default: the session's start minus 60 s. On an already-blind session the earlier start is kept. |