Skip to content

Documentation / @agentick/core / InboxStorage

Interface: InboxStorage ​

Defined in: core/src/app/types.ts:341

Storage adapter for durable external message delivery.

External producers write messages to the inbox; sessions self-subscribe and process. The default MemoryInboxStorage is always-on with zero overhead until the first write. Swap to postgres/redis for durability.

Same pattern as SessionStore: interface in core, memory impl in core, external backends in their own packages.

Methods ​

markDone() ​

markDone(sessionId, messageId): Promise<void>

Defined in: core/src/app/types.ts:347

Mark a message as done (processed). Idempotent.

Parameters ​

sessionId ​

string

messageId ​

string

Returns ​

Promise<void>


pending() ​

pending(sessionId): Promise<InboxMessage[]>

Defined in: core/src/app/types.ts:345

Get all pending messages for a session (FIFO order).

Parameters ​

sessionId ​

string

Returns ​

Promise<InboxMessage[]>


sessionsWithPending() ​

sessionsWithPending(): Promise<string[]>

Defined in: core/src/app/types.ts:351

List session IDs that have pending messages.

Returns ​

Promise<string[]>


subscribe() ​

subscribe(sessionId, cb): () => void

Defined in: core/src/app/types.ts:349

Subscribe to new messages for a session. Returns unsubscribe function.

Parameters ​

sessionId ​

string

cb ​

() => void

Returns ​

(): void

Returns ​

void


write() ​

write(sessionId, message): Promise<string>

Defined in: core/src/app/types.ts:343

Write a message to a session's inbox. Returns assigned message ID.

Parameters ​

sessionId ​

string

message ​

InboxMessageInput

Returns ​

Promise<string>

Released under the ISC License.