Skip to main content
The manual door has no automatic post-run extraction - the tools are the capture mechanism. For hand-placed prompts AND ALWAYS-mode extraction, capture_hook() returns a post_hooks-compatible callable around the machine’s capture pass (backgrounded on the agent’s executor). An escape hatch, not a third shape.
always_capture.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run PgVector

5

Run the example

Save the code above as always_capture.py, then run:
Full source: cookbook/08_learning/11_composition/always_capture.py