agent_desk

Edit Learning Statement

"Edit": reword what a memory SAYS, without touching what the AgentDesk answers.

The sentence and the document are different objects, and this endpoint only reaches the first. A learning's statement is byte-equal to its version's change_summary by contract, so _set_learning_statement rewrites both together; an automatic site update carries no such contract (its change_summary is the compiler's, not the owner's) so only the block moves.

The edit is STAMPED inside the block (edited_by / edited_at) rather than left invisible: a ledger whose sentences can be rewritten silently is a ledger a support thread cannot reason about, and the stamp is the difference between "the AgentDesk said this" and "somebody rewrote what the AgentDesk said".

THE JSONB TRAP, written down because it has bitten this codebase twice: the column has no mutation tracking, so a nested in-place edit is a change SQLAlchemy never flushes. Every write below builds a NEW dict and reassigns the attribute.

Refusals: 400 a malformed id or an empty statement · 404 not this AgentDesk's memory · 409 the version carries no memory to reword.

patch/api/domains/{domain_id}/agent-desk/learnings/{version_id}

Request

  • Base URL
    https://api-v1.unusual.ai (the document declares no server; this is the origin it was published from)
  • Auth
    OAuth 2
    Password
    Token URL: /auth/login

Path parameters

version_idstring required
domain_idstring required

Headers

x-view-asstring nullable

Request body

statementstring required

Response

Successful Response

version_idstring required
kindstring required
statementstring required
detailstring required

Changes

No recorded changes to this operation across all 1 revision of this API.