# Notes

> Local notes on an asset, a resident or a session through note.get and note.set, their limit, and where they can be set at creation.

Notes are optional local remarks attached to an asset, a desk resident, or an agent session. Users view and edit them in Pixling under **Notes**, grouped into **This one**, **Field Guide**, and (when a session is bound) **Conversation**.

> [!NOTE]
> **Notes are remarks, not prompts**
> Pixling never treats notes as instructions or generation input. They stay local on your Mac.

## Scopes

Every `note.get` and `note.set` call targets one of three scopes:

| `scope` | `to` | Belongs to |
| --- | --- | --- |
| `asset` | A library `No.N` or exact name | The asset, shared by every copy of it |
| `entity` | One resident (not `auto` or `everyone`) | That individual resident on the desk |
| `session` | Only `client:<namespace>/<key>` | The `resident.ensure` binding, including retained and stowed bindings |

Any other `scope`/`to` combination is refused with `invalidArguments` on `to`.

## MCP: `pixling_note_get` and `pixling_note_set`

```json title="MCP request (pixling_note_set)"
{
  "scope": "session",
  "to": "client:my-agent/conversation-1",
  "note": "Reviews pull requests"
}
```

```json title="MCP result"
{
  "scope": "session",
  "target": "client:my-agent/conversation-1",
  "note": "Reviews pull requests"
}
```

- **`note.get`**: Requires `scope` and `to`.
- **`note.set`**: Requires `scope`, `to`, and `note` (a string). Passing an empty string clears the note. Because `note.set` replaces the entire note, it is annotated as destructive.
- **Return shape**: Both return `{scope, target, note}`, where `target` is the resolved identifier: the asset ID, the resident's entity ID, or `client:<namespace>/<key>`.

**Limits and permissions:**

- **Length limit**: Up to **200 characters**, counted as extended grapheme clusters rather than bytes or Unicode code points. A Japanese character or composed emoji counts as 1.
- **Characters**: Newline and tab are allowed; other control characters are refused.
- **Errors and ownership**: An unknown target returns `targetNotFound`. Writing the `entity` note of a resident bound by another client follows the standard [binding rules](/docs/connect/own-a-resident/).

## Setting a note at creation

You can also attach a note when summoning, binding, or adopting:

| Operation field | Sets | CLI flag |
| --- | --- | --- |
| `resident.summon.note` | The new resident's `entity` note | `resident summon --note` |
| `resident.ensure.note` | The `session` note | `resident ensure --note` |
| `resident.ensure.initial.note` | The new resident's `entity` note | `resident ensure --initial-note`, or `initial.note` in `--initial` JSON (not both) |
| `import.adopt.note` | The `asset` note, on first adoption | `import adopt --note` |

> [!CAUTION]
> **Creation-only fields never overwrite later edits**
> Both `resident.ensure` note fields apply only when the binding is created; a replay or lookup leaves later edits intact. Likewise, retries of `import.adopt` and reopened replacements keep the saved asset note. To edit or clear any note afterwards, call `note.set`.

## CLI: `pixling note`

```sh title="Terminal"
pixling note get --scope entity --to 'No.7#1'
pixling note set --scope session --to 'client:my-agent/conversation-1' --note 'Reviews pull requests'
pixling note set --scope asset --to No.7 --note ''
```

`--scope` and `--to` map directly to `scope` and `to`; `note set` requires `--note`. Human output prints one line (`SCOPE TARGET: NOTE`), and `--json` prints the `{scope, target, note}` document.

## Related

- [Resident binding](/docs/reference/resident-binding/): Attach session notes and initial entity notes with resident.ensure.
- [Import](/docs/reference/import/): Attach an asset note when adopting a custom resident with import.adopt.
