Anthropic::BetaDreams
Dreams API resource (beta / research preview).
An asynchronous memory-consolidation job that reads a memory store plus
session transcripts and writes consolidated memories into a new output
memory store. Dream endpoints require both beta headers (auto-attached):
managed-agents-2026-04-01 and dreaming-2026-04-21. Research-preview
access must be requested separately; without it the API returns 404.
dream = client.beta.dreams.create(
inputs: [
Anthropic::BetaDreamMemoryStoreInput.new("memstore_abc"),
Anthropic::BetaDreamSessionsInput.new(["sess_1", "sess_2"]),
],
model: "claude-opus-4-7",
instructions: "Consolidate project facts",
)
dream = client.beta.dreams.retrieve(dream.id)
Constructors
new(client : Client)
SourceInstance methods
Cancel a Dream that is still pending or running.
create(inputs : Array(BetaDreamInput | Hash(String, JSON::Any)), model : String | BetaDreamModelConfig | Hash(String, JSON::Any), instructions : String | Nil = nil, betas : Array(String) = [] of String) : BetaDream
Create a Dream.
model may be a bare model id string or a BetaDreamModelConfig /
hash with id (and optional speed).
list(created_at_gt : String | Nil = nil, created_at_lt : String | Nil = nil, include_archived : Bool | Nil = nil, limit : Int32 = 20, page : String | Nil = nil, statuses : Array(String) | Nil = nil, betas : Array(String) = [] of String) : BetaDreamListResponse
List Dreams.
created_at_gt / created_at_lt are exclusive RFC 3339 bounds.
statuses filters by lifecycle status (repeatable query param).