Prepare the environment
- Node.js (v20.19.4 or higher)
- npm (v10.9.0 or higher)
Create an agent
Then you can use the agent as follows:Set up your LLM API keys
Add your API keys for the provider you want to use to your.env
file.
ChatOpenAI
and other Langchain chat models require API keys. You should store these in your .env
file. For example, for OpenAI and Anthropic, you can set the API keys in your .env
file, such as:
.env