mentals-ai: Simplified AI Agent Creation Tool
Project Overview
GitHub Stats | Value |
---|---|
Stars | 343 |
Forks | 32 |
Language | C++ |
Created | 2024-02-27 |
License | MIT License |
Introduction
Mentals AI is a innovative tool designed to create and operate intelligent agents using simple Markdown files with a .gen
extension. These agents feature loops, memory, and various tools, allowing you to focus solely on the logic of the agent without the need for scaffolding code in languages like Python. This approach redefines the foundational frameworks for future AI applications. The project is currently in development, with upcoming features including a local vector database and a web UI. It offers a unique way to build AI agents through straightforward and executable Markdown files.
Key Features
What Mentals AI Offers
Mentals AI is a tool designed for creating and operating agents using loops
, memory
, and various tools
, all defined through straightforward Markdown
files with a .gen
extension. This approach eliminates the need for traditional programming languages, allowing users to focus on the logic of the agent.
Key Capabilities
- Agent Creation: Agents can be created using Markdown, with no requirement for scaffolding code in Python or other languages.
- Recursive Loops: Agents operate through recursive loops, with the LLM determining the next steps based on previous loops.
- Working Memory: Each instruction has its own working memory (context) that can be managed and cleared as needed.
- Short-Term Memory: Experimental feature for storing intermediate results accessible across all instruction contexts.
- Control Flow: Control flow is expressed in natural language, enabling semantic conditions and data stream branching without needing to define flow logic in other languages.
- Native Tools: Includes tools for message output, user input, file handling, Python interpreter, and Bash commands.
- Integration with LLMs: Supports models like Llama3 through the OpenAI API.
Key Concepts
- Instructions (Prompts): Basic components of agents, which can refer to each other and take input parameters.
- Tools: Special instructions for handling various tasks such as user input, file operations, and Python execution.
- Working Memory (Context): Each instruction maintains its own context, which can be kept or cleared as specified.
- Short-Term Memory: Stores intermediate results for further reasoning.
- Control Flow: Expressed in natural language, allowing for conditions, instruction calls, and loops.
Examples and Use Cases
- Word chain game in a self-loop controlled by LLM
- Multi-agent interactions
- Space Invaders generator agent
- 2D platformer generator agent
- Collecting YouTube videos and generating content based on them
- Writing articles based on top news from Hacker News
Getting Started
- Secure an OpenAI API key
- Install dependencies (libcurl, libfmt, pgvector, poppler)
- Clone the repository and configure the API key in
config.toml
- Build and run the project using
make
and./build/mentals
commands
Roadmap
- Web UI development
- Vector database tools
- Agent’s experience
Real-World Applications
Word Chain Game
Create an agent that autonomously plays a word chain game in a self-loop controlled by a Large Language Model (LLM). This example demonstrates how Mentals AI can manage complex interactions without traditional programming.
## root
### use: word_chain
Play a word chain game.
Output the chain of words.
## word_chain
### input: last_word
### use: generate_next_word
Generate the next word starting with the last letter of the previous word.
Return the new word.
Multi-Agent Interactions
Design agents that interact with each other to achieve a common goal. For instance, you can create agents for a space invader game generator or a 2D platformer generator.
Agent Interaction | Example |
---|---|
Space Invaders Generator | Agents collaborate to generate game levels, enemies, and player actions. |
2D Platformer Generator | Agents work together to create levels, obstacles, and power-ups. |
Content Assistance
Use Mentals AI to automate content-related tasks:
- Collect YouTube Videos: Collect videos on a given topic, save details to a CSV file.
root
use: youtube_search, save_to_csv
Search YouTube for videos on “AI tutorials”. Save video details to a CSV file.
- **Transcribe Videos**: Transcribe videos and create a table of contents.
```markdown
## root
### use: video_transcription, create_toc
Transcribe the video content.
Create a table of contents based on the transcription.
- Generate News Articles: Collect top news from Hacker News, choose a topic, and write an article with critic feedback.
root
use: hacker_news, write_article, critic_feedback
Collect top news from Hacker News. Choose a topic and write an article. Get feedback from a critic and save the article.
### Exploring and Benefiting from the Repository
#### Getting Started
1. **Secure an OpenAI API Key**: Create an OpenAI account and obtain an API key.
2. **Install Dependencies**: Ensure you have `libcurl`, `libfmt`, `pgvector`, and `poppler` installed.
3. **Clone the Repository**: Clone the Mentals AI repository and configure your
Conclusion
Key Points
- Simplified Agent Creation: Mentals AI allows users to create complex agents using straightforward Markdown files, eliminating the need for traditional programming languages.
- Recursive Loop Execution: Agents operate through recursive loops, with LLMs determining next steps, managing data, and controlling flow logic without additional coding.
- Flexible Framework: Enables the creation and integration of custom reasoning frameworks, such as
Tree of Thoughts
andReAct
, allowing for diverse and complex sequences. - Memory and Context Management: Features working memory and short-term memory tools to store and manage context and intermediate results.
- Future Development:
- Web UI and vector database tools are in progress.
- Planned additions include agent experience, image generation, and browser tools.
Future Potential
Mentals AI has the potential to redefine foundational frameworks for AI applications by:
- Enhancing agent complexity and flexibility.
- Simplifying the development process through Markdown-based instructions.
- Integrating various reasoning frameworks seamlessly.
- Expanding capabilities with upcoming features like Web UI and vector database tools.
For further insights and to explore the project further, check out the original turing-machines/mentals-ai repository.
Attributions
Content derived from the turing-machines/mentals-ai repository on GitHub. Original materials are licensed under their respective terms.
Stay Updated with the Latest AI & ML Insights
Subscribe to receive curated project highlights and trends delivered straight to your inbox.