> Awaiting command input...
> Type query and execute to initialize agent pipeline_
""" FastAPI Web Application ======================== Developer console and API endpoints for the multi-agent system. """ import sys import os from pathlib import Path # Add src to path sys.path.insert(0, str(Path(__file__).parent.parent)) from fastapi import FastAPI, HTTPException from fastapi.responses import HTMLResponse, JSONResponse from fastapi.staticfiles import StaticFiles from pydantic import BaseModel from typing import Any, Optional from orchestrator import Orchestrator from ledger.merkle import compute_merkle_root app = FastAPI( title="AgentMask Developer Console", description="Multi-agent system with audit trail", version="0.1.0" ) class TaskRequest(BaseModel): """Request model for running a task.""" query: str options: Optional[dict[str, Any]] = None class TaskResponse(BaseModel): """Response model for task execution.""" success: bool task: dict[str, Any] steps: list[dict[str, Any]] final_output: dict[str, Any] merkle_root: str total_steps: int # Global orchestrator instance orchestrator = Orchestrator() @app.get("/", response_class=HTMLResponse) async def get_console(): """ Serve the developer console HTML page. """ html_content = """
> Awaiting command input...
> Type query and execute to initialize agent pipeline_