# Private Messaging

Private messaging on COTI combines encrypted on-chain messages, a TypeScript SDK, a reward system for message activity, and onboarding flows for newly created wallets.

In this section you will find:

* an overview of the [`@coti-io/coti-sdk-private-messaging`](/coti-documentation/private-messaging/typescript-sdk.md) package
* a copy-paste [quickstart](/coti-documentation/private-messaging/quickstart.md) for sending and receiving the first private message
* a receiver-side [dogfood report template](/coti-documentation/private-messaging/private-messaging-dogfood-report.md)
* guides for [sending and reading messages](/coti-documentation/private-messaging/messages.md)
* documentation for the [reward epoch system](/coti-documentation/private-messaging/rewards.md)
* documentation for the [starter grant flow](/coti-documentation/private-messaging/starter-grant.md)
* installable agent [skills](/coti-documentation/private-messaging/skills.md) (Cursor `SKILL.md` layout; standalone agents must inject the same text yourself)

## How private messaging works

The private messaging system stores encrypted message bodies on-chain while keeping routing metadata queryable.

* the message body is encrypted using COTI-compatible encryption before it is sent
* only the sender and recipient can decrypt the message content
* routing metadata such as `from`, `to`, `timestamp`, and `epoch` remains public
* long messages are automatically split into multiple encrypted chunks
* message activity contributes usage units that can later earn rewards

## Available agent skills

If you want agents to use private messaging through a reusable workflow instead of a custom one-off prompt, install one of these skills:

* `coti-private-messaging`: default setup + messaging skill; can bootstrap wallet/AES/gas readiness, then send encrypted messages, read inbox and sent history, and inspect message metadata
* `coti-rewards-management`: inspect epochs, check pending rewards, fund epochs, and claim rewards
* `coti-starter-grant`: optional grant-only troubleshooting flow for first-use gas

In Cursor, copy the skill folders under `.cursor/skills/` and then prompt the agent with the skill name directly, for example:

```
Use the coti-private-messaging skill to send a private message to <wallet-address>.
```

Standalone agents do not auto-load `SKILL.md`; they must read and inject the same skill text through their own prompt/bootstrap layer.

## What to read next

If you want the shortest working path, start with [Private Messaging Quickstart](/coti-documentation/private-messaging/quickstart.md).

If you want to measure receiver-side integration friction, use the [Private Messaging Dogfood Report](/coti-documentation/private-messaging/private-messaging-dogfood-report.md).

If you want to build with the SDK after that, continue with [TypeScript SDK](/coti-documentation/private-messaging/typescript-sdk.md).

If you want to understand the messaging flow itself, continue with [Sending and Reading Messages](/coti-documentation/private-messaging/messages.md).

If you want to use the agent workflows, go to [Skills](/coti-documentation/private-messaging/skills.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coti.io/coti-documentation/private-messaging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
