Skip to content

recallnet/ts-mastra-agent-recall-mcp-starter

Repository files navigation

Poem Writing Agent

A minimalist AI agent built with Mastra that writes poems and stores them in Recall Network buckets.

Recording

Watch the livestream where we built this repo with Cursor IDE!

~https://www.youtube.com/watch?v=NQ81YFIKPh0

Setup

Prerequisites

  • Node.js 16+
  • pnpm

Installation

  1. Clone the repository
  2. Install dependencies
pnpm install

Configuration

Create a .env file with the following variables:

OPENAI_API_KEY=your_openai_api_key_here
RECALL_PRIVATE_KEY=your_private_key_here
RECALL_NETWORK=testnet
RECALL_TOOLS=all

Note: You'll need an OpenAI API key and a Recall Network private key.

Running the Agent

Build and run the agent:

pnpm build
pnpm start

How It Works

  1. The agent wakes up and introduces itself
  2. It creates a beautiful poem
  3. It checks if a Recall bucket with alias "awakening" exists
  4. If needed, it creates the bucket
  5. It saves the poem as a text file with a timestamp filename
  6. It confirms the storage was successful and shuts down

Poems are stored in the Recall Network with a timestamp-based filename in the "awakening" bucket.

About

A minimalist AI agent built with Mastra that writes poems and stores them in Recall Network buckets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published