Skip to content

itsbryanman/Gremlin

Repository files navigation

GREMLIN

Gremlin

Gremlin icon

Gremlin

Your chaotic little helper that gets things done.

Personal AI Agent Platform

Version License Status Node.js TypeScript Python Docker PostgreSQL Redis Next.js Fastify Temporal Discord Telegram Slack WhatsApp PRs Welcome Commitlint Turbo OpenAI

Gremlin is a personal AI agent platform that lets users delegate real-world tasks to an autonomous AI assistant through the messaging apps they already use (Discord, Telegram, WhatsApp, Slack, SMS) while providing a polished dashboard for task management, oversight, and control.

Key Features

  • Chat to Start, Dashboard to Manage β€” Messaging apps are the input layer. The dashboard is the control plane.
  • Plan Before You Act β€” Agent proposes a plan, user confirms with one tap. No misfires.
  • Graduated Autonomy β€” 4-tier delegation system from Notify to Autopilot.
  • Structured Identity β€” Rich user model with editable preference graph.
  • Secure by Default β€” Zero capabilities on install; mandatory auth; sandboxed skills.
  • Observable Actions β€” Append-only audit trail; anomaly detection; daily digests.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        UI Layer                                 β”‚
β”‚     Web Dashboard  β€’  Mobile App  β€’  Desktop Tray App          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Messaging Integration Layer                    β”‚
β”‚   Discord  β€’  Telegram  β€’  WhatsApp  β€’  Slack  β€’  SMS  β€’  Emailβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       API Gateway                               β”‚
β”‚         REST + WebSocket  β€’  Auth  β€’  Rate Limiting            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Agent Runtime                              β”‚
β”‚     LLM Orchestrator  β€’  Planning Engine  β€’  Tool Executor     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Task & Workflow Engine                         β”‚
β”‚     Queue  β€’  Scheduler  β€’  State Machine  β€’  Temporal.io      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Memory & User Model                            β”‚
β”‚    Preference Graph  β€’  Relationship Map  β€’  Routine Tracker   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       Data Layer                                β”‚
β”‚      PostgreSQL + pgvector  β€’  Redis  β€’  Object Storage        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 20+
  • Python 3.11+
  • An LLM API key (Anthropic or OpenAI)

Setup

  1. Clone the repository

    git clone https://github.com/yourusername/gremlin.git
    cd gremlin
  2. Copy environment configuration

    cp .env.example .env
  3. Configure your API keys

    Edit .env and add your LLM API key:

    ANTHROPIC_API_KEY=your_key_here
    # or
    OPENAI_API_KEY=your_key_here
  4. Start the services

    docker-compose up -d
  5. Access the dashboard

    Open http://localhost:3000 in your browser.

Connecting Messaging Platforms

Discord

  1. Create a bot at https://discord.com/developers/applications
  2. Add the bot token to .env:
    DISCORD_BOT_TOKEN=your_bot_token
  3. Invite the bot to your server with message read/write permissions

Telegram

  1. Create a bot via @BotFather on Telegram
  2. Add the bot token to .env:
    TELEGRAM_BOT_TOKEN=your_bot_token

Project Structure

gremlin/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ gateway/          # API Gateway (Node.js/Fastify)
β”‚   β”œβ”€β”€ agent/            # Agent Runtime (Python)
β”‚   β”œβ”€β”€ shared/           # Shared types and utilities
β”‚   β”œβ”€β”€ web/              # Web Dashboard (Next.js)
β”‚   └── adapters/
β”‚       β”œβ”€β”€ discord/      # Discord adapter
β”‚       β”œβ”€β”€ telegram/     # Telegram adapter
β”‚       β”œβ”€β”€ slack/        # Slack adapter
β”‚       └── whatsapp/     # WhatsApp adapter (Twilio)
β”œβ”€β”€ db/
β”‚   └── migrations/       # PostgreSQL migrations
β”œβ”€β”€ docker-compose.yml    # Service orchestration
└── package.json          # Root workspace config

Delegation Tiers

Tier Behavior Example
Notify Agent monitors but only reports Price drop alerts, news monitoring
Draft Agent prepares output, user sends Email replies, message responses
Do + Summarize Agent acts, sends summary after Calendar management, file org
Autopilot Agent acts silently, logs only Routine tasks, learned patterns

Security

Gremlin is designed with security as a core principle:

  • Localhost-only by default β€” All services bind to 127.0.0.1
  • Mandatory authentication β€” No auth: none option exists
  • Credential encryption β€” Stored in OS keychain, never in plaintext
  • Capability tokens β€” Scoped, time-limited, auditable
  • Taint tracking β€” External data can't trigger actions without confirmation
  • Audit logging β€” Append-only, queryable, exportable

API Reference

Tasks API

Method Endpoint Description
POST /api/v1/tasks Create a new task
GET /api/v1/tasks List tasks with filtering
GET /api/v1/tasks/:id Get task detail
PATCH /api/v1/tasks/:id Update task (approve plan, change tier)
DELETE /api/v1/tasks/:id Cancel a task

Memory API

Method Endpoint Description
GET /api/v1/memory Browse user model
GET /api/v1/memory/:key Get specific memory
PATCH /api/v1/memory/:key Update memory
DELETE /api/v1/memory/:key Delete memory

WebSocket

Connect to /api/v1/stream?token=<jwt> for real-time updates:

const ws = new WebSocket(`ws://localhost:3000/api/v1/stream?token=${token}`);

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  // Handle events: task.created, task.plan.proposed, task.completed, etc.
};

Development

Install dependencies

npm install
cd packages/agent && pip install -e ".[dev]"

Run in development mode

# Start databases
docker-compose up -d gremlin-postgres gremlin-redis

# Run gateway
cd packages/gateway && npm run dev

# Run agent (in another terminal)
cd packages/agent && python -m src.main

# Run adapters (in other terminals)
cd packages/adapters/discord && npm run dev
cd packages/adapters/telegram && npm run dev
cd packages/adapters/slack && npm run dev
cd packages/adapters/whatsapp && npm run dev

Run tests

npm test
cd packages/agent && pytest

##thanks thanks team

License

MIT License β€” see LICENSE for details.

About

Like that other claw thing, but with a dashboard, a plan step, and auth that isn't optional. PLUS won't open 24632 cron jobs and burn tokens

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors