> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/diarkis-modules/dm.md).

# DM (Direct Message) モジュール

## 概要

Diarkis DM（Direct Message）は、二人のユーザーが自由にパケットを交換できる機能を提供します。ユーザーがどのタイプのルームにも参加する必要はなく、受信者のユーザー ID を指定してメッセージを送信するだけです。つまり、他のユーザーのユーザー ID を知っていれば、直接通信を行うために他のユーザーを検索する必要はありません。

このモジュールは一対一の通信を目的としており、複数のユーザーにメッセージを送信することもできますが、通常は推奨されません。複数のユーザーにメッセージを送受信する必要がある場合は、Diarkis Room や他の類似モジュールを使用することを検討してください。

Diarkis P2P とは異なり、Diarkis DM はサーバーをユーザー間のハブとして使用します。これはサーバー・リレーであり、ユーザー間のメッセージを配信するために複数のサーバ（最大二つのサーバー）を介してメッセージを送信することができます。このため、非常に低遅延で高頻度のメッセージ交換が必要な場合には、Diarkis DM の使用は理想的ではありません。

詳細な技術情報については、[こちらの API リファレンス](https://docs.diarkis.io/docs/server/current/diarkis/dm/index.html)をご覧ください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.diarkis.io/diarkis-modules/dm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
