Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 1.98 KB

README.md

File metadata and controls

54 lines (34 loc) · 1.98 KB

XMTP agent examples

This repository contains examples of agents that use the XMTP network.

Why XMTP?

  • End-to-end & compliant: Data is encrypted in transit and at rest, meeting strict security and regulatory standards.
  • Open-source & trustless: Built on top of the MLS protocol, it replaces trust in centralized certificate authorities with cryptographic proofs.
  • Privacy & metadata protection: Offers anonymous or pseudonymous usage with no tracking of sender routes, IPs, or device and message timestamps.
  • Decentralized: Operates on a peer-to-peer network, eliminating single points of failure.
  • Multi-agent: Allows multi-agent multi-human confidential communication over MLS group chats.

See FAQ for more detailed information.

Environment variables

To run your XMTP agent, you must create a .env file with the following variables:

WALLET_KEY= # the private key of the wallet
ENCRYPTION_KEY= # encryption key for the local database

You can generate random keys with the following command:

yarn gen:keys

Warning

Running the gen:keys script will overwrite the existing .env file.

Examples

  • gm: A simple agent that replies to all text messages with "gm".
  • gpt: An example using GPT API's to answer messages.
  • gated-group: Add members to a group that hold a certain NFT.

See all the available examples.

Integrations

Examples integrating XMTP with external libraries from the ecosystem

  • grok: Integration to Grok API

Web inbox

Interact with the XMTP network using xmtp.chat, the official web inbox for developers.

Warning

This React app isn't a complete solution. For example, the list of conversations doesn't update when new messages arrive in existing conversations.