Package Exports
- titan-agent
- titan-agent/dist/cli/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (titan-agent) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
TITAN — The Intelligent Task Automation Network
A fully autonomous AI agent framework. 14 providers. 30 tools. Pure JavaScript — no native compilation.
Quick Start • Why TITAN • Features • Providers • Mission Control • Mesh Networking • Custom Skills • CLI
Quick Start
Requirements: Node.js >= 20
npm install -g titan-agent
titan onboard # Interactive setup (pick a provider, paste your API key)
titan gateway # Launch Mission Control at http://localhost:48420
titan agent -m "Hello" # Talk to your agent from the terminalFrom Source
git clone https://github.com/Djtony707/TITAN.git && cd TITAN/titan
npm install
cp .env.example .env # Add API keys
npm run dev:gateway # Start in dev modeWhy TITAN
| TITAN | Typical AI agent frameworks | |
|---|---|---|
| Setup | npm i -g titan-agent && titan onboard |
Docker, Python venvs, native compilation |
| Native compilation | None — all pure JS deps | Often require node-gyp, system libraries |
| Providers | 14 (50+ preconfigured models) with automatic failover | 1-4 providers, no failover |
| Security | Prompt injection shield, DM pairing, E2E encryption, tool sandboxing | Minimal or none |
| Memory | 4 systems (episodic, learning, relationship, temporal graph) | Basic chat history |
| Multi-computer | Built-in mesh with mDNS + Tailscale auto-discovery | Manual config or unsupported |
| Skills | 30 built-in + drop-in YAML/JS creation | Fixed tool set |
| Cost control | Smart routing, daily budgets, context summarization | Uncapped token spend |
| GUI | 11-panel Mission Control dashboard | CLI only or basic web UI |
| Codebase | ~15K lines TypeScript | 50K-200K+ lines |
Features
14 AI Providers, 50+ Models
Connect any combination of cloud and local models. TITAN routes, fails over, and load-balances automatically.
titan model --discover # Live-detect all available models
titan model --alias fast=openai/gpt-4o-mini # Create shortcuts
titan model --set anthropic/claude-sonnet-4-20250514Built-in aliases: fast, smart, cheap, reasoning — fully configurable.
30 Built-in Tools
| Category | Tools |
|---|---|
| Shell & Process | shell, exec, process (list, kill, spawn, poll, log) |
| Filesystem | read_file, write_file, edit_file, list_dir, apply_patch |
| Web | web_search, web_fetch, browser (CDP), browse_url, browser_search, browser_auto_nav (Playwright) |
| Intelligence | auto_generate_skill, analyze_image, transcribe_audio, generate_speech |
| Automation | cron, webhook |
| Memory | memory, switch_model, graph_remember, graph_search, graph_entities, graph_recall |
| Sessions | sessions_list, sessions_history, sessions_send, sessions_close |
Temporal Knowledge Graph
Pure TypeScript graph memory — no Docker, no Neo4j, no external services.
- Conversations are automatically recorded as timestamped episodes
- Entities (people, projects, topics) are extracted and linked
- Relevant memories are injected into every system prompt
- Searchable across time with natural language
titan graphiti --init # Initialize the graph
titan graphiti --stats # View entity/episode countsMulti-Agent System
Run up to 5 concurrent agents, each with its own model and personality.
titan agents --spawn researcher --model openai/gpt-4o
titan agents --spawn coder --model ollama/llama3.1
titan agents --listPrompt Injection Shield
Two-layer defense against prompt injection attacks:
- Heuristic engine — Detects "ignore previous instructions", system prompt extraction, developer mode exploits
- Strict mode — Keyword density analysis and tail manipulation detection
Combined with the separate DM pairing system, which requires new senders to be approved before they can interact with your agent.
Loop Detection & Circuit Breaker
Three detection algorithms prevent runaway tool loops:
- Repeat detection — Same tool, same arguments, called repeatedly
- No-progress detection — Tool returns identical output on consecutive calls
- Ping-pong detection — Alternating tool patterns with no forward progress
- Global circuit breaker — Hard stop after configurable threshold
Task Planner
Automatic goal decomposition with dependency-aware execution:
- Breaks complex goals into ordered sub-tasks
- Parallel execution of independent tasks
- 3x auto-retry with exponential backoff
- Persistent state at
~/.titan/plans/
Smart Context & Cost Optimization
- Auto-summarizes conversation history to stay within token budgets
- Routes simple queries to cheaper models automatically
- Per-session cost tracking with configurable daily budgets
Continuous Learning
TITAN gets smarter the more you use it:
- Tracks tool success/failure rates across all interactions
- Records error patterns and successful resolutions
- Persistent knowledge base at
~/.titan/knowledge.json - Learned context injected into every system prompt
Relationship Memory
- Persistent user profile that survives restarts
- Remembers your name, preferences, work context
- Personal continuity across all sessions
E2E Encrypted Sessions
AES-256-GCM encryption for sensitive conversations. Keys generated per-session, held in memory only.
Providers
TITAN supports 14 AI providers out of the box. Add your API key and go.
| Provider | Models | Type |
|---|---|---|
| Anthropic | Claude Opus 4, Sonnet 4, Haiku 4, 3.5 Sonnet/Haiku | Cloud |
| OpenAI | GPT-4o, GPT-4o-mini, GPT-4 Turbo, o1, o1-mini, o3-mini | Cloud |
| Gemini 2.5 Pro/Flash, 2.0 Flash, 1.5 Pro | Cloud | |
| Ollama | Any locally installed model | Local |
| Groq | LLaMA 3.3 70B, Mixtral, Gemma 2, DeepSeek-R1 Distill | Cloud (Fast inference) |
| Mistral | Mistral Large, Medium, Small, Nemo, Codestral | Cloud |
| OpenRouter | 290+ models from all providers | Cloud (Aggregator) |
| Together | LLaMA 3.3, DeepSeek-R1, Qwen 2.5, Mixtral | Cloud |
| Fireworks | LLaMA 3.3, Mixtral, Qwen 3 | Cloud (Fast inference) |
| xAI | Grok-3, Grok-3-fast, Grok-3-mini | Cloud |
| DeepSeek | DeepSeek Chat, DeepSeek Reasoner | Cloud |
| Cerebras | LLaMA 3.3, LLaMA 3.1, Qwen 3 | Cloud (Fast inference) |
| Cohere | Command-R+, Command-R, Command-R 7B | Cloud |
| Perplexity | Sonar, Sonar Pro, Sonar Reasoning | Cloud (Search-augmented) |
All providers support automatic failover. If one goes down, TITAN seamlessly routes to the next available provider.
# Configure via CLI
titan config set providers.groq.apiKey "gsk_..."
titan config set providers.openrouter.apiKey "sk-or-..."
# Or via environment variables
export GROQ_API_KEY="gsk_..."
export OPENROUTER_API_KEY="sk-or-..."Mission Control
An 11-panel dark-mode dashboard at http://localhost:48420.
| Panel | Description |
|---|---|
| Overview | System health, uptime, memory, model info, cost stats |
| WebChat | Real-time chat with your agent via WebSocket |
| Agents | Spawn, stop, and monitor agent instances |
| Settings | 6-tab live configuration (AI, Providers, Channels, Security, Gateway, Profile) |
| Channels | Connection status for all channel adapters |
| Skills | Installed skills with enable/disable controls |
| Sessions | Active sessions with message counts and history |
| Learning | Tool success rates and knowledge base stats |
| Security | Audit log and DM pairing management |
| Logs | Color-coded real-time log viewer with filtering |
| Memory Graph | Visual force-directed graph of entities and relationships |
All settings are editable live without restarting the gateway.
Mesh Networking
Deploy TITAN across multiple computers with zero configuration. Machines auto-discover each other and share models.
LAN Discovery (mDNS)
Machines on the same network find each other automatically via Bonjour/mDNS.
# On machine 1
titan mesh --init # Generates a shared secret
# On machine 2
titan mesh --join "your-secret-here"
# Check connectivity
titan mesh --statusTailscale Integration
If you run Tailscale, TITAN automatically discovers peers on your VPN — works across networks, data centers, and cloud instances.
{
"mesh": {
"enabled": true,
"tailscale": true
}
}Remote Model Routing
When a requested model isn't available locally, TITAN automatically routes to a peer that has it. Load-balanced across all available nodes.
Custom Skills
Create new tools for TITAN in seconds. Drop files into ~/.titan/skills/ and they're loaded automatically.
YAML Skills (Easiest)
# ~/.titan/skills/word_count.yaml
name: word_count
description: Count words, lines, and characters in a file
parameters:
filePath:
type: string
description: Path to the file
required: true
script: |
const fs = require('fs');
const content = fs.readFileSync(args.filePath, 'utf-8');
const lines = content.split('\n').length;
const words = content.split(/\s+/).filter(Boolean).length;
return 'Lines: ' + lines + ', Words: ' + words + ', Characters: ' + content.length;JavaScript Skills
// ~/.titan/skills/hello.js
export default {
name: 'hello',
description: 'Greet someone by name',
parameters: {
type: 'object',
properties: {
name: { type: 'string', description: 'Name to greet' }
},
required: ['name']
},
execute: async (args) => `Hello, ${args.name}!`
};AI-Generated Skills
titan skills --create "a tool that converts CSV files to JSON"TITAN writes, compiles, and hot-loads the skill instantly.
Skill Auto-Generation
When TITAN encounters a task it can't solve with existing tools, it can write a new skill on the fly, compile it, and use it immediately.
Channel Adapters
Connect TITAN to your messaging platforms:
| Channel | Library | Status |
|---|---|---|
| Discord | discord.js | Ready |
| Telegram | grammY | Ready |
| Slack | @slack/bolt | Ready |
| Google Chat | Webhooks | Ready |
| WebChat | Built-in WebSocket | Ready |
All channels support the DM pairing security system. Configure via ~/.titan/titan.json or Mission Control Settings.
Recipes
Reusable multi-step workflows triggered by slash commands.
# Built-in recipes
/code-review # Review files for bugs and improvements
/standup # Prepare daily standup notes
/explain # Explain code in plain English
/brainstorm # Generate ideas on a topic
/debug # Debug errors with guided analysisRecipes support parameterized prompts ({{variable}}), optional tool-direct steps, and confirmation gates.
CLI Reference
| Command | Description |
|---|---|
titan onboard |
Interactive setup wizard |
titan gateway |
Start Mission Control |
titan agent -m "..." |
Send a message to your agent |
titan send --to ch:id -m "..." |
Message a specific channel |
titan model --list |
Show all configured models |
titan model --discover |
Live-detect available models |
titan model --set <model> |
Switch the active model |
titan model --alias <name>=<model> |
Create a model alias |
titan agents |
Multi-agent management |
titan mesh --init |
Initialize mesh networking |
titan mesh --status |
View mesh peers and models |
titan skills |
List installed skills |
titan skills --create "..." |
Generate a skill with AI |
titan pairing |
Manage DM access control |
titan doctor |
System diagnostics |
titan config |
View/edit configuration |
titan graphiti --init |
Initialize knowledge graph |
titan graphiti --stats |
Graph statistics |
titan mcp |
Manage MCP servers |
titan recipe --list |
List and run saved recipes |
titan monitor |
Manage proactive file/schedule monitors |
titan update |
Update to latest version |
Configuration
All state lives in ~/.titan/:
| Path | Purpose |
|---|---|
titan.json |
Main configuration |
titan-data.json |
Runtime data (sessions, webhooks) |
graph.json |
Temporal knowledge graph |
knowledge.json |
Learning engine knowledge base |
profile.json |
User profile and preferences |
node-id |
Mesh networking node identity |
logs/ |
Daily log files |
plans/ |
Persistent task planner state |
skills/ |
Custom user skills (YAML, JS) |
recipes/ |
Saved recipe workflows |
Development
npm run build # tsup ESM production build
npm run test # vitest (99 tests, 10 files)
npm run ci # typecheck + full test suite
npm run typecheck # tsc --noEmit
npm run dev:gateway # Dev mode with tsx
npm run test:coverage # Coverage reportArchitecture
src/
agent/ Core agent loop, multi-agent, swarm, planner, autonomy
channels/ Discord, Telegram, Slack, Google Chat, WebChat
providers/ Anthropic, OpenAI, Google, Ollama + 10 OpenAI-compatible
memory/ Episodic, learning, relationship, temporal graph
skills/ 30 built-in tools + user skill loader
security/ Shield, sandbox, encryption, pairing
gateway/ HTTP/WS server + Mission Control dashboard
mesh/ mDNS + Tailscale peer discovery, WebSocket transport
recipes/ Workflow engine + persistence
mcp/ Model Context Protocol client
config/ Zod schema + loader
cli/ Commander.js CLI (15 commands)
utils/ Constants, logger, helpersAutonomy Modes
| Mode | Behavior |
|---|---|
autonomous |
Full auto — TITAN executes all tools without asking |
supervised |
Asks before dangerous operations (default) |
locked |
Asks permission for every tool call |
Configure via titan config set autonomy.mode supervised or Mission Control Settings.
Roadmap
See TASKS.md for the full development roadmap including Phase 3 and Phase 4 plans.
Upcoming
- GitHub skill (PR review, issues, repos)
- Email skill (IMAP/SMTP)
- Morning briefing recipe
- Computer use (screenshots, mouse, keyboard)
- WhatsApp channel adapter
- Image generation skill
- PDF parsing skill
- Persistent webhooks
- Plugin marketplace
Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes (
git commit -m "feat: add my feature") - Push (
git push origin feat/my-feature) - Open a Pull Request
The Future of TITAN
TITAN is under active development and growing fast. Every release brings new providers, new tools, and deeper intelligence. The roadmap includes computer use, GitHub/email integration, a plugin marketplace, WhatsApp and more channel adapters, image generation, and much more.
This is just the beginning. If you're looking for an AI agent framework that's lightweight enough to run on a Raspberry Pi but powerful enough to orchestrate multi-model workflows across a mesh of machines — you're in the right place.
Star the repo, join the journey, and help shape what autonomous AI agents look like.
Acknowledgments
TITAN stands on the shoulders of giants. Special thanks to the projects and people whose work made this possible.
Architectural Inspiration
- OpenClaw by Peter Steinberger — TITAN's architecture, CLI surface, tool signatures, workspace layout (AGENTS.md, SOUL.md, TOOLS.md), and DM pairing system are inspired by OpenClaw, the open-source personal AI assistant framework. Licensed under MIT.
Temporal Knowledge Graph
- Graphiti by Zep AI — TITAN's native temporal knowledge graph (
src/memory/graph.ts) is inspired by the Graphiti project's approach to episodic memory, entity extraction, and temporal graph architecture. Created by Daniel Chalef, Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais, and Jack Ryan. Licensed under Apache 2.0. Research paper: arXiv:2501.13956.
Open-Source Libraries
- Express — HTTP server and API routing
- Zod — Configuration schema validation
- Commander.js — CLI framework
- ws — WebSocket server for real-time communication
- Chalk — Terminal styling
- Ora — Terminal spinners
- Boxen — Terminal box rendering
- Inquirer — Interactive CLI prompts
- dotenv — Environment variable loading
- node-cron — Cron scheduling
- uuid — Unique ID generation
- Playwright — Browser automation (optional)
- bonjour-service — mDNS mesh discovery (optional)
- tsup — Build tooling
- Vitest — Test framework
- TypeScript — Type-safe development
Thank you to all the maintainers and contributors of these projects.
License
MIT License — Copyright (c) 2026 Tony Elliott
Created by Tony Elliott (Djtony707)