Skip to main content
Two sub-agents under the hood so the read path never sees the write engine. This cookbook uses a fresh SQLite file seeded with a contacts table, round-trips one insert through update_<id>, then reads it back with query_<id>.
database_read_write.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as database_read_write.py, then run:
Full source: cookbook/12_context/04_database_read_write.py