Skip to main content
This guide walks through the full learning loop: query memories, augment a prompt, record a trace, and submit a review.
1

Create a client

You need an API key and project ID from the Reflect console.
2

Run the learning loop

The client.trace() context manager handles the full loop in one block - it queries memories on entry, and auto-submits the trace with the correct retrieved_memory_ids on exit:
If no memories exist yet, ctx.augmented_task returns the original task unchanged.
3

Query memories again

The generated reflection now appears in future queries:
Feedback text is typically attached by judge workflows or through the platform review UI. SDK/API calls usually submit only the review result (pass or fail).
See Traces and reviews for decorator and explicit call patterns.