DEV Community

Using Mastra to create an AI agent goal planner for Telex.im

I recently built an AI Goal Planner Agent that integrates seamlessly with Telex (telex.im) — a platform similar to Slack where you can chat with intelligent agents that perform specific tasks for you.

For this project (Stage 3 of the HNG Internship Backend Track), I used Mastra, a framework that simplifies building and exposing AI workflows via APIs.

The idea was simple but useful — create an agent that plans your week automatically.
When you type something like:

plan my week: build project, submit report, study for 2 hours daily

The agent breaks it down into a daily actionable plan and returns it right inside Telex

Tech Stack

Mastra — for building the AI workflow

Express.js — for exposing the /a2a endpoint

Vercel — for hosting the API

Telex — for chatting with the agent

⚙️ How It Works

The Telex platform sends user messages to your public API endpoint (via /a2a/agent/plannerAgent).

Your Mastra agent receives the prompt, uses AI logic to generate a structured plan, and returns a text response.

Telex displays the response right in your chat.

💡 Example Output

Your weekly plan:
Monday – Plan your approach for “build project”
Tuesday – Start implementation
Wednesday – Continue progress
Thursday – Submit report
Friday – Review and refine
Saturday – Study for 2 hours
Sunday – Reflect & rest

This shows how AI agents + messaging platforms can simplify productivity, even with small, well-scoped APIs.

You can host yours easily on Vercel and integrate with Telex via their A2A (Agent-to-Agent) protocol.

Follow me for updates as I explore more Telex + Mastra AI agent ideas 🚀

AI #Mastra #Telex #BackendDevelopment #HNG #NodeJS

Top comments (0)