BLOG.MOIKAS

BLOG.MOIKAS

The agent is built

How I built a simple chat agent in TypeScript

Moikapy's avatar
Moikapy
Sep 30, 2024
∙ Paid

Today, we will write code to create a simple chatbot that we will probably reuse for future projects.

We are going to be using Typescript, LangGraph, and Langchain.

Before we get started, there will be a few tools that you will need to install before we begin the project if you are a beginner.

Briefly...

The Prerequisites

  • I like to use

    Docker

    , so you must install this if you want to follow 100% along with me.

  • We also need

    GIT

    . This is our version control.

  • You will also need an Anthropic API KEY for this example. This will allow us to develop the agent for free using their evaluation plan.

  • Last but not least, you will need

    NodeJS

    . I'm using version 21.6.2.

We can start by creating a new folder for our project. Open the terminal and run the following code

For me, I'm naming the project. Xander, for the fun.

bash

mkdir agent-xander
cd agent-xander
npm init -y
git init

We will need our dependencies

  • @langchain/langgraph

    contains the building blocks used to assemble an agent

  • @langchain/anthropic

    enable your a…

User's avatar

Continue reading this post for free, courtesy of Moikapy.

Or purchase a paid subscription.
© 2026 Moikas · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture