Skip to main content
POST
Owner/admin update of a live Mnemom Agent session's goal contract

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Path Parameters

conversationId
string
required

The conversation id the CLI launched the session with.

Query Parameters

agent_id
string
required

The agent record id (agents.id) the session ran as.

org_id
string

Target organization (defaults to the caller's primary org).

Body

application/json
contract
object
required

The full new goal contract (replaces the live one under the same goal id). Every ceiling (max_turns, budget_usd, stall_turns, time_limit_s) follows replace semantics: one omitted here is removed, not kept. Only mode carries over when omitted.

expected_hash
string

Optimistic-concurrency guard: the hash the caller last read. A live contract that has moved past it is a 409 version_conflict.

expected_version
number

Optimistic-concurrency guard: the version the caller last read (alternative to expected_hash).

Response

The contract was updated. Returns the new version and both hashes.

conversation_id
string
required
agent
object
required
org_id
string
required
contract
any
required

The new contract exactly as the gateway normalised and stored it.

version
integer
required

The new contract version.

hash
string
required

The new contract's hash.

previous_hash
string | null
required

The prior version's hash (updated_from).

sealed_at
string<date-time>
required