God Mode+ v3 fix: main.py
Browse files
main.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
"""
|
| 2 |
-
π GOD MODE+
|
| 3 |
-
|
| 4 |
-
Version: 3.0.0 β Full God Mode Upgrade
|
| 5 |
"""
|
| 6 |
|
| 7 |
import asyncio
|
|
@@ -22,28 +21,31 @@ from slowapi import Limiter, _rate_limit_exceeded_handler
|
|
| 22 |
from slowapi.util import get_remote_address
|
| 23 |
from slowapi.errors import RateLimitExceeded
|
| 24 |
|
| 25 |
-
from api.routes import tasks, chat, memory,
|
| 26 |
from api.routes import connectors, agents as agents_router
|
| 27 |
from api.websocket_manager import WebSocketManager
|
| 28 |
from core.task_engine import TaskEngine
|
| 29 |
from memory.db import init_db
|
| 30 |
|
| 31 |
-
# βββ God Mode
|
| 32 |
-
from ai_router.router import
|
| 33 |
-
from agents.orchestrator import GodAgentOrchestrator
|
| 34 |
-
from agents.chat_agent import ChatAgent
|
| 35 |
-
from agents.planner_agent import PlannerAgent
|
| 36 |
-
from agents.coding_agent import CodingAgent
|
| 37 |
-
from agents.debug_agent import DebugAgent
|
| 38 |
-
from agents.memory_agent import MemoryAgent
|
| 39 |
-
from agents.connector_agent import ConnectorAgent
|
| 40 |
-
from agents.deploy_agent import DeployAgent
|
| 41 |
-
from agents.workflow_agent import WorkflowAgent
|
| 42 |
-
from agents.sandbox_agent import SandboxAgent
|
| 43 |
-
from agents.ui_agent import UIAgent
|
| 44 |
-
from connectors.manager import ConnectorManager
|
| 45 |
|
| 46 |
-
# βββ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
structlog.configure(
|
| 48 |
processors=[
|
| 49 |
structlog.processors.TimeStamper(fmt="iso"),
|
|
@@ -54,57 +56,58 @@ structlog.configure(
|
|
| 54 |
)
|
| 55 |
log = structlog.get_logger()
|
| 56 |
|
| 57 |
-
# βββ Rate Limiter βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 58 |
limiter = Limiter(key_func=get_remote_address)
|
| 59 |
|
| 60 |
-
# βββ Global
|
| 61 |
-
ws_manager
|
| 62 |
-
task_engine
|
| 63 |
-
|
| 64 |
connector_manager = ConnectorManager()
|
| 65 |
|
|
|
|
| 66 |
# βββ Build God Agent Ecosystem ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 67 |
def build_orchestrator() -> GodAgentOrchestrator:
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
| 84 |
|
| 85 |
orchestrator = build_orchestrator()
|
| 86 |
|
| 87 |
|
| 88 |
@asynccontextmanager
|
| 89 |
async def lifespan(app: FastAPI):
|
| 90 |
-
"
|
| 91 |
-
log.info("π Starting GOD MODE+ AI Operating System...")
|
| 92 |
await init_db()
|
| 93 |
await task_engine.start()
|
| 94 |
asyncio.create_task(ws_manager.heartbeat_loop())
|
| 95 |
-
|
| 96 |
-
log.info("
|
| 97 |
-
log.info("π AI Router: OpenAI β Groq β Cerebras β OpenRouter β Anthropic")
|
| 98 |
yield
|
| 99 |
log.info("π Shutting down...")
|
| 100 |
await task_engine.stop()
|
| 101 |
log.info("β
Shutdown complete")
|
| 102 |
|
| 103 |
|
| 104 |
-
# βββ FastAPI App ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 105 |
app = FastAPI(
|
| 106 |
title="π€ GOD MODE+ AI Operating System",
|
| 107 |
-
description="Devin + Manus + Genspark Autonomous AI Engineering Platform",
|
| 108 |
version="3.0.0",
|
| 109 |
lifespan=lifespan,
|
| 110 |
docs_url="/api/docs",
|
|
@@ -114,14 +117,14 @@ app = FastAPI(
|
|
| 114 |
app.state.limiter = limiter
|
| 115 |
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
|
| 116 |
|
| 117 |
-
# βββ Share state ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 118 |
-
app.state.ws_manager
|
| 119 |
-
app.state.task_engine
|
| 120 |
-
app.state.ai_router
|
| 121 |
-
app.state.orchestrator
|
| 122 |
app.state.connector_manager = connector_manager
|
| 123 |
|
| 124 |
-
# βββ Middleware βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 125 |
app.add_middleware(
|
| 126 |
CORSMiddleware,
|
| 127 |
allow_origins=["*"],
|
|
@@ -134,31 +137,39 @@ app.add_middleware(GZipMiddleware, minimum_size=1000)
|
|
| 134 |
|
| 135 |
@app.middleware("http")
|
| 136 |
async def log_requests(request: Request, call_next):
|
| 137 |
-
start
|
| 138 |
response = await call_next(request)
|
| 139 |
-
|
| 140 |
-
log.info("HTTP", method=request.method, path=request.url.path,
|
|
|
|
| 141 |
return response
|
| 142 |
|
| 143 |
|
| 144 |
-
# βββ REST
|
| 145 |
-
app.include_router(health.router,
|
| 146 |
-
app.include_router(tasks.router,
|
| 147 |
-
app.include_router(chat.router,
|
| 148 |
-
app.include_router(memory.router,
|
| 149 |
-
app.include_router(
|
| 150 |
-
app.include_router(
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
|
|
|
| 153 |
|
| 154 |
-
# βββ WebSocket Endpoints βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 155 |
@app.websocket("/ws/tasks/{task_id}")
|
| 156 |
async def ws_task(websocket: WebSocket, task_id: str):
|
| 157 |
await ws_manager.connect(websocket, room=f"task:{task_id}")
|
| 158 |
try:
|
| 159 |
while True:
|
| 160 |
data = await websocket.receive_text()
|
| 161 |
-
msg
|
| 162 |
if msg.get("type") == "ping":
|
| 163 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 164 |
except WebSocketDisconnect:
|
|
@@ -171,7 +182,7 @@ async def ws_logs(websocket: WebSocket):
|
|
| 171 |
try:
|
| 172 |
while True:
|
| 173 |
data = await websocket.receive_text()
|
| 174 |
-
msg
|
| 175 |
if msg.get("type") == "ping":
|
| 176 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 177 |
except WebSocketDisconnect:
|
|
@@ -184,11 +195,10 @@ async def ws_chat(websocket: WebSocket, session_id: str):
|
|
| 184 |
try:
|
| 185 |
while True:
|
| 186 |
data = await websocket.receive_text()
|
| 187 |
-
msg
|
| 188 |
if msg.get("type") == "ping":
|
| 189 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 190 |
elif msg.get("type") == "chat_message":
|
| 191 |
-
# Route through God Agent Orchestrator
|
| 192 |
asyncio.create_task(
|
| 193 |
orchestrator.orchestrate(
|
| 194 |
user_message=msg.get("content", ""),
|
|
@@ -197,7 +207,6 @@ async def ws_chat(websocket: WebSocket, session_id: str):
|
|
| 197 |
)
|
| 198 |
)
|
| 199 |
elif msg.get("type") == "task_message":
|
| 200 |
-
# Create autonomous task via task engine
|
| 201 |
from core.models import TaskCreateRequest
|
| 202 |
req = TaskCreateRequest(
|
| 203 |
goal=msg.get("content", ""),
|
|
@@ -214,7 +223,7 @@ async def ws_agent_status(websocket: WebSocket):
|
|
| 214 |
try:
|
| 215 |
while True:
|
| 216 |
data = await websocket.receive_text()
|
| 217 |
-
msg
|
| 218 |
if msg.get("type") == "ping":
|
| 219 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 220 |
elif msg.get("type") == "get_status":
|
|
@@ -228,44 +237,45 @@ async def ws_agent_status(websocket: WebSocket):
|
|
| 228 |
|
| 229 |
@app.websocket("/ws/sandbox/{session_id}")
|
| 230 |
async def ws_sandbox(websocket: WebSocket, session_id: str):
|
| 231 |
-
"""Live sandbox terminal stream."""
|
| 232 |
await ws_manager.connect(websocket, room=f"sandbox:{session_id}")
|
| 233 |
sandbox = orchestrator.get_agent("sandbox")
|
| 234 |
try:
|
| 235 |
while True:
|
| 236 |
data = await websocket.receive_text()
|
| 237 |
-
msg
|
| 238 |
if msg.get("type") == "ping":
|
| 239 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 240 |
elif msg.get("type") == "execute" and sandbox:
|
| 241 |
-
cmd
|
| 242 |
result = await sandbox.execute(cmd, session_id=session_id)
|
| 243 |
await websocket.send_json({
|
| 244 |
-
"type":
|
| 245 |
-
"command":
|
| 246 |
-
"output":
|
| 247 |
"timestamp": time.time(),
|
| 248 |
})
|
| 249 |
except WebSocketDisconnect:
|
| 250 |
ws_manager.disconnect(websocket, room=f"sandbox:{session_id}")
|
| 251 |
|
| 252 |
|
| 253 |
-
# βββ Root βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 254 |
@app.get("/")
|
| 255 |
async def root():
|
| 256 |
-
cs
|
|
|
|
| 257 |
return {
|
| 258 |
-
"name":
|
| 259 |
-
"version":
|
| 260 |
-
"status":
|
| 261 |
-
"mode":
|
| 262 |
-
"
|
|
|
|
| 263 |
"connectors": {
|
| 264 |
"connected": cs["connected"],
|
| 265 |
-
"total":
|
| 266 |
-
"ai_ready":
|
| 267 |
},
|
| 268 |
-
"docs":
|
| 269 |
"websockets": [
|
| 270 |
"/ws/tasks/{task_id}",
|
| 271 |
"/ws/logs",
|
|
@@ -273,14 +283,14 @@ async def root():
|
|
| 273 |
"/ws/agent/status",
|
| 274 |
"/ws/sandbox/{session_id}",
|
| 275 |
],
|
| 276 |
-
"
|
| 277 |
-
"
|
| 278 |
-
"
|
| 279 |
-
"
|
| 280 |
-
"
|
| 281 |
-
"
|
| 282 |
-
"
|
| 283 |
-
"
|
| 284 |
-
"
|
| 285 |
-
|
| 286 |
}
|
|
|
|
| 1 |
"""
|
| 2 |
+
π GOD MODE+ Main β Fixed, Unified, Production-Ready
|
| 3 |
+
All LLM calls go through LLMRouter (Cloudflare Gateway primary)
|
|
|
|
| 4 |
"""
|
| 5 |
|
| 6 |
import asyncio
|
|
|
|
| 21 |
from slowapi.util import get_remote_address
|
| 22 |
from slowapi.errors import RateLimitExceeded
|
| 23 |
|
| 24 |
+
from api.routes import tasks, chat, memory, health
|
| 25 |
from api.routes import connectors, agents as agents_router
|
| 26 |
from api.websocket_manager import WebSocketManager
|
| 27 |
from core.task_engine import TaskEngine
|
| 28 |
from memory.db import init_db
|
| 29 |
|
| 30 |
+
# βββ God Mode+ LLM Router ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
+
from ai_router.router import LLMRouter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
# βββ God Mode+ Agents ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 34 |
+
from agents.orchestrator import GodAgentOrchestrator
|
| 35 |
+
from agents.chat_agent import ChatAgent
|
| 36 |
+
from agents.planner_agent import PlannerAgent
|
| 37 |
+
from agents.coding_agent import CodingAgent
|
| 38 |
+
from agents.debug_agent import DebugAgent
|
| 39 |
+
from agents.memory_agent import MemoryAgent
|
| 40 |
+
from agents.connector_agent import ConnectorAgent
|
| 41 |
+
from agents.deploy_agent import DeployAgent
|
| 42 |
+
from agents.workflow_agent import WorkflowAgent
|
| 43 |
+
from agents.sandbox_agent import SandboxAgent
|
| 44 |
+
from agents.ui_agent import UIAgent
|
| 45 |
+
from agents.reasoning_agent import ReasoningAgent
|
| 46 |
+
from connectors.manager import ConnectorManager
|
| 47 |
+
|
| 48 |
+
# βββ Structured Logging βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 49 |
structlog.configure(
|
| 50 |
processors=[
|
| 51 |
structlog.processors.TimeStamper(fmt="iso"),
|
|
|
|
| 56 |
)
|
| 57 |
log = structlog.get_logger()
|
| 58 |
|
| 59 |
+
# βββ Rate Limiter βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 60 |
limiter = Limiter(key_func=get_remote_address)
|
| 61 |
|
| 62 |
+
# βββ Global Instances βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 63 |
+
ws_manager = WebSocketManager()
|
| 64 |
+
task_engine = TaskEngine(ws_manager)
|
| 65 |
+
llm_router = LLMRouter(ws_manager)
|
| 66 |
connector_manager = ConnectorManager()
|
| 67 |
|
| 68 |
+
|
| 69 |
# βββ Build God Agent Ecosystem ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 70 |
def build_orchestrator() -> GodAgentOrchestrator:
|
| 71 |
+
orch = GodAgentOrchestrator(ws_manager=ws_manager, ai_router=llm_router)
|
| 72 |
+
|
| 73 |
+
orch.register_agent("chat", ChatAgent(ws_manager, llm_router))
|
| 74 |
+
orch.register_agent("planner", PlannerAgent(ws_manager, llm_router))
|
| 75 |
+
orch.register_agent("coding", CodingAgent(ws_manager, llm_router))
|
| 76 |
+
orch.register_agent("debug", DebugAgent(ws_manager, llm_router))
|
| 77 |
+
orch.register_agent("memory", MemoryAgent(ws_manager, llm_router))
|
| 78 |
+
orch.register_agent("connector", ConnectorAgent(ws_manager, llm_router))
|
| 79 |
+
orch.register_agent("deploy", DeployAgent(ws_manager, llm_router))
|
| 80 |
+
orch.register_agent("workflow", WorkflowAgent(ws_manager, llm_router))
|
| 81 |
+
orch.register_agent("sandbox", SandboxAgent(ws_manager, llm_router))
|
| 82 |
+
orch.register_agent("ui", UIAgent(ws_manager, llm_router))
|
| 83 |
+
orch.register_agent("reasoning", ReasoningAgent(ws_manager, llm_router))
|
| 84 |
+
|
| 85 |
+
active = llm_router.get_active_provider()
|
| 86 |
+
log.info("π€ God Agent Ecosystem initialized", agents=11, llm_provider=active)
|
| 87 |
+
return orch
|
| 88 |
+
|
| 89 |
|
| 90 |
orchestrator = build_orchestrator()
|
| 91 |
|
| 92 |
|
| 93 |
@asynccontextmanager
|
| 94 |
async def lifespan(app: FastAPI):
|
| 95 |
+
log.info("π Starting GOD MODE+ AI OS...")
|
|
|
|
| 96 |
await init_db()
|
| 97 |
await task_engine.start()
|
| 98 |
asyncio.create_task(ws_manager.heartbeat_loop())
|
| 99 |
+
active = llm_router.get_active_provider()
|
| 100 |
+
log.info("β
GOD MODE+ Platform ready", llm_provider=active, agents=11)
|
|
|
|
| 101 |
yield
|
| 102 |
log.info("π Shutting down...")
|
| 103 |
await task_engine.stop()
|
| 104 |
log.info("β
Shutdown complete")
|
| 105 |
|
| 106 |
|
| 107 |
+
# βββ FastAPI App ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 108 |
app = FastAPI(
|
| 109 |
title="π€ GOD MODE+ AI Operating System",
|
| 110 |
+
description="Devin + Manus + Genspark Autonomous AI Engineering Platform β v3.0",
|
| 111 |
version="3.0.0",
|
| 112 |
lifespan=lifespan,
|
| 113 |
docs_url="/api/docs",
|
|
|
|
| 117 |
app.state.limiter = limiter
|
| 118 |
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
|
| 119 |
|
| 120 |
+
# βββ Share state ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 121 |
+
app.state.ws_manager = ws_manager
|
| 122 |
+
app.state.task_engine = task_engine
|
| 123 |
+
app.state.ai_router = llm_router
|
| 124 |
+
app.state.orchestrator = orchestrator
|
| 125 |
app.state.connector_manager = connector_manager
|
| 126 |
|
| 127 |
+
# βββ Middleware βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 128 |
app.add_middleware(
|
| 129 |
CORSMiddleware,
|
| 130 |
allow_origins=["*"],
|
|
|
|
| 137 |
|
| 138 |
@app.middleware("http")
|
| 139 |
async def log_requests(request: Request, call_next):
|
| 140 |
+
start = time.time()
|
| 141 |
response = await call_next(request)
|
| 142 |
+
ms = round((time.time() - start) * 1000, 2)
|
| 143 |
+
log.info("HTTP", method=request.method, path=request.url.path,
|
| 144 |
+
status=response.status_code, ms=ms)
|
| 145 |
return response
|
| 146 |
|
| 147 |
|
| 148 |
+
# βββ REST Routers βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 149 |
+
app.include_router(health.router, prefix="/api/v1", tags=["health"])
|
| 150 |
+
app.include_router(tasks.router, prefix="/api/v1/tasks", tags=["tasks"])
|
| 151 |
+
app.include_router(chat.router, prefix="/api/v1", tags=["chat"])
|
| 152 |
+
app.include_router(memory.router, prefix="/api/v1/memory", tags=["memory"])
|
| 153 |
+
app.include_router(connectors.router, prefix="/api/v1/connectors", tags=["connectors"])
|
| 154 |
+
app.include_router(agents_router.router, prefix="/api/v1/agents", tags=["agents"])
|
| 155 |
+
|
| 156 |
+
# GitHub route (conditional import β skip if missing)
|
| 157 |
+
try:
|
| 158 |
+
from api.routes import github
|
| 159 |
+
app.include_router(github.router, prefix="/api/v1/github", tags=["github"])
|
| 160 |
+
except ImportError:
|
| 161 |
+
pass
|
| 162 |
+
|
| 163 |
|
| 164 |
+
# βββ WebSocket Endpoints ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 165 |
|
|
|
|
| 166 |
@app.websocket("/ws/tasks/{task_id}")
|
| 167 |
async def ws_task(websocket: WebSocket, task_id: str):
|
| 168 |
await ws_manager.connect(websocket, room=f"task:{task_id}")
|
| 169 |
try:
|
| 170 |
while True:
|
| 171 |
data = await websocket.receive_text()
|
| 172 |
+
msg = json.loads(data)
|
| 173 |
if msg.get("type") == "ping":
|
| 174 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 175 |
except WebSocketDisconnect:
|
|
|
|
| 182 |
try:
|
| 183 |
while True:
|
| 184 |
data = await websocket.receive_text()
|
| 185 |
+
msg = json.loads(data)
|
| 186 |
if msg.get("type") == "ping":
|
| 187 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 188 |
except WebSocketDisconnect:
|
|
|
|
| 195 |
try:
|
| 196 |
while True:
|
| 197 |
data = await websocket.receive_text()
|
| 198 |
+
msg = json.loads(data)
|
| 199 |
if msg.get("type") == "ping":
|
| 200 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 201 |
elif msg.get("type") == "chat_message":
|
|
|
|
| 202 |
asyncio.create_task(
|
| 203 |
orchestrator.orchestrate(
|
| 204 |
user_message=msg.get("content", ""),
|
|
|
|
| 207 |
)
|
| 208 |
)
|
| 209 |
elif msg.get("type") == "task_message":
|
|
|
|
| 210 |
from core.models import TaskCreateRequest
|
| 211 |
req = TaskCreateRequest(
|
| 212 |
goal=msg.get("content", ""),
|
|
|
|
| 223 |
try:
|
| 224 |
while True:
|
| 225 |
data = await websocket.receive_text()
|
| 226 |
+
msg = json.loads(data)
|
| 227 |
if msg.get("type") == "ping":
|
| 228 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 229 |
elif msg.get("type") == "get_status":
|
|
|
|
| 237 |
|
| 238 |
@app.websocket("/ws/sandbox/{session_id}")
|
| 239 |
async def ws_sandbox(websocket: WebSocket, session_id: str):
|
|
|
|
| 240 |
await ws_manager.connect(websocket, room=f"sandbox:{session_id}")
|
| 241 |
sandbox = orchestrator.get_agent("sandbox")
|
| 242 |
try:
|
| 243 |
while True:
|
| 244 |
data = await websocket.receive_text()
|
| 245 |
+
msg = json.loads(data)
|
| 246 |
if msg.get("type") == "ping":
|
| 247 |
await websocket.send_json({"type": "pong", "timestamp": time.time()})
|
| 248 |
elif msg.get("type") == "execute" and sandbox:
|
| 249 |
+
cmd = msg.get("command", "")
|
| 250 |
result = await sandbox.execute(cmd, session_id=session_id)
|
| 251 |
await websocket.send_json({
|
| 252 |
+
"type": "terminal_output",
|
| 253 |
+
"command": cmd,
|
| 254 |
+
"output": result,
|
| 255 |
"timestamp": time.time(),
|
| 256 |
})
|
| 257 |
except WebSocketDisconnect:
|
| 258 |
ws_manager.disconnect(websocket, room=f"sandbox:{session_id}")
|
| 259 |
|
| 260 |
|
| 261 |
+
# βββ Root βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 262 |
@app.get("/")
|
| 263 |
async def root():
|
| 264 |
+
cs = connector_manager.get_summary()
|
| 265 |
+
active = llm_router.get_active_provider()
|
| 266 |
return {
|
| 267 |
+
"name": "π€ GOD MODE+ AI Operating System",
|
| 268 |
+
"version": "3.0.0",
|
| 269 |
+
"status": "operational",
|
| 270 |
+
"mode": "god_mode_plus",
|
| 271 |
+
"llm_provider": active,
|
| 272 |
+
"agents": orchestrator.get_status()["agents"],
|
| 273 |
"connectors": {
|
| 274 |
"connected": cs["connected"],
|
| 275 |
+
"total": cs["total"],
|
| 276 |
+
"ai_ready": cs["ai_ready"],
|
| 277 |
},
|
| 278 |
+
"docs": "/api/docs",
|
| 279 |
"websockets": [
|
| 280 |
"/ws/tasks/{task_id}",
|
| 281 |
"/ws/logs",
|
|
|
|
| 283 |
"/ws/agent/status",
|
| 284 |
"/ws/sandbox/{session_id}",
|
| 285 |
],
|
| 286 |
+
"endpoints": {
|
| 287 |
+
"chat": "POST /api/v1/chat",
|
| 288 |
+
"chat_stream": "POST /api/v1/chat/stream",
|
| 289 |
+
"tasks": "POST /api/v1/tasks/create",
|
| 290 |
+
"execute": "POST /api/v1/execute",
|
| 291 |
+
"health": "GET /api/v1/health",
|
| 292 |
+
"agents": "POST /api/v1/agents/orchestrate",
|
| 293 |
+
"sandbox": "POST /api/v1/agents/sandbox/execute",
|
| 294 |
+
"connectors": "GET /api/v1/connectors/",
|
| 295 |
+
},
|
| 296 |
}
|