Skip to content

Commit 1addc39

Browse files
authored
fix(docs): nudge folks to use ESM in quickstart (#1292)
1 parent 8e4298e commit 1addc39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/quickstart.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
"source": [
7070
"## Making your first agent using LangGraph\n",
7171
"\n",
72-
"Create a file named `agent.ts` (short for Reason + Act Agent) and add the below TypeScript code to it.\n",
72+
"Create a file named `agent.mts` (short for Reason + Act Agent) and add the below TypeScript code to it.\n",
7373
"\n",
7474
"Make sure you update the environment variables at the top of the file to contain your API keys. If you don't, the OpenAI and Tavily API calls will produce errors and your agent will not work correctly.\n",
7575
"\n",
7676
"Once you've added your API keys, save the file and run the code with the following command:\n",
7777
"\n",
7878
"```bash\n",
79-
"npx tsx agent.ts\n",
79+
"npx tsx agent.mts\n",
8080
"```"
8181
]
8282
},
@@ -114,7 +114,7 @@
114114
}
115115
],
116116
"source": [
117-
"// agent.ts\n",
117+
"// agent.mts\n",
118118
"\n",
119119
"// IMPORTANT - Add your API keys here. Be careful not to publish them.\n",
120120
"process.env.OPENAI_API_KEY = \"sk-...\";\n",
@@ -224,13 +224,13 @@
224224
"code creates an agent with the same behavior as the example above, but you can\n",
225225
"clearly see the execution logic and how you could customize it.\n",
226226
"\n",
227-
"Update the code in your `agent.ts` file to match the example below. Once again, be sure to update\n",
227+
"Update the code in your `agent.mts` file to match the example below. Once again, be sure to update\n",
228228
"the environment variables at the top.\n",
229229
"\n",
230230
"After you've updated your environment variables and saved the file, you can run it with the same command as before:\n",
231231
"\n",
232232
"```bash\n",
233-
"npx tsx agent.ts\n",
233+
"npx tsx agent.mts\n",
234234
"```"
235235
]
236236
},
@@ -240,7 +240,7 @@
240240
"metadata": {},
241241
"outputs": [],
242242
"source": [
243-
"// agent.ts\n",
243+
"// agent.mts\n",
244244
"\n",
245245
"// IMPORTANT - Add your API keys here. Be careful not to publish them.\n",
246246
"process.env.OPENAI_API_KEY = \"sk-...\";\n",

0 commit comments

Comments
 (0)