Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Singularity Email

An autonomous AI agent that combines personal assistance, long-term learning, coding, email, voice, phone, messaging, MCP servers, browser automation, robotics APIs, and smart-home control into a single continuously running agent. 100% free to use with local Cerebras proxy. πŸŒ™

Features

Core AI Engine

  • Claude Code-style UI with sidebar, chat pane, and tabbed right panel
  • Fable 5 Agentic Engine with ultrathinking (Explore β†’ Plan β†’ Execute β†’ Verify)
  • Mythos 5 Security Scanner with 10 vulnerability categories and auto-fix
  • Hermes 3-Layer Memory (durable memory, skills, session DB with FTS5)
  • Persistent long-term goals injected into every conversation
  • Cognitive engine with soul, personality, reflections, and self-improvement
  • Model selector (GPT-OSS 120B, Llama 3.3 70B, Qwen 3 32B)
  • Command palette (Ctrl+K) and keyboard shortcuts

Email (AgentMail)

  • AI's own email inbox via AgentMail.to API
  • Send, receive, reply, forward, delete emails
  • Thread and draft management
  • LLM-powered auto-reply with conversation context
  • Webhook server for real-time incoming email processing

Voice & Phone (Twilio)

  • Make and receive phone calls via Twilio
  • SMS sending with validation
  • TwiML voice response generation
  • Call recording and transcription
  • Webhook handling with signature verification

Messaging (Telegram)

  • Full Telegram Bot API client
  • Long polling and webhook modes
  • Message sending (text, photo, document, location)
  • Inline keyboards and callback queries
  • Command registration and handling
  • Chat management (ban, unban, title, admins)
  • Rate limiting and retry with exponential backoff

MCP Connector

  • Model Context Protocol client for external services
  • Stdio and SSE transports
  • Dynamic server discovery and registration
  • Tool discovery, invocation, and auto-discovery
  • Resource reading and prompt templates
  • Rate limiting per server with health monitoring and auto-reconnect
  • Connects to Gmail, Outlook, calendars, banking APIs, trading APIs, and more

Browser Automation (Puppeteer)

  • Headless and headed browser sessions
  • Multi-tab management
  • Page navigation, screenshots, PDF generation
  • Element interaction (click, type, select, hover, scroll)
  • Form filling and submission
  • Cookie and localStorage management
  • Network request interception
  • JavaScript execution in page context
  • Session persistence and proxy configuration

Robotics API

  • ROS bridge via rosbridge_suite WebSocket
  • Serial port communication (Arduino, Raspberry Pi Pico, etc.)
  • TCP socket for custom robot protocols
  • Joint and Cartesian motion commands
  • Safety limits and emergency stop
  • Gripper/end-effector control
  • Sensor data streaming and telemetry
  • Task sequencing and execution queue

Smart Home Control

  • Home Assistant integration (REST API)
  • Philips Hue bridge integration
  • Generic HTTP/Webhook device support
  • Lighting control (dimming, color, color temperature, scenes)
  • Climate/thermostat control
  • Lock and cover (blinds/garage) control
  • Media player control
  • Security/alarm system integration
  • Automation rules (trigger β†’ action with conditions)
  • Scene activation and script execution

Fable 5 Agentic Engine β€” Ultrathinking

  • Multi-phase planning: Explore β†’ Plan β†’ Execute β†’ Verify
  • Always uses maximum reasoning effort (ultrathinking)
  • 8192 thinking tokens per phase, up to 30 execution steps
  • Sub-agent dispatch for parallel work
  • Context compaction when approaching token limits
  • Self-verification of results
  • Tool calling (file read/write, shell commands, session search)
  • Core directive: No scaffolding or placeholder implementations β€” fully production-quality code always

Mythos 5 Security Scanner

  • Codebase mapping (entry points, routes, data flow)
  • Framework detection (React, Next.js, Express, Django, Flask, Spring, Go)
  • 10 security rule categories:
    • SQL Injection
    • XSS (Reflected)
    • Hardcoded Secrets
    • Path Traversal
    • Command Injection
    • Insecure Deserialization
    • Weak Crypto
    • CORS Misconfiguration
    • Missing Authentication
    • Open Redirect
  • Auto-fix suggestions for each finding
  • Risk surface identification

Hermes 3-Layer Memory + Persistent Goals

  • Layer 1 β€” Durable Memory: SOUL.md (persona), MEMORY.md (facts), USER.md (user profile)
    • Always loaded into system prompt
    • Auto-write from "remember that..." triggers
    • Hand-editable markdown
  • Layer 2 β€” Skills: Procedural memory in ~/.cursescode/skills/
    • Auto-created after 3+ successful similar tasks
    • Loaded on-demand when task matches
    • User-lockable to prevent auto-regeneration
  • Layer 3 β€” Session DB: SQLite with FTS5 full-text search
    • Every message stored and searchable
    • session_search tool for recalling past conversations
    • Zero token cost unless queried
  • Long-Term Persistent Goals: GOALS.md in memory directory
    • Goals persist across all sessions and are injected into every system prompt
    • Add, remove, update status (active/completed/paused), toggle steps
    • Priority levels (high/medium/low) with visual indicators
    • The agent works toward these goals in every conversation

Architecture

singularity-email/
β”œβ”€β”€ main.js                    # Electron main process, IPC handlers
β”œβ”€β”€ preload.js                 # Context bridge API
β”œβ”€β”€ renderer.js                # UI logic
β”œβ”€β”€ index.html                 # App layout
β”œβ”€β”€ assets/                    # Icons
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ logger.js              # Structured logging
β”‚   β”œβ”€β”€ session-db.js          # SQLite FTS5 session search
β”‚   β”œβ”€β”€ memory-manager.js      # Durable memory (SOUL.md, MEMORY.md, USER.md)
β”‚   β”œβ”€β”€ skill-manager.js       # Procedural skills
β”‚   β”œβ”€β”€ llm-client.js          # Cerebras proxy client with streaming
β”‚   β”œβ”€β”€ agentic-engine.js      # Fable 5 multi-phase ultrathinking engine
β”‚   β”œβ”€β”€ security-scanner.js    # Mythos 5 security analysis
β”‚   β”œβ”€β”€ cognitive-engine.js    # Cognitive engine with self-improvement
β”‚   β”œβ”€β”€ goal-manager.js        # Persistent long-term goals
β”‚   β”œβ”€β”€ agent-mail.js          # AgentMail email API client
β”‚   β”œβ”€β”€ hermes-bridge.js       # OpenClaw + Hermes inter-agent bridge
β”‚   β”œβ”€β”€ voice-plugin.js        # Twilio voice/SMS plugin
β”‚   β”œβ”€β”€ telegram-bot.js        # Telegram Bot API client
β”‚   β”œβ”€β”€ mcp-connector.js       # MCP protocol client (Gmail, Outlook, etc.)
β”‚   β”œβ”€β”€ browser-automation.js  # Puppeteer browser automation
β”‚   β”œβ”€β”€ robotics-api.js        # ROS + serial robotics control
β”‚   └── smart-home.js          # Home Assistant, Hue, smart devices
β”œβ”€β”€ tests/                     # Module test suites
└── test/                      # Core component tests

Data Storage

All data stored in ~/.singularity-email/:

  • sessions/ β€” JSON files per chat session
  • memory/ β€” SOUL.md, MEMORY.md, USER.md, GOALS.md
  • skills/ β€” Skill folders with SKILL.md
  • state.db β€” SQLite session database with FTS5

Getting Started

npm install
npm start

Requires a Cerebras proxy running on 127.0.0.1:8090.

Configuration

Email (AgentMail)

Set AGENTMAIL_API_KEY in .env or via the Email tab in the UI.

Voice (Twilio)

Set TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_FROM_NUMBER in .env or via the Voice tab.

Telegram

Set TELEGRAM_BOT_TOKEN in .env or via the Telegram tab.

MCP Servers

Register MCP servers via the MCP tab. Supports stdio (command-based) and SSE (URL-based) transports.

Browser Automation

Sessions are created on-demand via the Browser tab. Requires Puppeteer.

Robotics

Create connections via the Robotics tab. Supports ROS (WebSocket), Serial, and TCP.

Smart Home

Add platforms via the Home tab. Supports Home Assistant, Philips Hue, and generic HTTP devices.

Testing

npm test

Runs all test suites including core components, AgentMail, HermesBridge, VoicePlugin, TelegramBot, MCP Connector, Browser Automation, Robotics API, and Smart Home.

Free Models

Uses free Cerebras models via local proxy:

  • GPT-OSS 120B (default, supports effort levels)
  • Llama 3.3 70B
  • Qwen 3 32B

License

MIT

About

Autonomous AI agent with email, voice, phone, Telegram, MCP servers, browser automation, robotics APIs, and smart-home control

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages