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

# ADK Artifact Storage

> How artifact service backends are selected in the ADK plugin.

The ADK plugin selects an artifact storage backend at initialization time based on whether a
database connection is available.

## In-Memory Backend

* Default when no database connection is configured.
* Best for local development and stateless testing.
* Artifact data is lost on process restart.

## Database Backend

* Used when a database connection is available.
* Best for production deployments where artifacts must survive restarts or be shared across
  instances.
* Requires `POSTGRES_URL` to be configured.

## Artifact Namespaces

Artifact scope is controlled by the filename prefix used when saving via `ctx.artifact_service`:

| Prefix     | Scope                                                  |
| ---------- | ------------------------------------------------------ |
| `user:...` | User-scoped — shared across all sessions for this user |
| *(none)*   | Session-scoped — private to the current context        |

For how to save and declare artifacts during agent execution, see [Streaming API](./streaming-api).
