Skip to content

Self-improving AI Employees for everyone

feat: LLM config refresh, Telegram fixes, markdown tag sanitization, bump to v0.0.44

trohitg6f209dc2fa1f
diff --git a/.env.template b/.env.template
index 31877120..80fd72ec 100644
--- a/.env.template
+++ b/.env.template
@@ -82,8 +82,4 @@ WEBSOCKET_API_KEY=
# Default port for AI proxy servers (e.g., Ollama, Claude Code CLI proxy)
AI_PROXY_DEFAULT_PORT=11434
-# External API Keys (managed through UI, these are optional defaults)
-OPENAI_API_KEY=
-GOOGLE_MAPS_API_KEY=
-ANTHROPIC_API_KEY=
-GOOGLE_AI_API_KEY=
+
diff --git a/README.md b/README.md
index 40c85428..8c54d88d 100644
--- a/README.md
+++ b/README.md
@@ -84,7 +84,25 @@ Create AI agents that remember conversations, use tools, and work together. Choo
- Search your files with AI
### Build Agent Teams
-Create teams of specialized agents that delegate tasks to each other - a coding agent, a web agent, and a task agent working together.
+
+```
+ +------------------+
+ | AI Employee |
+ | (Team Lead) |
+ +--------+---------+
+ | input-teammates
+ +-----------------+------------------+
+ | | |
+ +------v------+ +------v------+ +-------v-----+
+ | Coding Agent| | Web Agent | | Task Agent |
+ +-------------+ +-------------+ +-------------+
+```
+
+- **AI Employee / Orchestrator** - Team lead agents for coordinating multiple specialized agents
+- **Intelligent Delegation** - AI decides when to delegate based on task context
+- **Delegation Tools** - Connected agents become `delegate_to_*` tools automatically
+- **13 Specialized Agents** - Android, Coding, Web, Task, Social, Travel, Tool, Productivity, Payments, Consumer, Autonomous, Orchestrator
+- **Team Monitor** - Real-time visualization of team operations
### Run Code
- Execute Python, JavaScript, and TypeScript code
diff --git a/package.json b/package.json
index 267cfbd0..658a8d71 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "machinaos",
- "version": "0.0.43",
+ "version": "0.0.44",
"description": "Open source workflow automation platform with AI agents, React Flow, and n8n-inspired architecture",
"type": "module",
"keywords": [
diff --git a/server/config/llm_defaults.json b/server/config/llm_defaults.json
index 4c71716f..608a09d9 100644
--- a/server/config/llm_defaults.json
+++ b/server/config/llm_defaults.json
@@ -1,73 +1,50 @@
{
- "version": "2026.02",
- "last_updated": "2026-02-26",
- "_description": "Default models, settings, and offline fallback constraints for each LLM provider.",
+ "version": "2026.03",
+ "last_updated": "2026-03-10",
+ "_description": "3 latest + 2 popular models for OpenAI/Anthropic/Gemini, full support for Groq/Cerebras. Auto-enriched by model_registry.json (OpenRouter cache).",
"providers": {
"openai": {
- "default_model": "gpt-5.2",
+ "default_model": "gpt-5.4",
"detection_patterns": ["gpt", "openai", "o1", "o3", "o4"],
"max_output_tokens": {
+ "gpt-5.4": 128000,
+ "gpt-5.3-chat": 16384,
"gpt-5.2": 128000,
- "gpt-5.1": 128000,
- "gpt-5": 128000,
- "gpt-5-mini": 128000,
- "gpt-5-nano": 128000,
- "gpt-4o": 16384,
- "gpt-4o-mini": 16384,
- "gpt-4.1": 32768,
- "gpt-4.1-mini": 32768,
- "gpt-4.1-nano": 32768,
- "o3": 100000,
- "o3-mini": 100000,
"o4-mini": 100000,
- "o1": 100000,
+ "gpt-4.1": 32768,
"_default": 16384
},
"context_length": {
+ "gpt-5.4": 1050000,
+ "gpt-5.3-chat": 128000,
"gpt-5.2": 400000,
- "gpt-5.1": 400000,
- "gpt-5": 400000,
- "gpt-5-mini": 400000,
- "gpt-5-nano": 400000,
- "gpt-4.1": 1047576,
- "gpt-4.1-mini": 1047576,
- "gpt-4.1-nano": 1047576,
- "gpt-4o": 128000,
- "gpt-4o-mini": 128000,
- "o3": 200000,
- "o3-mini": 200000,
"o4-mini": 200000,
- "o1": 200000,
+ "gpt-4.1": 1047576,
"_default": 128000
},
- "reasoning_models": ["o1", "o3", "o3-mini", "o4-mini"],
+ "reasoning_models": ["o4-mini"],
"thinking_models": ["gpt-5"],
"thinking_type": "effort",
"temperature_range": [0.0, 2.0]
},
"anthropic": {
- "default_model": "claude-opus-4.6",
+ "default_model": "claude-sonnet-4.6",
"detection_patterns": ["claude", "anthropic"],
"max_output_tokens": {
"claude-opus-4.6": 128000,
- "claude-sonnet-4.6": 64000,
- "claude-opus-4.5": 64000,
- "claude-sonnet-4.5": 64000,
+ "claude-sonnet-4.6": 128000,
+ "claude-haiku-4.5": 64000,
"claude-sonnet-4": 64000,
- "claude-opus-4.1": 32000,
"claude-opus-4": 32000,
- "claude-haiku-4.5": 64000,
- "claude-3.5-haiku": 8192,
- "claude-3-opus": 4096,
- "claude-3-haiku": 4096,
"_default": 8192
},
"context_length": {
"claude-opus-4.6": 1000000,
"claude-sonnet-4.6": 1000000,
- "claude-sonnet-4.5": 1000000,
- "claude-sonnet-4": 1000000,
+ "claude-haiku-4.5": 200000,
+ "claude-sonnet-4": 200000,
+ "claude-opus-4": 200000,
"_default": 200000
},
"thinking_type": "budget",
@@ -77,16 +54,19 @@
"default_model": "gemini-2.5-flash",
"detection_patterns": ["gemini", "google"],
"max_output_tokens": {
- "gemini-3-pro": 65536,
- "gemini-3-flash": 65536,
+ "gemini-3.1-pro-preview": 65536,
+ "gemini-3-flash-preview": 65536,
+ "gemini-3-pro-preview": 65536,
"gemini-2.5-pro": 65536,
- "gemini-2.5-flash": 65536,
- "gemini-2.5-flash-lite": 65536,
- "gemini-2.0-flash": 8192,
- "gemini-2.0-flash-lite": 8192,
+ "gemini-2.5-flash": 65535,
"_default": 8192
},
"context_length": {
+ "gemini-3.1-pro-preview": 1048576,
+ "gemini-3-flash-preview": 1048576,
+ "gemini-3-pro-preview": 1048576,
+ "gemini-2.5-pro": 1048576,
+ "gemini-2.5-flash": 1048576,
"_default": 1048576
},
"thinking_models": ["gemini-2.5", "gemini-3"],
@@ -94,7 +74,7 @@
"temperature_range": [0.0, 2.0]
},
"openrouter": {
- "default_model": "anthropic/claude-opus-4.6",
+ "default_model": "anthropic/claude-sonnet-4.6",
"detection_patterns": ["openrouter"],
"max_output_tokens": {
"_default": 4096
@@ -108,15 +88,23 @@
"default_model": "llama-4-scout",
"detection_patterns": ["groq"],
"max_output_tokens": {
- "llama-3.1-8b": 131072,
- "llama-3.3-70b": 32768,
- "llama-4-scout": 8192,
+ "llama-4-scout": 16384,
+ "llama-4-maverick": 16384,
+ "llama-3.3-70b": 16384,
+ "llama-3.1-8b": 8192,
"qwen3-32b": 40960,
"gpt-oss-120b": 65536,
- "gpt-oss-20b": 65536,
+ "gpt-oss-20b": 16384,
"_default": 8192
},
"context_length": {
+ "llama-4-scout": 131072,
+ "llama-4-maverick": 131072,
+ "llama-3.3-70b": 131072,
+ "llama-3.1-8b": 131072,
+ "qwen3-32b": 40960,
+ "gpt-oss-120b": 131072,
+ "gpt-oss-20b": 131072,
"_default": 131072
},
"thinking_models": ["qwen3"],
@@ -124,18 +112,18 @@
"temperature_range": [0.0, 2.0]
},
"cerebras": {
- "default_model": "llama3.1-8b",
+ "default_model": "qwen-3-235b",
"detection_patterns": ["cerebras", "llama3.1", "gpt-oss", "qwen-3-235b"],
"max_output_tokens": {
- "llama3.1-8b": 8192,
- "gpt-oss-120b": 8192,
"qwen-3-235b": 8192,
+ "gpt-oss-120b": 8192,
+ "llama3.1-8b": 8192,
"_default": 8192
},
"context_length": {
- "llama3.1-8b": 128000,
- "gpt-oss-120b": 131072,
"qwen-3-235b": 32768,
+ "gpt-oss-120b": 131072,
+ "llama3.1-8b": 128000,
"_default": 128000
},
"thinking_models": ["qwen-3-235b"],
diff --git a/server/config/model_registry.json b/server/config/model_registry.json
index 4387d6bb..74d25c62 100644
--- a/server/config/model_registry.json
+++ b/server/config/model_registry.json
@@ -1,5 +1,5 @@
{
- "_generated": "2026-03-06T15:18:47.844992+00:00",
+ "_generated": "2026-03-10T10:01:41.781715+00:00",
"_source": "openrouter",
"_model_count": 346,
"models": {
@@ -2795,20 +2795,13 @@
],
"is_reasoning_model": false,
"supported_parameters": [
- "frequency_penalty",
- "logit_bias",
"max_tokens",
- "min_p",
"presence_penalty",
- "repetition_penalty",
"response_format",
"seed",
- "stop",
- "structured_outputs",
"temperature",
"tool_choice",
"tools",
- "top_k",
"top_p"
]
},
@@ -3920,7 +3913,7 @@
"name": "Qwen: Qwen3 Next 80B A3B Instruct",
"provider": "qwen",
"local_id": "qwen3-next-80b-a3b-instruct",
- "context_length": 262144,
+ "context_length": 131072,
"max_output_tokens": 0,
"input_price_per_mtok": 0.09,
"output_price_per_mtok": 1.1,
@@ -4089,7 +4082,6 @@
"supported_parameters": [
"frequency_penalty",
"include_reasoning",
- "logit_bias",
"max_tokens",
"min_p",
"presence_penalty",
@@ -7248,8 +7240,8 @@
"local_id": "gemma-3-27b-it",
"context_length": 128000,
"max_output_tokens": 65536,
- "input_price_per_mtok": 0.04,
- "output_price_per_mtok": 0.15,
+ "input_price_per_mtok": 0.03,
+ "output_price_per_mtok": 0.11,
"supports_thinking": false,
"thinking_type": "none",
"temperature_range": [
@@ -7984,7 +7976,6 @@
"supported_parameters": [
"frequency_penalty",
"include_reasoning",
- "logit_bias",
"max_tokens",
"min_p",
"presence_penalty",
@@ -9399,7 +9390,6 @@
"is_reasoning_model": false,
"supported_parameters": [
"frequency_penalty",
- "logit_bias",
"max_tokens",
"min_p",
"presence_penalty",
diff --git a/server/config/pricing.json b/server/config/pricing.json
index ef7da28c..2a037867 100644
--- a/server/config/pricing.json
+++ b/server/config/pricing.json
@@ -1,86 +1,47 @@
{
- "version": "2026.02",
- "last_updated": "2026-02-20",
+ "version": "2026.03",
+ "last_updated": "2026-03-09",
"llm": {
"openai": {
+ "gpt-5.4": {"input": 2.50, "output": 15.00},
+ "gpt-5.3-chat": {"input": 1.75, "output": 14.00},
"gpt-5.2": {"input": 1.75, "output": 14.00},
- "gpt-5.1": {"input": 1.25, "output": 10.00},
- "gpt-5": {"input": 1.25, "output": 10.00},
- "gpt-5-mini": {"input": 0.25, "output": 2.00},
- "gpt-5-nano": {"input": 0.05, "output": 0.40},
- "gpt-5-pro": {"input": 15.00, "output": 120.00},
- "o3": {"input": 2.00, "output": 8.00, "reasoning": 8.00},
- "o3-mini": {"input": 1.10, "output": 4.40, "reasoning": 4.40},
- "o3-pro": {"input": 20.00, "output": 80.00, "reasoning": 80.00},
"o4-mini": {"input": 1.10, "output": 4.40, "reasoning": 4.40},
- "o1": {"input": 15.00, "output": 60.00, "reasoning": 60.00},
- "o1-mini": {"input": 1.10, "output": 4.40, "reasoning": 4.40},
- "gpt-4o": {"input": 2.50, "output": 10.00},
- "gpt-4o-mini": {"input": 0.15, "output": 0.60},
"gpt-4.1": {"input": 2.00, "output": 8.00},
- "gpt-4.1-mini": {"input": 0.40, "output": 1.60},
- "gpt-4.1-nano": {"input": 0.10, "output": 0.40},
- "gpt-4-turbo": {"input": 10.00, "output": 30.00},
- "gpt-4": {"input": 30.00, "output": 60.00},
- "gpt-3.5-turbo": {"input": 0.50, "output": 1.50},
- "_default": {"input": 2.50, "output": 10.00}
+ "_default": {"input": 2.50, "output": 15.00}
},
"anthropic": {
"claude-opus-4.6": {"input": 5.00, "output": 25.00, "cache_read": 0.50},
- "claude-opus-4.5": {"input": 5.00, "output": 25.00, "cache_read": 0.50},
- "claude-opus-4.1": {"input": 15.00, "output": 75.00, "cache_read": 1.50},
- "claude-opus-4": {"input": 15.00, "output": 75.00, "cache_read": 1.50},
"claude-sonnet-4.6": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
- "claude-sonnet-4.5": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
- "claude-sonnet-4": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
"claude-haiku-4.5": {"input": 1.00, "output": 5.00, "cache_read": 0.10},
- "claude-3-opus": {"input": 15.00, "output": 75.00, "cache_read": 1.50},
- "claude-3-5-sonnet": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
- "claude-3-sonnet": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
- "claude-3-haiku": {"input": 0.25, "output": 1.25, "cache_read": 0.03},
- "claude-3.5-haiku": {"input": 0.80, "output": 4.00, "cache_read": 0.08},
- "claude-opus": {"input": 5.00, "output": 25.00, "cache_read": 0.50},
- "claude-sonnet": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
- "claude-haiku": {"input": 1.00, "output": 5.00, "cache_read": 0.10},
+ "claude-sonnet-4": {"input": 3.00, "output": 15.00, "cache_read": 0.30},
+ "claude-opus-4": {"input": 15.00, "output": 75.00, "cache_read": 1.50},
"_default": {"input": 3.00, "output": 15.00, "cache_read": 0.30}
},
"gemini": {
- "gemini-3-pro": {"input": 2.00, "output": 12.00},
- "gemini-3-flash": {"input": 0.50, "output": 3.00},
+ "gemini-3.1-pro-preview": {"input": 2.00, "output": 12.00},
+ "gemini-3-flash-preview": {"input": 0.50, "output": 3.00},
+ "gemini-3-pro-preview": {"input": 2.00, "output": 12.00},
"gemini-2.5-pro": {"input": 1.25, "output": 10.00},
"gemini-2.5-flash": {"input": 0.30, "output": 2.50},
- "gemini-2.5-flash-lite": {"input": 0.10, "output": 0.40},
- "gemini-2.0-flash": {"input": 0.10, "output": 0.40},
- "gemini-2.0-flash-lite": {"input": 0.08, "output": 0.30},
- "gemini-1.5-pro": {"input": 1.25, "output": 5.00},
- "gemini-1.5-flash": {"input": 0.075, "output": 0.30},
- "gemini-pro": {"input": 0.50, "output": 1.50},
- "_default": {"input": 0.50, "output": 2.50}
+ "_default": {"input": 0.50, "output": 3.00}
},
"groq": {
"llama-4-scout": {"input": 0.11, "output": 0.34},
- "llama-4-maverick": {"input": 0.20, "output": 0.60},
- "llama-3.3-70b": {"input": 0.59, "output": 0.79},
- "llama-3.1-70b": {"input": 0.59, "output": 0.79},
+ "llama-4-maverick": {"input": 0.15, "output": 0.60},
+ "llama-3.3-70b": {"input": 0.10, "output": 0.10},
"llama-3.1-8b": {"input": 0.05, "output": 0.08},
- "llama3-70b": {"input": 0.59, "output": 0.79},
- "llama3-8b": {"input": 0.05, "output": 0.08},
"qwen3-32b": {"input": 0.29, "output": 0.59},
- "qwen-qwq-32b": {"input": 0.29, "output": 0.59},
- "mixtral-8x7b": {"input": 0.24, "output": 0.24},
- "gpt-oss-20b": {"input": 0.075, "output": 0.30},
"gpt-oss-120b": {"input": 0.15, "output": 0.60},
- "_default": {"input": 0.29, "output": 0.59}
+ "gpt-oss-20b": {"input": 0.10, "output": 0.10},
+ "_default": {"input": 0.15, "output": 0.60}
},
"cerebras": {
- "llama-3.1-8b": {"input": 0.10, "output": 0.10},
- "llama-3.1-70b": {"input": 0.60, "output": 0.60},
- "llama-3.1-405b": {"input": 6.00, "output": 12.00},
+ "qwen-3-235b": {"input": 0.20, "output": 0.20},
+ "gpt-oss-120b": {"input": 0.10, "output": 0.10},
"llama3.1-8b": {"input": 0.10, "output": 0.10},
- "llama3.1-70b": {"input": 0.60, "output": 0.60},
- "qwen-3-32b": {"input": 0.20, "output": 0.20},
- "_default": {"input": 0.60, "output": 0.60}
+ "_default": {"input": 0.10, "output": 0.10}
},
"openrouter": {
"_default": {"input": 1.00, "output": 5.00}
diff --git a/server/services/handlers/telegram.py b/server/services/handlers/telegram.py
index bb440121..cf481a51 100644
--- a/server/services/handlers/telegram.py
+++ b/server/services/handlers/telegram.py
@@ -76,7 +76,7 @@ async def handle_telegram_send(
"success": False,
"node_id": node_id,
"node_type": node_type,
- "error": "Bot owner not detected. Send any message to your bot first.",
+ "error": "Bot owner not detected. Send any private message to your bot on Telegram to auto-detect, or set TELEGRAM_OWNER_CHAT_ID in .env",
"execution_time": time.time() - start_time,
"timestamp": datetime.now().isoformat()
}
diff --git a/server/services/markdown_formatter.py b/server/services/markdown_formatter.py
index 2cf27165..f34f6a36 100644
--- a/server/services/markdown_formatter.py
+++ b/server/services/markdown_formatter.py
@@ -81,6 +81,16 @@ def to_telegram_html(text: str) -> str:
# Strip class attributes from <code> (Telegram supports <code> but not class attr)
html = re.sub(r'<code class="[^"]*">', "<code>", html)
+ # Strip ALL unsupported HTML tags (keep only Telegram-supported ones)
+ # Telegram supports: b, i, s, u, code, pre, a, blockquote, tg-spoiler, tg-emoji
+ _TELEGRAM_ALLOWED = frozenset({"b", "i", "s", "u", "code", "pre", "a", "blockquote", "tg-spoiler", "tg-emoji"})
+
+ def _strip_unsupported(m: re.Match) -> str:
+ tag = m.group(1).lower().split()[0].strip("/")
+ return m.group(0) if tag in _TELEGRAM_ALLOWED else ""
+
+ html = re.sub(r"<(/?\s*[a-zA-Z][a-zA-Z0-9-]*)[^>]*>", _strip_unsupported, html)
+
# Collapse multiple newlines
html = re.sub(r"\n{3,}", "\n\n", html)
return html.strip()
diff --git a/server/services/telegram_service.py b/server/services/telegram_service.py
index bf00b01f..346c089d 100644
--- a/server/services/telegram_service.py
+++ b/server/services/telegram_service.py
@@ -7,6 +7,7 @@ Singleton service with background polling for receiving updates.
import asyncio
import logging
+import os
from datetime import datetime
from typing import Any, Dict, Optional
@@ -54,8 +55,19 @@ class TelegramService:
@property
def owner_chat_id(self) -> Optional[int]:
- """Get the bot owner's chat ID (auto-captured from first private message)."""
- return self._owner_chat_id
+ """Get the bot owner's chat ID (auto-captured from first private message).
+ Falls back to TELEGRAM_OWNER_CHAT_ID env var if not auto-detected."""
+ if self._owner_chat_id:
+ return self._owner_chat_id
+ # Fallback: TELEGRAM_OWNER_CHAT_ID env var
+ env_owner = os.environ.get("TELEGRAM_OWNER_CHAT_ID")
+ if env_owner:
+ try:
+ self._owner_chat_id = int(env_owner)
+ return self._owner_chat_id
+ except ValueError:
+ pass
+ return None
async def set_owner(self, chat_id: int):
"""Set owner chat_id (used to restore from credentials on reconnect)."""