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

> Laravel Copilot SDK의 ServerRpc에서 시맨틱 메모리 JSONL을 검증하고 가져오는 실험적 memories.import의 사용 예시입니다.

## Memories

대상: ServerRpc (Client에 연결된 서버 전체 작업)

RPC 전체 개요와 페이지 목록은 [RPC](https://kawax.biz/ko/packages/laravel-copilot-sdk/rpc.md)를 참조하세요.

## memories.import (experimental)

`memories()->import()`는 시맨틱 메모리 JSONL을 검증하고, 서버의 계정·저장소 정책에 따라 레코드를 저장합니다. `jsonl`에는 입력 전체를, `workingDirectory`에는 메모리 서비스가 사용할 디렉터리를 지정합니다. `onConflict`에는 `skip` 또는 `error`를 지정할 수 있습니다.

`dryRun: true`에서는 검증만 수행하고 레코드를 전송하지 않습니다. 실제로 가져오려면 `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, // 시맨틱 메모리 JSONL의 전체 내용
    workingDirectory: '/path/to/project',
    dryRun: true,
    onConflict: 'skip',
));

// $result->ok, $result->code, $result->message, $result->dryRun
// $result->imported는 total / imported / skipped / failed 건수
// $result->diagnostics는 검증 결과, $result->records는 입력 순서대로의 각 레코드 결과
```

각 진단에는 `line`, `code`, `message`, 선택적인 `externalId`가 포함됩니다. 각 레코드의 결과에는 이에 더해 `status`가 포함됩니다. 인수는 배열로도 지정할 수 있습니다.


## Related topics

- [세션 메모리](https://kawax.biz/ko/packages/laravel-copilot-sdk/rpc/session-memory.md)
- [ServerRpc 개요](https://kawax.biz/ko/packages/laravel-copilot-sdk/rpc/server-overview.md)
- [SessionConfig](https://kawax.biz/ko/packages/laravel-copilot-sdk/session-config.md)
- [2026년 10월 Laravel 업데이트](https://kawax.biz/ko/blog/changelog/202610.md)
- [해시(Hashing)](https://kawax.biz/ko/hashing.md)


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