Build your own AI Chat Bot
A Telegram, Discord or Slack bot that you turn into an AI agent: a language model decides when to call your tools, and you log and limit what it does.
- Intermediate
- About 6–12 h
- 4 checkpoints
- 3 tutorials · Python, Node.js
Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.
Choose a tutorialWhy build it
Chat platforms are where many agents meet their users. The tutorials cover the plumbing (tokens, commands, events); milestones 2 to 4 go beyond them and add the agent loop, which is where the interesting engineering is.
Before you start: Keep bot tokens and API keys in environment variables, never in the repository.
You will be able to
- Receive and answer messages through a bot platform's API.
- Add a language model with a system prompt and bounded conversation history.
- Expose functions as tools and run a bounded agent loop.
- Log, limit and test what the agent does.
Skills it exercises
Recommended on Applied AI Engineer and AI Agent Engineer.
How you know you are there
Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.
- Checkpoint 1Self-check
Echo bot
Done when: The bot answers commands in a test chat, and its token is read from an environment variable.
- Checkpoint 2Self-check
LLM replies
Done when: Messages are answered by a model with a system prompt and the last N turns of history, within a token budget.
- Checkpoint 3Self-check
Tools
Done when: The model can call at least two of your functions, and their arguments are validated before anything runs.
- Checkpoint 4Self-check
Limits and logs
Done when: The loop stops after a fixed number of steps, every tool call is logged, and a small set of test conversations checks the expected tool choices.
Stretch goals
- Ask the user to confirm before any tool with side effects runs.
- Expose the same tools through an MCP server.
Step-by-step guides
Pick one in a language you know (tutorial languages: Python, Node.js). They open on the author’s site.
- Python
How To Create a Telegram Bot Using Python(external site)
Python: a Telegram bot from token to deployment.
- Node.js
Create a Discord bot(external site)
Node.js: the official discord.js guide.
- Python
How to Build Your First Slack Bot with Python(external site)
Python: a first Slack bot.
Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.
Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.