> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# DB • TypeScript AI Agent SDK

> * Database Module - Exports for persistence layer

# db

<Badge color="green">TypeScript AI Agent</Badge>

* Database Module - Exports for persistence layer
* Usage (Python-like simplicity):
  import \{ db } from 'praisonai';
* const agent = new Agent(\{
  instructions: "You are helpful",
  db: db("sqlite:./data.db"),  // URL-style string
  sessionId: "my-session"
  });

## Import

```typescript theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { db } from 'praisonai';
```

## Functions

<CardGroup cols={2}>
  <Card title="createDbAdapter()" icon="function" href="../functions/createDbAdapter">
    Function definition.
  </Card>

  <Card title="getDefaultDbAdapter()" icon="function" href="../functions/getDefaultDbAdapter">
    Function definition.
  </Card>

  <Card title="setDefaultDbAdapter()" icon="function" href="../functions/setDefaultDbAdapter">
    Function definition.
  </Card>

  <Card title="db()" icon="function" href="../functions/db">
    Function definition.
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="JS Database" icon="database" href="/docs/js/database" />

  <Card title="JS NL Postgres" icon="database" href="/docs/js/nl-postgres" />
</CardGroup>
