> ## 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

> db: API reference for db

# db

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**db**](../modules/db) module.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def db(configOrUrl: string | DbConfig = { type: 'memory' }) -> DbAdapter
```

### Returns

<ResponseField name="Returns" type="DbAdapter">
  The result of the operation.
</ResponseField>

## Uses

* `parseDbUrl`
* `createDbAdapter`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-ts/src/db/index.ts#L136">
  `src/db/index.ts` at line 136
</Card>

***

## 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>
