A TypeScript-based AI agent that can interact with various tools including Reddit posts fetching, dad jokes generation, and DALL-E image generation. This was built learning from the tutorial from Scott Moss on Frontend Masters so credit to him and go check them out here: https://frontendmasters.com/
- 🤖 GPT-4 powered AI assistant
- 🔧 Modular tool system
- 🎨 DALL-E image generation
- 📱 Reddit post fetching
- 😄 Dad joke generation
- 💾 Conversation memory persistence
- Node.js
- OpenAI API key
- TypeScript
- Clone the repository
- Install dependencies:
- Create a
.envfile in the root directory and add your OpenAI API key:
Run the agent with a message: npm start "your message here"
- Reddit Posts: Fetches latest posts from Reddit
- Dad Jokes: Generates random dad jokes
- Image Generation: Creates images using DALL-E 3
/src/tools- Individual tool functions implementationsagent.ts- Main agent logicllm.ts- Language model integrationmemory.ts- Conversation persistence- using lowdbui.ts- Terminal UI components
- Built with TypeScript
- Uses Zod for runtime type validation
- Implements parallel tool execution
- Persistent conversation storage using LowDB
- Terminal UI with loading indicators
- OpenAI API
- Zod
- LowDB
- Node-fetch
- Ora (for terminal spinners)
- UUID
- TSX
ISC