A modern AI-powered application built with Deno and Mastra framework.
- Deno (version 2.2 or higher)
- Clone the repository:
git clone <your-repo-url>
cd deno-mastra- Install dependencies:
deno task dev- Create a
.envfile:
cp .env.example .env- Update your
.envfile with your API keys:
OPENAI_API_KEY=your_openai_api_key
.
├── src/ # Source code directory
├──── mastra/ # Mastra configuration
├────── agents/ # Agents configuration
├────── tools/ # Tools configuration
├── deno.json # Deno configuration
├── deno.lock # Dependency lock file
└── .env # Environment variables
Start the development server:
deno task devThis will start the Mastra server and make your agents available via REST endpoints.
You can test your agents using curl or any HTTP client:
curl -X POST http://localhost:4111/api/agents/npmAgent/generate \
-H "Content-Type: application/json" \
-d '{"messages": ["react"]}'@mastra/core: Core Mastra framework@mastra/memory: Memory management for agents@ai-sdk/openai: OpenAI integrationzod: Schema validation
Here are some blog articles that provide more context and examples of how to use this repository:
- Building AI Agents with Mastra and Deno: This article explains how to build AI agents using the Mastra framework and Deno runtime.
- Adding Langfuse Tracing to Mastra AI Agents: This article covers how to add Langfuse tracing to your Mastra AI agents for better observability and debugging.
MIT