Skip to main content

Setup

The example uses OpenAI for embeddings and the agent model, so set your API key:
or

Example

agent_with_knowledge.py

Async Support ⚡

SurrealDB also supports asynchronous operations, enabling concurrency and leading to better performance.

async_surrealdb_db.py
Using ainsert() and aprint_response() with asyncio provides non-blocking operations, making your application more responsive under load.

SurrealDB Params