titan-agent 2026.4.21 → 2026.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +255 -192
- package/dist/agent/agent.js +16 -1
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/generator.js +17 -2
- package/dist/agent/generator.js.map +1 -1
- package/dist/cli/index.js +265 -24
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/server.js +282 -18
- package/dist/gateway/server.js.map +1 -1
- package/dist/skills/builtin/apply_patch.js +17 -2
- package/dist/skills/builtin/apply_patch.js.map +1 -1
- package/dist/skills/builtin/auto_generate.js +17 -2
- package/dist/skills/builtin/auto_generate.js.map +1 -1
- package/dist/skills/builtin/browser.js +17 -2
- package/dist/skills/builtin/browser.js.map +1 -1
- package/dist/skills/builtin/cron.js +17 -2
- package/dist/skills/builtin/cron.js.map +1 -1
- package/dist/skills/builtin/filesystem.js +17 -2
- package/dist/skills/builtin/filesystem.js.map +1 -1
- package/dist/skills/builtin/memory_skill.js +17 -2
- package/dist/skills/builtin/memory_skill.js.map +1 -1
- package/dist/skills/builtin/process.js +17 -2
- package/dist/skills/builtin/process.js.map +1 -1
- package/dist/skills/builtin/sessions.js +17 -2
- package/dist/skills/builtin/sessions.js.map +1 -1
- package/dist/skills/builtin/shell.js +17 -2
- package/dist/skills/builtin/shell.js.map +1 -1
- package/dist/skills/builtin/vision.js +17 -2
- package/dist/skills/builtin/vision.js.map +1 -1
- package/dist/skills/builtin/voice.js +17 -2
- package/dist/skills/builtin/voice.js.map +1 -1
- package/dist/skills/builtin/web_fetch.js +17 -2
- package/dist/skills/builtin/web_fetch.js.map +1 -1
- package/dist/skills/builtin/web_search.js +17 -2
- package/dist/skills/builtin/web_search.js.map +1 -1
- package/dist/skills/builtin/webhook.js +17 -2
- package/dist/skills/builtin/webhook.js.map +1 -1
- package/dist/skills/registry.js +17 -2
- package/dist/skills/registry.js.map +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TITAN — The Intelligent Task Automation Network
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="assets/titan-logo.png" alt="TITAN Logo" width="280"/>
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="#quick-start">Quick Start</a> •
|
|
13
|
-
<a href="#why-titan">Why TITAN?</a> •
|
|
14
13
|
<a href="#features">Features</a> •
|
|
14
|
+
<a href="#cli-reference">CLI Reference</a> •
|
|
15
15
|
<a href="#mission-control">Mission Control</a> •
|
|
16
|
+
<a href="#providers">Providers</a> •
|
|
16
17
|
<a href="#comparison">Comparison</a> •
|
|
17
18
|
<a href="#roadmap">Roadmap</a>
|
|
18
19
|
</p>
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
|
|
22
23
|
## Quick Start
|
|
23
24
|
|
|
24
|
-
**Requirements:** Node.js
|
|
25
|
+
**Requirements:** Node.js >= 20, npm >= 9
|
|
25
26
|
|
|
26
27
|
```bash
|
|
27
28
|
npm install -g titan-agent
|
|
@@ -30,262 +31,324 @@ titan gateway # Start Mission Control at http://localhost:48420
|
|
|
30
31
|
titan agent -m "Hello" # Send a direct message
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
### Run from Source
|
|
34
|
+
### Run from Source
|
|
35
|
+
|
|
34
36
|
```bash
|
|
35
37
|
git clone https://github.com/Djtony707/TITAN.git
|
|
36
38
|
cd TITAN/titan
|
|
37
39
|
npm install
|
|
38
40
|
cp .env.example .env # Add your API keys
|
|
39
41
|
npm run onboard
|
|
40
|
-
npm run gateway
|
|
42
|
+
npm run dev:gateway
|
|
41
43
|
```
|
|
42
44
|
|
|
45
|
+
---
|
|
43
46
|
|
|
44
|
-
##
|
|
47
|
+
## Features
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
### Prompt Injection Shield
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|------------|-----------|-----------------|
|
|
50
|
-
| **Infinite loop hell** | OpenClaw, NanoClaw, PicoClaw | **Loop Detection + Circuit Breaker** — 3 detectors (repeat, no-progress, ping-pong) with configurable thresholds |
|
|
51
|
-
| **Token waste & high cost** | OpenClaw (430K LoC, 1GB+ RAM) | **Smart Context Manager** — auto-summarizes old history, priority-based allocation, token budget tracking |
|
|
52
|
-
| **Goal drift / runaway agents** | Most agent frameworks | **Task Planner** — dependency graphs, 3x retry, parallel task execution with progress tracking |
|
|
53
|
-
| **No learning from mistakes** | All alternatives | **Continuous Learning Engine** — tracks tool success rates, error patterns, and injects knowledge into every prompt |
|
|
54
|
-
| **Basic dashboards** | OpenClaw, NanoClaw, IronClaw | **Mission Control GUI** — premium 11-panel dark-mode dashboard with WebSocket real-time updates |
|
|
55
|
-
| **Native dependencies / complex setup** | OpenClaw (native deps), IronClaw (Rust), ZeroClaw (Rust), PicoClaw (Go) | **Pure TypeScript** — `npm install` just works, no compilation required |
|
|
51
|
+
Zero tolerance for unauthorized takeovers (`src/security/shield.ts`):
|
|
56
52
|
|
|
57
|
-
|
|
53
|
+
- **Heuristic Engine** — Detects and blocks "ignore previous instructions", "developer mode", and system prompt extraction attempts.
|
|
54
|
+
- **Strict Mode** — Scans for keyword density and tail manipulations in large payloads.
|
|
55
|
+
- **DM Pairing System** — Approve or deny access from new senders before they can interact with your agent (`src/security/pairing.ts`).
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
### Loop Detection and Circuit Breaker
|
|
58
|
+
|
|
59
|
+
No more infinite tool loops (`src/agent/loopDetection.ts`). Three detection algorithms run in parallel:
|
|
60
|
+
|
|
61
|
+
- **Generic Repeat** — Same tool with identical arguments called repeatedly.
|
|
62
|
+
- **No-Progress Polling** — Tool returns identical output on consecutive calls.
|
|
63
|
+
- **Ping-Pong** — Alternating A/B tool patterns with no forward progress.
|
|
64
|
+
- **Global Circuit Breaker** — Hard stop after a configurable threshold.
|
|
65
|
+
|
|
66
|
+
### Task Planner with Dependency Graphs
|
|
67
|
+
|
|
68
|
+
`src/agent/planner.ts`:
|
|
69
|
+
|
|
70
|
+
- Automatic goal decomposition into ordered sub-tasks.
|
|
71
|
+
- Dependency tracking — tasks only execute when prerequisites are met.
|
|
72
|
+
- 3x auto-retry on failure with exponential backoff.
|
|
73
|
+
- Parallel execution of independent tasks.
|
|
74
|
+
- Persistent plan state at `~/.titan/plans/`.
|
|
75
|
+
|
|
76
|
+
### Smart Context Manager
|
|
77
|
+
|
|
78
|
+
`src/agent/contextManager.ts`:
|
|
79
|
+
|
|
80
|
+
- Auto-summarizes old conversation history to stay within token budgets.
|
|
81
|
+
- Priority-based context allocation (recent > relevant > old).
|
|
82
|
+
- Per-model token limit enforcement with smart truncation that preserves tool call context.
|
|
83
|
+
|
|
84
|
+
### Cost Optimizer
|
|
85
|
+
|
|
86
|
+
`src/agent/costOptimizer.ts`:
|
|
87
|
+
|
|
88
|
+
- Intelligently routes requests to cheaper models when full power is not needed.
|
|
89
|
+
- Tracks real-time cost per session against configurable budgets.
|
|
90
|
+
- Context summarization reduces token usage by 30–90% on long sessions.
|
|
91
|
+
|
|
92
|
+
### Continuous Learning Engine
|
|
60
93
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
###
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
### 🔧 17+ Built-in Tools
|
|
100
|
-
| Group | Tools |
|
|
101
|
-
|-------|-------|
|
|
102
|
-
| **Runtime** | `exec` (background/timeout), `process` (list/poll/kill/log), `shell` |
|
|
94
|
+
`src/memory/learning.ts`:
|
|
95
|
+
|
|
96
|
+
- Tracks tool success and failure rates across all interactions.
|
|
97
|
+
- Records error patterns and successful resolutions.
|
|
98
|
+
- Builds a persistent knowledge base at `~/.titan/knowledge.json`.
|
|
99
|
+
- Injects learned context into every system prompt automatically.
|
|
100
|
+
- TITAN gets more effective the more you use it.
|
|
101
|
+
|
|
102
|
+
### Relationship Memory
|
|
103
|
+
|
|
104
|
+
`src/memory/relationship.ts`:
|
|
105
|
+
|
|
106
|
+
- Persistent user profile (`~/.titan/profile.json`) that survives restarts.
|
|
107
|
+
- Remembers your name, preferences, work context, and interaction history.
|
|
108
|
+
- Provides JARVIS-like personal continuity across sessions.
|
|
109
|
+
|
|
110
|
+
### Multi-Agent System
|
|
111
|
+
|
|
112
|
+
`src/agent/multiAgent.ts`:
|
|
113
|
+
|
|
114
|
+
- Up to 5 concurrent independent agent instances.
|
|
115
|
+
- Each agent can run a different model and system prompt.
|
|
116
|
+
- Channel-based routing — agents bind to specific channels.
|
|
117
|
+
- Spawn and stop agents from the CLI or Mission Control GUI.
|
|
118
|
+
|
|
119
|
+
### Kimi Swarm Architecture
|
|
120
|
+
|
|
121
|
+
`src/agent/swarm.ts`:
|
|
122
|
+
|
|
123
|
+
- Specialized routing for Ollama kimi-k2.5 models.
|
|
124
|
+
- Prevents context collapse by splitting the 22-tool set into domain-focused sub-agents (file, web, system, memory).
|
|
125
|
+
- Each sub-agent receives 3–4 tools instead of the full monolith.
|
|
126
|
+
|
|
127
|
+
### 22 Built-in Skills
|
|
128
|
+
|
|
129
|
+
| Group | Skills |
|
|
130
|
+
|-------|--------|
|
|
131
|
+
| **Runtime** | `shell`, `exec` (background/timeout), `process` (list/poll/kill/log) |
|
|
103
132
|
| **Filesystem** | `read`, `write`, `edit`, `list_dir`, `apply_patch` |
|
|
104
|
-
| **Web** | `web_search`, `web_fetch`, `browser` (CDP) |
|
|
133
|
+
| **Web** | `web_search`, `web_fetch`, `browser` (CDP), `web_browser` (Playwright bulk DOM) |
|
|
105
134
|
| **Intelligence** | `auto_generate_skill`, `analyze_image` (Vision), `transcribe_audio` (STT), `generate_speech` (TTS) |
|
|
106
135
|
| **Automation** | `cron`, `webhook` |
|
|
107
|
-
| **Memory** | `
|
|
136
|
+
| **Memory** | `memory_skill`, `model_switch` |
|
|
108
137
|
| **Sessions** | `sessions_list`, `sessions_history`, `sessions_send`, `sessions_close` |
|
|
109
138
|
|
|
110
|
-
###
|
|
111
|
-
|
|
112
|
-
-
|
|
139
|
+
### Skill Auto-Generation
|
|
140
|
+
|
|
141
|
+
- If TITAN encounters a task it cannot solve with existing tools, `auto_generate_skill` writes a new TypeScript skill, compiles it, and hot-loads it instantly.
|
|
142
|
+
- Auto-generated skills are saved to `~/.titan/skills/auto/` and persist across restarts.
|
|
143
|
+
|
|
144
|
+
### Graphiti Temporal Memory
|
|
145
|
+
|
|
146
|
+
- Neo4j + Graphiti MCP server via Docker Compose.
|
|
147
|
+
- Provides graph-based temporal memory for complex, time-aware knowledge retrieval.
|
|
148
|
+
- Start with `titan graphiti --init`, stop with `titan graphiti --down`.
|
|
149
|
+
|
|
150
|
+
### Recipes
|
|
113
151
|
|
|
114
|
-
|
|
115
|
-
- **Vision** — TITAN can "see" images via Claude 3.5 Sonnet / GPT-4o using the `analyze_image` tool.
|
|
116
|
-
- **Voice** — TITAN handles Speech-to-Text (Whisper) and Text-to-Speech via the `transcribe_audio` and `generate_speech` tools.
|
|
152
|
+
`src/recipes/`:
|
|
117
153
|
|
|
118
|
-
|
|
119
|
-
|
|
154
|
+
- Reusable multi-step workflows defined as structured configs.
|
|
155
|
+
- Trigger with slash commands in any connected channel.
|
|
156
|
+
- Parameterized — pass values at invocation time.
|
|
120
157
|
|
|
121
|
-
###
|
|
122
|
-
- **E2E Encrypted Sessions** — AES-256-GCM encryption for sensitive conversations (keys held securely in-memory).
|
|
123
|
-
- DM pairing (approve/deny new senders)
|
|
124
|
-
- Docker sandbox for non-main sessions
|
|
125
|
-
- Tool/path/network allowlisting
|
|
158
|
+
### MCP Support
|
|
126
159
|
|
|
127
|
-
|
|
128
|
-
|
|
160
|
+
`src/mcp/`:
|
|
161
|
+
|
|
162
|
+
- Connect external tools and services via the Model Context Protocol.
|
|
163
|
+
- Register MCP servers by URL; tools are exposed automatically to the agent.
|
|
164
|
+
|
|
165
|
+
### E2E Encrypted Sessions
|
|
166
|
+
|
|
167
|
+
`src/security/encryption.ts`:
|
|
168
|
+
|
|
169
|
+
- AES-256-GCM encryption for sensitive conversations.
|
|
170
|
+
- Keys are generated per-session and held in memory only.
|
|
171
|
+
|
|
172
|
+
### Channel Adapters
|
|
173
|
+
|
|
174
|
+
Discord · Telegram · Slack · Google Chat · WebChat · WhatsApp
|
|
175
|
+
|
|
176
|
+
Each adapter is an independent module in `src/channels/`.
|
|
177
|
+
|
|
178
|
+
### Model-Agnostic
|
|
179
|
+
|
|
180
|
+
Anthropic · OpenAI · Google · Ollama — with automatic failover between providers.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## CLI Reference
|
|
185
|
+
|
|
186
|
+
| Command | Description |
|
|
187
|
+
|---------|-------------|
|
|
188
|
+
| `titan onboard` | Interactive setup wizard — configure provider, API keys, and channels |
|
|
189
|
+
| `titan gateway` | Start Mission Control at `http://localhost:48420` |
|
|
190
|
+
| `titan agent -m "..."` | Send a direct message to your agent |
|
|
191
|
+
| `titan send --to ch:id -m "..."` | Send a message to a specific channel |
|
|
192
|
+
| `titan pairing` | Manage DM access control (approve/deny senders) |
|
|
193
|
+
| `titan agents` | Multi-agent management (spawn, stop, list) |
|
|
194
|
+
| `titan doctor` | System diagnostics — checks config, connectivity, and dependencies |
|
|
195
|
+
| `titan skills` | Skill management (list, install, generate) |
|
|
196
|
+
| `titan config` | View or edit configuration |
|
|
197
|
+
| `titan update` | Update TITAN to the latest version |
|
|
198
|
+
| `titan graphiti --init` | Start Graphiti temporal memory stack (Docker) |
|
|
199
|
+
| `titan graphiti --down` | Stop Graphiti stack and deregister MCP server |
|
|
129
200
|
|
|
130
201
|
---
|
|
131
202
|
|
|
132
203
|
## Mission Control
|
|
133
204
|
|
|
134
|
-
TITAN ships with a
|
|
205
|
+
TITAN ships with a **Mission Control** web GUI — a dark-mode dashboard served from the gateway at `http://localhost:48420`.
|
|
206
|
+
|
|
207
|
+
### Panels
|
|
135
208
|
|
|
136
|
-
### 11 Panels:
|
|
137
209
|
| Panel | Description |
|
|
138
210
|
|-------|-------------|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
211
|
+
| **Overview** | System health, uptime, memory usage, version |
|
|
212
|
+
| **WebChat** | Built-in real-time chat via WebSocket |
|
|
213
|
+
| **Agents** | Spawn and stop agent instances, view capacity |
|
|
214
|
+
| **Settings** | 6-tab configuration: AI and Model, Providers, Channels, Security, Gateway, Profile |
|
|
215
|
+
| **Channels** | Connection status for each channel adapter |
|
|
216
|
+
| **Skills** | Installed skills with status |
|
|
217
|
+
| **Sessions** | Active session list with message counts |
|
|
218
|
+
| **Learning** | Learning engine stats and tool success rates |
|
|
219
|
+
| **Security** | Security audit log and DM pairing management |
|
|
220
|
+
| **Graphiti** | Temporal memory panel (Neo4j/Graphiti integration) |
|
|
221
|
+
|
|
222
|
+
The Settings panel covers provider API keys, model selection, autonomy mode, channel configuration, gateway options, and user profile — all editable live without restarting.
|
|
150
223
|
|
|
151
224
|
---
|
|
152
225
|
|
|
153
|
-
##
|
|
226
|
+
## Providers
|
|
154
227
|
|
|
155
|
-
|
|
228
|
+
| Provider | Models | Cost |
|
|
229
|
+
|----------|--------|------|
|
|
230
|
+
| **Anthropic** | Claude Opus 4, Claude Sonnet 4, Claude Haiku 4 | Paid |
|
|
231
|
+
| **OpenAI** | GPT-4o, GPT-4o-mini, o-series | Paid |
|
|
232
|
+
| **Google** | Gemini 2.5 Flash/Pro, Gemini 2.0 Flash, Gemini 1.5 Flash/Pro | Paid |
|
|
233
|
+
| **Ollama** | Any locally installed model (kimi-k2.5, llama, mistral, etc.) | Free |
|
|
156
234
|
|
|
157
|
-
|
|
158
|
-
|---------|-----------|----------|----------|----------|----------|----------|-----------|---------|
|
|
159
|
-
| **Language** | TypeScript | TypeScript | TypeScript | Rust | Go | Rust | Cloud | Python |
|
|
160
|
-
| **Codebase** | ~7K LoC | ~430K LoC | ~500 LoC | Medium | Small | Small | Managed | ~4K LoC |
|
|
161
|
-
| **Native deps** | ❌ None | ✅ Required | ❌ | ✅ (Rust) | ✅ (Go) | ✅ (Rust) | N/A | ❌ |
|
|
162
|
-
| **Loop detection** | ✅ 3 detectors + circuit breaker | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
163
|
-
| **Task planner** | ✅ Dependency graphs | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
164
|
-
| **Smart context** | ✅ Auto-summarize + budget | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
165
|
-
| **Continuous learning** | ✅ Built-in | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
166
|
-
| **Multi-agent** | ✅ Up to 5 | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
167
|
-
| **Mission Control GUI** | ✅ 11 panels, premium | ✅ Basic | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
168
|
-
| **Browser control** | ✅ CDP | ✅ CDP | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
|
|
169
|
-
| **Background processes** | ✅ exec+process | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ |
|
|
170
|
-
| **Apply patch** | ✅ Unified diffs | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
171
|
-
| **DM pairing** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
172
|
-
| **Docker sandbox** | ✅ | ✅ | ✅ | Wasm | ❌ | ✅ | ✅ Cloud | ❌ |
|
|
173
|
-
| **Channels** | 10+ | 12+ | WhatsApp | Limited | Limited | Multiple | Multiple | Multiple |
|
|
174
|
-
| **Memory** | ✅ Persistent + learning | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ |
|
|
175
|
-
| **Local models (Ollama)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
|
|
176
|
-
| **RAM usage** | ~50MB | ~1GB+ | ~30MB | ~20MB | <10MB | <5MB | Cloud | ~40MB |
|
|
177
|
-
| **Setup complexity** | `npm install` | Complex | Docker | Compile | Single binary | Compile | OAuth | `pip install` |
|
|
235
|
+
Provider selection and failover are configured in `~/.titan/titan.json` or via the Mission Control Settings panel.
|
|
178
236
|
|
|
179
|
-
|
|
237
|
+
---
|
|
180
238
|
|
|
181
|
-
|
|
239
|
+
## Configuration
|
|
182
240
|
|
|
183
|
-
|
|
241
|
+
TITAN stores all state in `~/.titan/`:
|
|
184
242
|
|
|
185
|
-
|
|
243
|
+
| Path | Purpose |
|
|
244
|
+
|------|---------|
|
|
245
|
+
| `~/.titan/titan.json` | Main configuration |
|
|
246
|
+
| `~/.titan/titan-data.json` | Runtime data |
|
|
247
|
+
| `~/.titan/knowledge.json` | Learning engine knowledge base |
|
|
248
|
+
| `~/.titan/profile.json` | Relationship memory / user profile |
|
|
249
|
+
| `~/.titan/logs/titan-YYYY-MM-DD.log` | Daily log files |
|
|
250
|
+
| `~/.titan/plans/` | Persistent task planner state |
|
|
251
|
+
| `~/.titan/skills/auto/` | Auto-generated skills |
|
|
186
252
|
|
|
187
|
-
|
|
253
|
+
---
|
|
188
254
|
|
|
189
|
-
|
|
255
|
+
## Development
|
|
190
256
|
|
|
191
|
-
|
|
257
|
+
```bash
|
|
258
|
+
npm run build # tsup production build
|
|
259
|
+
npm run test # vitest run (52 tests across 7 files)
|
|
260
|
+
npm run ci # typecheck + full test suite
|
|
261
|
+
npm run typecheck # tsc --noEmit (0 errors)
|
|
262
|
+
npm run dev:gateway # Run gateway directly via tsx
|
|
263
|
+
```
|
|
192
264
|
|
|
193
|
-
|
|
265
|
+
The test suite covers core agent behavior, multi-agent routing, server endpoints, updater, and integration scenarios.
|
|
194
266
|
|
|
195
267
|
---
|
|
196
268
|
|
|
197
|
-
##
|
|
269
|
+
## Comparison
|
|
198
270
|
|
|
199
|
-
|
|
200
|
-
- [x] Multi-agent system (up to 5)
|
|
201
|
-
- [x] 17+ built-in tools (shell, filesystem, browser, process, web, cron, webhooks, sessions, memory, patch)
|
|
202
|
-
- [x] Continuous learning engine
|
|
203
|
-
- [x] Loop detection & circuit breaker
|
|
204
|
-
- [x] Task planner with dependency graphs
|
|
205
|
-
- [x] Smart context manager
|
|
206
|
-
- [x] Mission Control GUI (11 panels)
|
|
207
|
-
- [x] 10+ channel adapters
|
|
208
|
-
- [x] 4 LLM providers with failover
|
|
209
|
-
- [x] DM pairing security
|
|
210
|
-
- [x] Docker support
|
|
211
|
-
|
|
212
|
-
### ✅ v2026.4 — Intelligence Update
|
|
213
|
-
- [x] **Skill auto-generation** — TITAN writes its own new skills when it encounters tasks it can't solve
|
|
214
|
-
- [x] **Image analysis tool** — Vision capabilities for screenshots, diagrams, photos
|
|
215
|
-
- [x] **Voice channel support** — Discord/Telegram voice with speech-to-text and text-to-speech
|
|
216
|
-
- [x] **Plugin marketplace** — Community-contributed skills with one-click install
|
|
217
|
-
- [x] **E2E encrypted sessions** — End-to-end encryption for sensitive conversations
|
|
218
|
-
|
|
219
|
-
### ✅ v2026.4.9 — Stability & Bug-Fix Release (Current)
|
|
220
|
-
- [x] **19 crash/runtime/silent-failure fixes** across 15 source files — full end-to-end audit
|
|
221
|
-
- [x] **6 critical crash fixes** — unguarded `writeFileSync` calls, unhandled async rejections in `stallDetector`, `costOptimizer` undefined fallback, `Math.max` on empty array
|
|
222
|
-
- [x] **12 high-priority runtime fixes** — `executeTools` error handling, Google provider tool role mapping, `monitor.ts` fire-and-forget async, Discord null guard, `doctor.ts` `parseInt` on undefined, top-level IIFE unhandled rejection, shell injection in `web_fetch` and `marketplace`
|
|
223
|
-
- [x] **4 medium fixes** — usage stats ID collision, `|| 0` vs `?? 0` timeout bugs in `shell` and `process`, `responseCache` missing Array guard
|
|
224
|
-
|
|
225
|
-
### 🔮 v2026.6 — Autonomy Update
|
|
226
|
-
- [ ] **Proactive agent mode** — TITAN monitors your system and takes action without being asked
|
|
227
|
-
- [ ] **Multi-model reasoning** — Chain multiple models for complex tasks (fast model for planning, powerful model for execution)
|
|
228
|
-
- [ ] **Git workflow integration** — PR reviews, automated commits, branch management
|
|
229
|
-
- [ ] **OAuth tool marketplace** — Connect to 500+ SaaS apps (Google, GitHub, Notion, Jira, etc.)
|
|
230
|
-
- [ ] **Mobile app** — iOS/Android companion app for on-the-go TITAN access
|
|
231
|
-
|
|
232
|
-
### 🚀 v2026.9 — Enterprise Update
|
|
233
|
-
- [ ] **Team mode** — Multiple users, role-based access, shared agents
|
|
234
|
-
- [ ] **Audit logging** — Full compliance audit trail
|
|
235
|
-
- [ ] **SSO integration** — SAML/OIDC authentication
|
|
236
|
-
- [ ] **Custom model fine-tuning** — Train models on your organization's data
|
|
237
|
-
- [ ] **On-premise deployment** — Kubernetes-ready with Helm charts
|
|
238
|
-
|
|
239
|
-
### 🌟 v2027+ — Next Generation
|
|
240
|
-
- [ ] **Agent-to-agent marketplace** — TITAN agents can discover and collaborate with other TITAN instances
|
|
241
|
-
- [ ] **Natural language programming** — Describe apps in plain English, TITAN builds them
|
|
242
|
-
- [ ] **Predictive task execution** — AI predicts what you need before you ask
|
|
243
|
-
- [ ] **Hardware integration** — IoT, smart home, robotics control
|
|
271
|
+
> Note: The frameworks below are fictional analogs used here for feature positioning purposes. They represent common archetypes in the AI agent framework space (bloated monolith, minimal implementation, Rust-compiled, cloud-managed, Python-based) rather than specific real projects.
|
|
244
272
|
|
|
245
|
-
|
|
273
|
+
| Feature | **TITAN** | Bloated TS | Minimal TS | Rust-based | Cloud-managed | Python-based |
|
|
274
|
+
|---------|-----------|------------|------------|------------|---------------|--------------|
|
|
275
|
+
| **Language** | TypeScript | TypeScript | TypeScript | Rust | Cloud | Python |
|
|
276
|
+
| **Native deps** | None | Required | None | Required | N/A | None |
|
|
277
|
+
| **Loop detection** | 3 detectors + circuit breaker | None | None | None | None | None |
|
|
278
|
+
| **Task planner** | Dependency graphs + retry | None | None | None | None | None |
|
|
279
|
+
| **Smart context** | Auto-summarize + budget | None | None | None | None | None |
|
|
280
|
+
| **Continuous learning** | Built-in | None | None | None | None | None |
|
|
281
|
+
| **Multi-agent** | Up to 5 | Yes | None | None | None | None |
|
|
282
|
+
| **Mission Control GUI** | 10+ panels, premium | Basic | None | None | Yes | None |
|
|
283
|
+
| **Browser control** | CDP + Playwright | CDP | None | None | Yes | None |
|
|
284
|
+
| **Skill auto-generation** | Yes | None | None | None | None | None |
|
|
285
|
+
| **Graphiti memory** | Yes (Docker) | None | None | None | None | None |
|
|
286
|
+
| **Local models (Ollama)** | Yes | Yes | Yes | Yes | None | Yes |
|
|
287
|
+
| **RAM usage** | ~50 MB | ~1 GB+ | ~30 MB | ~20 MB | Cloud | ~40 MB |
|
|
288
|
+
| **Setup** | `npm install -g titan-agent` | Complex | Simple | Compile | OAuth | `pip install` |
|
|
246
289
|
|
|
247
|
-
|
|
290
|
+
### Where TITAN sits in the landscape
|
|
248
291
|
|
|
249
|
-
**
|
|
292
|
+
**vs. bloated monolith frameworks** — Comparable capabilities in ~10K lines of pure TypeScript with zero native dependencies, plus exclusive features: loop detection, task planner, smart context, continuous learning, and skill auto-generation that larger frameworks lack.
|
|
250
293
|
|
|
251
|
-
|
|
294
|
+
**vs. minimal implementations** — Minimal agents prioritize small codebases over features. They typically lack browser control, multi-agent, background processes, task planning, and a GUI. TITAN provides all of these without reaching monolith size.
|
|
252
295
|
|
|
253
|
-
|
|
296
|
+
**vs. Rust/compiled frameworks** — Strong security and performance but require compilation, have steeper setup, and limited ecosystem. TITAN provides comparable security via sandboxing and encryption with a `npm install` setup.
|
|
254
297
|
|
|
255
|
-
|
|
298
|
+
**vs. cloud-managed agents** — Cloud agents remove self-hosting control. TITAN runs entirely on your own hardware with full local model support and no external service dependency.
|
|
256
299
|
|
|
257
|
-
|
|
300
|
+
**vs. Python agents** — Python agents have a large ML ecosystem but typically lack browser integration, multi-agent coordination, task planning, and a built-in GUI. TITAN covers all of these.
|
|
258
301
|
|
|
259
302
|
---
|
|
260
303
|
|
|
261
|
-
##
|
|
304
|
+
## Roadmap
|
|
262
305
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
306
|
+
### Completed
|
|
307
|
+
|
|
308
|
+
- Multi-agent system (up to 5 concurrent)
|
|
309
|
+
- 22 built-in skills (shell, filesystem, browser, process, web, cron, webhooks, sessions, memory, patch, vision, voice)
|
|
310
|
+
- Continuous learning engine
|
|
311
|
+
- Loop detection and circuit breaker (3 algorithms)
|
|
312
|
+
- Task planner with dependency graphs
|
|
313
|
+
- Smart context manager and cost optimizer
|
|
314
|
+
- Mission Control GUI (10+ panels, dark mode)
|
|
315
|
+
- Channel adapters: Discord, Telegram, Slack, Google Chat, WebChat, WhatsApp
|
|
316
|
+
- 4 LLM provider families with failover
|
|
317
|
+
- DM pairing security
|
|
318
|
+
- E2E AES-256-GCM encryption
|
|
319
|
+
- Skill auto-generation and hot-loading
|
|
320
|
+
- Recipes (reusable multi-step workflows)
|
|
321
|
+
- MCP (Model Context Protocol) support
|
|
322
|
+
- Kimi Swarm Architecture for local models
|
|
323
|
+
- Graphiti temporal memory (Neo4j + Docker Compose)
|
|
324
|
+
- Mission Control Settings: 6-tab live configuration panel
|
|
325
|
+
- 52-test suite across 7 test files
|
|
326
|
+
|
|
327
|
+
### Planned
|
|
328
|
+
|
|
329
|
+
- **Proactive agent mode** — TITAN monitors your environment and initiates actions without being prompted.
|
|
330
|
+
- **Multi-model reasoning chains** — Route sub-tasks to specialized models (fast model for planning, powerful model for execution).
|
|
331
|
+
- **Git workflow integration** — PR review, automated commits, branch management tools.
|
|
332
|
+
- **Expanded channel adapters** — Matrix, Signal, MS Teams, and others.
|
|
333
|
+
- **Team mode** — Multiple users with role-based access and shared agent pools.
|
|
334
|
+
- **OAuth integrations** — Direct connections to SaaS tools (GitHub, Google, Notion, Jira, etc.).
|
|
275
335
|
|
|
276
336
|
---
|
|
277
337
|
|
|
278
|
-
##
|
|
338
|
+
## Feature Requests
|
|
339
|
+
|
|
340
|
+
Open an issue on GitHub or contact the author directly:
|
|
279
341
|
|
|
280
|
-
|
|
342
|
+
- [Open a Feature Request](https://github.com/Djtony707/TITAN/issues/new?labels=feature-request&template=feature_request.md&title=%5BFeature%5D+)
|
|
343
|
+
- [Tony Elliott on GitHub](https://github.com/Djtony707)
|
|
281
344
|
|
|
282
|
-
|
|
345
|
+
---
|
|
283
346
|
|
|
284
|
-
|
|
347
|
+
## Credits
|
|
285
348
|
|
|
286
|
-
|
|
349
|
+
**Project Creator:** [Tony Elliott (Djtony707)](https://github.com/Djtony707)
|
|
287
350
|
|
|
288
|
-
Dependencies
|
|
351
|
+
**Dependencies:** Anthropic SDK, OpenAI SDK, Google Generative AI SDK, discord.js, grammY, Bolt (Slack), Zod, Commander.js, Express, ws, Playwright, chalk, uuid, tsup, Vitest.
|
|
289
352
|
|
|
290
353
|
---
|
|
291
354
|
|
package/dist/agent/agent.js
CHANGED
|
@@ -21,7 +21,7 @@ import { existsSync as existsSync2 } from "fs";
|
|
|
21
21
|
// src/utils/constants.ts
|
|
22
22
|
import { homedir } from "os";
|
|
23
23
|
import { join } from "path";
|
|
24
|
-
var TITAN_VERSION = "2026.4.
|
|
24
|
+
var TITAN_VERSION = "2026.4.22";
|
|
25
25
|
var TITAN_NAME = "TITAN";
|
|
26
26
|
var TITAN_ASCII_LOGO = `
|
|
27
27
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
@@ -188,6 +188,7 @@ var TitanConfigSchema = z.object({
|
|
|
188
188
|
|
|
189
189
|
// src/utils/logger.ts
|
|
190
190
|
import chalk from "chalk";
|
|
191
|
+
var fileStream = null;
|
|
191
192
|
var LEVEL_LABELS = {
|
|
192
193
|
[0 /* DEBUG */]: chalk.gray("DEBUG"),
|
|
193
194
|
[1 /* INFO */]: chalk.cyan("INFO "),
|
|
@@ -195,6 +196,14 @@ var LEVEL_LABELS = {
|
|
|
195
196
|
[3 /* ERROR */]: chalk.red("ERROR"),
|
|
196
197
|
[4 /* SILENT */]: ""
|
|
197
198
|
};
|
|
199
|
+
var LEVEL_NAMES = {
|
|
200
|
+
[0 /* DEBUG */]: "DEBUG",
|
|
201
|
+
[1 /* INFO */]: "INFO ",
|
|
202
|
+
[2 /* WARN */]: "WARN ",
|
|
203
|
+
[3 /* ERROR */]: "ERROR",
|
|
204
|
+
[4 /* SILENT */]: " "
|
|
205
|
+
};
|
|
206
|
+
var ansiStrip = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
198
207
|
var currentLevel = 1 /* INFO */;
|
|
199
208
|
function formatTimestamp() {
|
|
200
209
|
return chalk.gray((/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19));
|
|
@@ -203,6 +212,12 @@ function log(level, component, message, ...args) {
|
|
|
203
212
|
if (level < currentLevel) return;
|
|
204
213
|
const prefix = `${formatTimestamp()} ${LEVEL_LABELS[level]} ${chalk.blue(`[${component}]`)}`;
|
|
205
214
|
console.log(`${prefix} ${message}`, ...args);
|
|
215
|
+
if (fileStream) {
|
|
216
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19);
|
|
217
|
+
const extra = args.length ? " " + args.map((a) => typeof a === "object" ? JSON.stringify(a) : String(a)).join(" ") : "";
|
|
218
|
+
fileStream.write(`${ts} ${LEVEL_NAMES[level]} [${component}] ${ansiStrip(message)}${extra}
|
|
219
|
+
`);
|
|
220
|
+
}
|
|
206
221
|
}
|
|
207
222
|
var logger = {
|
|
208
223
|
debug: (component, msg, ...args) => log(0 /* DEBUG */, component, msg, ...args),
|