diff --git a/docs/base-app/agents/getting-started.mdx b/docs/base-app/agents/getting-started.mdx index c6730c066..df1d9e127 100644 --- a/docs/base-app/agents/getting-started.mdx +++ b/docs/base-app/agents/getting-started.mdx @@ -35,17 +35,17 @@ This example shows how to create an agent that sends a message when it receives ```ts [Node] import { Agent } from '@xmtp/agent-sdk'; -// 2. Spin up the agent +// 1. Spin up the agent const agent = await Agent.createFromEnv({ env: 'production', // base app works only on production }); -// 3. Respond to text messages +// 2. Respond to text messages agent.on('text', async (ctx) => { await ctx.sendText('Hello from my Base App Agent! 👋'); }); -// 4. Log when we're ready +// 3. Log when we're ready agent.on('start', () => { console.log(`Waiting for messages...`); console.log(`Address: ${agent.address}`); @@ -92,4 +92,4 @@ Give your agent a human-readable name: For the complete guide, visit [XMTP documentation](https://docs.xmtp.org/agents/get-started/build-an-agent) - \ No newline at end of file +