Skip to content

masterdeepak15/AgentTerminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 AgentTerminal v2.2

A persistent, self-learning AI agent system modelled on the human brain. 12 independent OOP agents communicate via async event bus. The brain can search the web, learn new topics, and create its own tools and MCP servers at runtime.

Docker Python License


πŸ”₯ What's New in v2.2

Self-Create Tools & MCP Servers

You -> Atlas: /forge a tool that fetches weather from wttr.in for any city
  Atlas: Forging tool: a tool that fetches weather from wttr.in for any city
  Atlas: Created tool: weather_fetch

You -> Atlas: /forge mcp a server that manages TODO lists in JSON files
  Atlas: Created MCP server: mcp_todo_manager (tools: add_todo, list_todos, complete_todo)

Self-Learning

You -> Atlas: /learn how to use the Stripe API in Python
  Atlas: Learned about 'Stripe API': Stripe provides a Python SDK for...
  Key facts: pip install stripe; Use stripe.api_key; Create PaymentIntent...
  Tool suggestion: A tool that creates Stripe payment intents

Parallel Execution

You -> Atlas: /parallel What is Python? | What is Rust? | What is Go?
  PARALLEL RESULTS (3 tasks):
  [βœ“] p_0 (1.2s): Python is a high-level...
  [βœ“] p_1 (1.1s): Rust is a systems programming...
  [βœ“] p_2 (0.9s): Go is a statically typed...

Brain β†’ Agent mapping

Brain Region Agent Role Key Responsibility
Prefrontal Cortex Orchestrator Plans tasks, coordinates all regions
Hippocampus Memory Vector + SQLite + keyword search, memory graph
Amygdala Safety Filter Risk evaluation, pattern blocking
Cerebellum Quality + Self-Improve Reviews, quality trends, recurring issue detection
Wernicke's Area Input Parser Intent detection, entity extraction
Broca's Area Output Renderer Terminal formatting, API responses
Thalamus Router + Handoff Routes messages, agent-to-agent handoff chains
Reticular Formation Scheduler Priority queue, background task loop
Basal Ganglia Automation 21 slash commands, skills, macros
Anterior Cingulate Conflict Detector Detects ambiguity and contradictions
Sensory Cortex Input Processor Normalizes text, files, URLs
Motor Cortex Tool Executor Runs all approved tool/plugin calls

Quick Start

# Docker
docker pull ghcr.io/masterdeepak15/agents:latest
docker run -it -e ANTHROPIC_API_KEY=your_key ghcr.io/masterdeepak15/agents

# Local Python
git clone https://github.com/masterdeepak15/Agents.git
cd Agents
pip install -r requirements.txt
python main.py --provider anthropic

Terminal Commands (21)

Command What it does
/status Brain health, all region stats, scheduler, audit, forge
/plan <goal> Create a multi-step execution plan
/memory View memories (vector + SQLite + in-memory)
/search <query> Semantic memory search
/tools List all loaded tools (built-in + plugins + MCP + forged)
/learn <topic> Self-learn from the web
/learn deep <topic> Deep learning with more detail
/forge <desc> Create a new tool at runtime
/forge mcp <desc> Create a new MCP server at runtime
/parallel t1 | t2 Run multiple tasks concurrently
/reflect Brain self-reflection
/remember <text> Store a memory permanently
/webhook View webhook channels
/schedule View scheduled tasks & file watches
/audit View recent audit log
/quality View quality trend + recurring issues
/export Export memories to JSON
/skills List skill library
/save Save memory to disk
/clear Clear working memory
/quit Graceful shutdown

Project Structure

AgentTerminal/
β”œβ”€β”€ brain.py                        ← assembles all 12 agents (v2.2)
β”œβ”€β”€ main.py                         ← CLI entry point
β”œβ”€β”€ config/brain_config.yaml        ← all configuration
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ base_agent.py               ← OOP base all agents extend
β”‚   β”œβ”€β”€ context_manager.py          ← token budget management
β”‚   β”œβ”€β”€ event_bus.py                ← async pub/sub bus
β”‚   β”œβ”€β”€ providers.py                ← 7 LLM backends
β”‚   β”œβ”€β”€ mcp_client.py               ← MCP server connector
β”‚   β”œβ”€β”€ vector_store.py             ← ChromaDB vector search (v2.1)
β”‚   β”œβ”€β”€ sqlite_store.py             ← SQLite FTS5 backend (v2.1)
β”‚   β”œβ”€β”€ streaming.py                ← Token streaming (v2.1)
β”‚   β”œβ”€β”€ scheduler.py                ← Cron/file watch/tasks (v2.1)
β”‚   β”œβ”€β”€ audit.py                    ← Security audit log (v2.1)
β”‚   β”œβ”€β”€ tool_forge.py               ← Self-create tools & MCP servers (v2.2)
β”‚   β”œβ”€β”€ self_learn.py               ← Web search, learn, adapt (v2.2)
β”‚   β”œβ”€β”€ parallel.py                 ← Parallel task pool (v2.2)
β”‚   └── webhook.py                  ← HTTP webhook triggers (v2.2)
β”œβ”€β”€ agents/                         ← 12 brain region agents
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ plugin_base.py              ← BrainPlugin base class
β”‚   β”œβ”€β”€ builtin/skills.py           ← 10 built-in tools
β”‚   β”œβ”€β”€ plugins/                    ← auto-discovered plugins
β”‚   β”‚   β”œβ”€β”€ browser_tool.py         ← Playwright browser
β”‚   β”‚   β”œβ”€β”€ database_tool.py        ← SQL queries
β”‚   β”‚   β”œβ”€β”€ pdf_tool.py             ← PDF reader
β”‚   β”‚   β”œβ”€β”€ email_tool.py           ← SMTP/IMAP
β”‚   β”‚   β”œβ”€β”€ calendar_tool.py        ← Calendar events
β”‚   β”‚   └── image_gen_tool.py       ← DALL-E image gen
β”‚   └── mcp_servers/                ← Runtime-generated MCP servers (v2.2)
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ api_server.py               ← FastAPI REST (40+ endpoints)
β”‚   └── dashboard.py                ← Web dashboard + WebSocket
β”œβ”€β”€ docs/                           ← documentation
└── tests/                          ← unit tests

API Endpoints (40+)

Core

POST /chat Β· POST /chat/stream Β· POST /plan Β· GET /status Β· POST /reflect

Memory

GET /memory Β· GET /memory/search Β· GET /memory/graph/{id} Β· GET /memory/export Β· POST /memory/import Β· POST /memory/decay Β· POST /remember

Tools

GET /tools Β· POST /tool/{name} Β· GET /skills Β· POST /skill

Forge (v2.2)

POST /forge/tool Β· POST /forge/mcp Β· GET /forge/status

Learning (v2.2)

POST /learn Β· POST /learn/url Β· POST /learn/create Β· GET /learn/status

Webhooks (v2.2)

POST /webhook/{channel} Β· POST /webhook Β· GET /webhooks

Parallel (v2.2)

POST /parallel

Scheduler

GET /scheduler Β· GET /scheduler/tasks Β· POST /scheduler/add Β· POST /scheduler/watch

Security

GET /audit Β· GET /audit/stats Β· POST /auth/token Β· GET /auth/tokens

Monitoring

GET /dashboard Β· WS /ws Β· GET /events


License

MIT β€” see LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors