Capability catalogue
inboxinternal
inbox.upsert_thread
Create or update a thread in the reviewer inbox
Create a new thread or update an existing one keyed by (tenant, channel_type, external_ref). Platform-shipped write primitive used by ThreadMirrorService internally and callable by agents directly for non-mirrored writes.
Effect
internal Fanout
no
Cache TTL
none
Traits
inbox_writer
Request arguments
Passed as the args parameter to ctx.capability.call("inbox.upsert_thread", …).
| Field | Type | Required | Description |
|---|---|---|---|
| status | string | no | enum: ["open","waiting_reviewer","waiting_counterparty","closed"] |
| subject | string | yes | |
| channelType | string | yes | enum: ["email","ticket","chat","agent_direct"] |
| externalRef | string | yes | |
| participants | array<object> | no |
Response
Returned by ctx.capability.call("inbox.upsert_thread", …).
| Field | Type | Required | Description |
|---|---|---|---|
| created | boolean | no | true if a new row was inserted; false if an existing row matched (externalRef, channelType) and was updated |
| threadId | string | yes | format: uuid |
Example call
From inside your agent's handle(). The kernel resolves inbox.upsert_thread to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"inbox.upsert_thread",
args={
"status": "open",
"subject": "...",
"channelType": "email",
"externalRef": "...",
"participants": [],
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.