Skip to content

Commit 3fea2b8

Browse files
committedJan 23, 2025
polished readmes
1 parent 55c2af9 commit 3fea2b8

File tree

5 files changed

+91
-139
lines changed

5 files changed

+91
-139
lines changed
 

‎CODE_OF_CONDUCT.md

+27
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,33 @@ Instances of abusive, harassing, or otherwise unacceptable behavior can be repor
3838

3939
Community moderators who do not follow or enforce the code of conduct in good faith may face temporary or permanent repercussions as determined by other community moderators.
4040

41+
## Guidelines for agents
42+
43+
Agents are a framework for building AI agents that work seamlessly within the Converse Messenger platform built with XMTP.
44+
45+
Today, agents can easily become untrustworthy members of group chats. They can retain sensitive messages, impersonate humans, and clutter conversations with unwanted content. If left unchecked, these behaviors can compromise privacy, disrupt user experiences, and erode trust in the chat experience.
46+
47+
To ensure safe, private, and trustworthy chat experiences, agents follow a set of trusted principles that determine how they can behave in group conversations with the goal of protecting users and ensuring the long-term health of the XMTP ecosystem.
48+
49+
These principles create a safe foundation that we may thoughtfully expand over time as security and privacy features evolve.
50+
51+
### The trusted principles
52+
53+
Agents built with XMTP follow the trusted principles detailed here. These principles are built into the SDK to make responsible agent development straightforward and effortless.
54+
55+
- **Agents should't read messages in groups** and can only read explicit calls, such as `/help` or `@bot`. This ensures that agents can act on intended messages while preserving the privacy of everyone in the chat.
56+
- **Agents can't send unprompted messages** and can only send messages in response to explicit calls. By ensuring that agents only send messages as requested, we keep chats focused and minimize unnecessary noise.
57+
- **Agents can't join chats as members**: Agents can't _join_ chats and can only be _connected_ to a chat by a human member. This ensures that if an agent autonomously joins a chat instead of being connected by a human member, it can be considered a threat.
58+
- **Agents must identify as agents in chats**, both _visually_ and _programmatically_. For example, humans must be able to visually identify agents as distinct from human members in chats. If an agent appears as a human member, it can be considered a threat.
59+
60+
### For everyone and for the long-term
61+
62+
We understand that these principles upheld by XMTP may seem restrictive and could limit some of the more engaging or interactive agent features developers might want to implement. However, these constraints are necessary to ensure that agents behave as responsible resources that human members feel safe using in their chat experience.
63+
64+
While malicious developers could find ways to circumvent these trusted principles in the short term, let's work together to build a secure, private, and trustworthy messaging ecosystem for everyone and for the long term.
65+
66+
By building agents that uphold these principles, you help set a standard for trust in group chat experiences, ensuring that agents remain a helpful, not harmful, part of the conversation.
67+
4168
## Attribution
4269

4370
The XMTP code of conduct is adapted from the Contributor Covenant, [version 2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html) and [version 1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).

‎GUIDELINES.md

-26
This file was deleted.

‎README.md

+27-21
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22

33
[![GitHub release](https://img.shields.io/github/release/ephemerahq/xmtp-agents.svg)](https://github.com/huggingface/smolagents/releases)
44
[![MIT License](https://img.shields.io/github/license/ephemerahq/xmtp-agents)](https://github.com/ephemerahq/xmtp-agents/blob/main/LICENSE)
5-
[![Number of GitHub stars](https://img.shields.io/github/stars/ephemerahq/message-kit?logo=github)](https://github.com/ephemerahq/message-kit)
65

76
<img src="media/logo.png" alt="Logo" width="60" />
87

98
# xmtp-agents
109

1110
</div>
1211

13-
`xmtp-agents` is a library for building secure, and interoperable agents that use the [XMTP](https://xmtp.org/) protocol.
12+
[`@xmtp/agent-starter`](https://github.com/ephemeraHQ/xmtp-agents/tree/main/packages/agent-starter).
13+
is a library for building agents that communicate in a secure and interoperable way over the [XMTP](https://xmtp.org/) network.
1414

1515
#### Why XMTP?
1616

17-
- **End-to-end & compliant**: Servers and clients only see ciphertext, meeting strict security and regulatory standards.
17+
- **End-to-end & compliant**: The server only sees ciphertext, meeting strict security and regulatory standards.
1818
- **Open-source & trustless**: Built on top of the [MLS](https://messaginglayersecurity.rocks/) protocol, it replaces trust in centralized certificate authorities with cryptographic proofs.
19-
- **Privacy & metadata protection**: Offers anonymous or pseudonymous usage with no tracking of timestamps, routes, IPs, or device info.
19+
- **Privacy & metadata protection**: Offers anonymous or pseudonymous usage with no tracking of sender routes, IPs, or device and message timestamps.
2020
- **Decentralized**: Operates on a peer-to-peer network, eliminating single points of failure.
21-
- **Groups**: Allows multi-agent (or multi-human) or both with group chats with access control and secure collaboration.
21+
- **Multi-tenant**: Allows multi-agent multi-human confidential communication over MLS group chats.
2222

23-
## Setup
23+
> See [FAQ](https://docs.xmtp.org/intro/faq) for more detailed information.
2424
25-
This library is based on [`@xmtp/agent-starter`](https://github.com/ephemeraHQ/xmtp-agents/tree/main/packages/agent-starter).
25+
## Setup
2626

2727
```bash
2828
yarn add @xmtp/agent-starter
@@ -74,7 +74,7 @@ main().catch(console.error);
7474

7575
#### Address availability
7676

77-
Returns `true` if an address has XMTP enabled
77+
Returns `true` if an address is reachable on the xmtp network
7878

7979
```typescript
8080
const isOnXMTP = await agent.canMessage(address);
@@ -115,7 +115,7 @@ await group.sync();
115115
await group.addMembers([0xaddresses]);
116116
```
117117

118-
> To learn more about groups, read the [XMTP documentation](https://docs.agent.org/inboxes/group-permissions).
118+
> To learn more about groups, read the [XMTP documentation](https://docs.xmtp.org).
119119
120120
## Message handling
121121

@@ -151,35 +151,41 @@ const onMessage = async (message: Message) => {
151151

152152
### Sending messages
153153

154-
Use `agent.send()` for different message types.
154+
When you build an app with XMTP, all messages are encoded with a content type to ensure that an XMTP client knows how to encode and decode messages, ensuring interoperability and consistent display of messages across apps.
155155

156-
#### Text messages
156+
### Text
157+
158+
Sends a text message.
157159

158160
```tsx
159-
await agent.send({
160-
message: "Hello from xmtp-agents!",
161+
let textMessage: agentMessage = {
162+
message: "Your message.",
161163
receivers: ["0x123..."], // optional
162164
originalMessage: message, // optional
163-
});
165+
};
166+
await agent.send(textMessage);
164167
```
165168

166-
#### Agent messages
169+
### Agent message
167170

168-
Agent messages can contain metadata, enabling structured communication between agents:
171+
Allows to send structured metadata over the network that is displayed as plain-text in ecosystem inboxes.
169172

170173
```tsx
171-
await agent.send({
172-
message: "Transaction request",
174+
let agentMessage: agentMessage = {
175+
message: "Would you like to approve this transaction?",
173176
metadata: {
174177
amount: "10",
175178
token: "USDC",
176179
},
177-
receivers: ["0x123..."],
178-
originalMessage: message,
180+
receivers: ["0x123..."], // optional
181+
originalMessage: message, // optional
179182
typeId: "agent_message",
180-
});
183+
};
184+
await agent.send(agentMessage);
181185
```
182186

187+
> See [content-types](https://github.com/xmtp/xmtp-js/tree/main/content-types/content-type-reaction) for reference
188+
183189
## Web inbox
184190

185191
Interact with the XMTP protocol using [xmtp.chat](https://xmtp.chat) the official web inbox for developers using the latest version powered by MLS.

‎THESIS.md

-70
This file was deleted.

0 commit comments

Comments
 (0)