Skip to main content
Configure SurrealDB with its client, URL, credentials, namespace, and database instead of a SQL connection string. Local defaults match ./cookbook/scripts/run_surrealdb.sh.
surreal.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run SurrealDB

5

Run the example

Save the code above as surreal.py, then run:
Full source: cookbook/05_agent_os/02_databases/surreal.py