An advanced AI system built on the Mastra framework, featuring sophisticated cognitive capabilities, memory processing, and multi-agent orchestration. This project integrates cognitive skills from ai-opencog with modern AI infrastructure to create a powerful, self-evolving AI ecosystem.
- 🧠 Cognitive Skills: Advanced reasoning, code analysis, production optimization, and adaptive learning
- 💭 Memory System: Semantic, episodic, and wisdom memory repositories with automated processing
- 🤖 Deep Tree Echo Agent: Conversational AI with memory-enhanced responses
- ⚡ Workflow Orchestration: Automated daily, weekly, and monthly memory processing
- 🏗️ Mastra Framework: Modern TypeScript-based agent framework
- 📊 PostgreSQL + pgvector: Vector-enabled database for memory storage
- ⏰ Inngest Integration: Workflow scheduling and observability
- 🌐 Web Interface: Remix-based EchoSelf app with AI chat and visualization
- 🔗 Multi-platform: Slack and Telegram integrations
deep-tree-echo-mast/
├── src/
│ ├── mastra/ # Mastra framework configuration
│ │ ├── agents/ # AI agents (Deep Tree Echo Agent)
│ │ ├── tools/ # Memory and conversation tools
│ │ ├── workflows/ # Automated memory processing
│ │ └── index.ts # Main Mastra configuration
│ ├── skills/ # Cognitive capabilities
│ │ ├── cognitive/ # Code analysis and reasoning
│ │ ├── learning/ # Adaptive learning systems
│ │ ├── nanocog/ # Meta-cognitive orchestration
│ │ └── optimization/ # Production optimization
│ └── triggers/ # External integrations (Slack, Telegram)
├── echoself/ # Remix web application
└── scripts/ # Build and deployment scripts
- Node.js >= 20.9.0
- PostgreSQL with pgvector extension
- OpenAI API key (or compatible provider)
-
Clone the repository
git clone https://github.com/drzo/deep-tree-echo-mast.git cd deep-tree-echo-mast
-
Install dependencies
npm ci
-
Configure environment
cp .env.example .env # Edit .env with your configuration
-
Set up database
# Ensure PostgreSQL with pgvector is running # Database will be automatically initialized
-
Start the development server
npm run dev
# AI Configuration
OPENAI_API_KEY=your_openai_api_key
OPENAI_BASE_URL=https://api.openai.com/v1 # Optional
# Database
DATABASE_URL=postgresql://localhost:5432/mastra
# Scheduling (optional)
SCHEDULE_CRON_TIMEZONE=America/Los_Angeles
SCHEDULE_CRON_EXPRESSION=0 2 * * *
# External Integrations (optional)
SLACK_BOT_TOKEN=your_slack_token
TELEGRAM_BOT_TOKEN=your_telegram_token
# Start development server
npm run dev
# Type checking
npm run check
# Code formatting
npm run format
npm run check:format
# Testing
npm run test
npm run test:watch
npm run test:coverage
# Build for production
npm run build
# Terminal 1: Start Mastra dev server
npm run dev
# Terminal 2: Start Inngest dev server (for workflows)
npx inngest-cli@latest dev
- Chat API:
POST /api/chat
- Interact with Deep Tree Echo Agent - Inngest:
/api/inngest
- Workflow management and scheduling
const response = await fetch('/api/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
message: "Hello, can you help me analyze some code?",
sessionId: "optional-session-id"
})
});
const data = await response.json();
console.log(data.response);
The system includes advanced cognitive capabilities:
- Intelligent code quality analysis
- Pattern recognition and anti-pattern detection
- Maintainability scoring and suggestions
- Multi-step logical reasoning
- Problem decomposition and synthesis
- Contextual decision making
- Performance monitoring and optimization
- Resource usage analysis
- System health diagnostics
- Self-improving algorithms
- Pattern learning from interactions
- Behavioral adaptation over time
The Deep Tree Echo Agent maintains sophisticated memory:
- Semantic Memory: Factual knowledge and concepts
- Episodic Memory: Conversation history and experiences
- Wisdom Memory: Learned insights and patterns
- Working Memory: Active context and recent interactions
Memory processing runs automatically:
- Daily: Parse and categorize new interactions
- Weekly: Process and consolidate memories
- Monthly: Generate insights and wisdom
The EchoSelf web application provides:
- Interactive chat with the AI agent
- Memory visualization and exploration
- System monitoring and analytics
- Multi-platform integration management
- Mastra Framework: Core AI agent infrastructure
- Cognitive Skills: Extracted from ai-opencog project
- Memory Processing: Automated workflows for memory management
- Web Interface: Remix application in
echoself/
directory
# Run all tests
npm run test
# Run cognitive skills tests specifically
npm run test:skills
# Watch mode for development
npm run test:watch
# Coverage report
npm run test:coverage
- Create skill file in
src/skills/[category]/
- Implement using Mastra Tool interface
- Add to exports in
src/skills/index.ts
- Register in
src/mastra/index.ts
- Add tests in
src/skills/tests/
COGNITIVE_SKILLS_README.md
- Detailed cognitive capabilitiesWARP.md
- Development workflow and commandsdocs-mastra.md
- Mastra framework documentationnext-steps-nanocog.md
- Future development roadmapechoself/README.md
- Web interface documentation
npm run build
- Node.js 20.9.0+
- PostgreSQL with pgvector
- Persistent storage for memory
- Environment variables configured
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Run type checking and formatting
- Submit a pull request
ISC License - see package.json for details
- Mastra Framework - AI agent framework
- ai-opencog - Source of cognitive skills
- Inngest - Workflow scheduling platform
Deep Tree Echo Mast - Where AI meets consciousness, memory meets wisdom, and code meets cognitive evolution. 🌳✨