You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/agents/build-agents/create-a-client.mdx
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
-
# Create a client
1
+
# Create an XMTP agent
2
2
3
-
Create an XMTP client that connects your agent to the XMTP network. The client handles authentication, encryption, and message delivery. Your agent's logic (brain) is separate. The client just gives it the ability to send and receive messages.
4
-
5
-
A [signer](/chat-apps/core-messaging/create-a-signer) links the client to an EOA or SCW wallet, which serves as your agent's identity on the network.
3
+
Create an XMTP agent that can use the signing capabilities provided by the [signer](/chat-apps/core-messaging/create-a-signer). This signer links the agent to the appropriate EOA or SCW.
6
4
7
5
## Create an EOA signer
8
6
@@ -35,7 +33,7 @@ The XMTP Agent SDK allows you to use environment variables (`process.env`) for e
35
33
|`XMTP_ENV`| XMTP network environment (`local`, `dev`, or `production`) |`XMTP_ENV=dev` or `XMTP_ENV=production`|
36
34
|`XMTP_DB_ENCRYPTION_KEY`| Database encryption key for the local database (32 bytes, hex) |`XMTP_DB_ENCRYPTION_KEY=0xabcd...1234`|
37
35
38
-
Using environment variables, you can connect your agent to XMTP in just a few lines of code:
36
+
Using the environment variables, you can set up your agent in just a few lines of code:
39
37
40
38
## Generate random keys
41
39
@@ -64,7 +62,7 @@ yarn gen:keys
64
62
// Load variables from .env file
65
63
process.loadEnvFile('.env');
66
64
67
-
//Connect to XMTP using environment variables
65
+
//Create agent using environment variables
68
66
const agent =awaitAgent.createFromEnv();
69
67
```
70
68
@@ -142,7 +140,7 @@ loggingLevel?: LogLevel;
142
140
143
141
## Create a smart contract wallet (SCW) signer
144
142
145
-
When working with smart contract wallets, you can connect your agent to XMTP using the wallet's seed or private key:
143
+
When working with smart contract wallets, you can create an XMTP agent using the wallet's seed or private key:
0 commit comments