Mastra is the TypeScript agent framework designed to provide the essential primitives for building AI applications. It enables developers to create AI agents with memory and tool-calling capabilities, implement deterministic LLM workflows, and leverage RAG for knowledge integration.
Mastra’s primary advantage is its built-in telemetry support that automatically captures agent interactions, LLM calls, and workflow executions, making it easy to monitor and debug AI applications.

If you don’t have a Mastra project yet, you can create one using the Mastra CLI:
Install the necessary dependencies for Mastra observability:
Create or update your .env file with the following variables:
Create an agent in your project. For example, create a file src/mastra/index.ts:
Start the Mastra development server:
Head over to the developer playground with the provided URL and start chatting with your agent.
With this setup, your Mastra application will automatically trace:
If you have any questions or suggestions for improving the Mastra integration, please open an issue on our GitHub repository.