Skip to content

SQLite Adapter

The SQLite Adapter provides embedded database functionality, ideal for development and single-instance deployments.

Installation

  1. Install required packages:
    Terminal window
    npm i github:elizaos-plugins/adapter-sqlite

Basic Setup

import { AgentBuilder } from "@iqai/agent";
import SqliteAdapter from "@elizaos/adapter-sqlite";
const databaseAdapter = new SqliteDatabaseAdapter();
const agent = new AgentBuilder()
.withDatabase(databaseAdapter)
// ... other configuration
.build();

Key Features

  • โœ”๏ธ Built-in caching
  • โœ”๏ธ BLOB storage support
  • โœ”๏ธ Zero setup requirements

Collections Structure

The adapter automatically manages these collections:

  • rooms
  • participants
  • accounts
  • memories
  • knowledge

Additional metadata is stored as JSON within these collections.

Best Practices

  • โœ”๏ธ Use for development and testing
  • โœ”๏ธ Monitor database file size