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

# Memories

> Use the experimental Laravel Copilot SDK ServerRpc memories.import API to validate semantic memory JSONL and import the records.

## Memories

Scope: ServerRpc (server-wide operations tied to the Client)

For an overview of RPC and the list of all RPC pages, see [RPC](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc.md).

## memories.import (experimental)

`memories()->import()` validates semantic memory JSONL and stores the records according to the server's account and repository policies. Pass the whole input as `jsonl` and the directory the memory service uses as `workingDirectory`. You can set `onConflict` to `skip` or `error`.

With `dryRun: true`, the SDK only validates the input and sends no records. To import for real, pass `dryRun: false`.

```php theme={null}
use Revolution\Copilot\Facades\Copilot;
use Revolution\Copilot\Types\Rpc\MemoriesImportParams;

// memories.import
$result = Copilot::client()->rpc()->memories()->import(new MemoriesImportParams(
    jsonl: $jsonl, // Full contents of the semantic memory JSONL
    workingDirectory: '/path/to/project',
    dryRun: true,
    onConflict: 'skip',
));

// $result->ok, $result->code, $result->message, $result->dryRun
// $result->imported holds the total / imported / skipped / failed counts
// $result->diagnostics holds the validation results, $result->records the result of each record in input order
```

Each diagnostic contains `line`, `code`, `message` and an optional `externalId`. Each record result also contains `status`. You can also pass the arguments as an array.


## Related topics

- [Session memory](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/session-memory.md)
- [SessionConfig](https://kawax.biz/en/packages/laravel-copilot-sdk/session-config.md)
- [SessionRpc overview](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/session-overview.md)
- [October 2026 Laravel updates](https://kawax.biz/en/blog/changelog/202610.md)
- [ServerRpc overview](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/server-overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.