Spaces: An Agentic Project Orchestrator for OpenAI Build Week

🚀 How the Project Was Built

Spaces was born with a clear premise: projects are not task lists; they are real execution environments. While traditional management tools treat AI as a simple chatbot that moves cards or summarizes text, agents in Spaces operate directly inside the project's actual environment (repositories, file systems, preview environments, and deployment pipelines).

Technical Architecture

The platform was built as a pnpm monorepo designed for high performance, real-time streaming, and strict end-to-end type safety:

  • apps/client: Operational dashboard built with React 19, Vite, TypeScript, and Tailwind CSS v4. Features a real-time conversational chat, an integrated file workspace editor, live HTML previsualization (hot-reload), Kanban board, team workflow graphs, and a decision timeline.
  • apps/server: High-performance backend runtime powered by Bun + Hono. Handles REST APIs, authentication, WebSocket streaming (/ws), and the agent orchestration suite.
  • packages/shared: Shared contract library containing Zod schemas used across both client and server applications.
  • Multi-Agent Orchestration: Controller ↔ Specialist pattern powered by the unified manage_delegations tool (spawning autonomous subagents and visual delegate handoffs).
  • Multi-Model Ecosystem: Native integration with 9 AI providers (OpenAI, Gemini, DeepSeek, Grok, Qwen, etc.) alongside Model Context Protocol (MCP) server integration.

⚡ Challenges Encountered

  1. Multi-Agent Orchestration Without Chaos: Coordinating multiple agents working concurrently in the same codebase posed risks of infinite delegation loops and file conflicts. The solution was implementing a clear hierarchy (a Controller Agent breaking down goals) with subagent depth limits and real-time visualization of agent-to-agent (A2A) handoffs.

  2. Real Autonomy vs. Safety (Human-in-the-Loop): For agents to deliver real value, they need actionable tools (bash commands, file read/write, external APIs). The challenge was creating a dynamic permissions engine with mandatory approval checkpoints for high-risk, irreversible operations (production deployments, database deletion, or main branch merges).

  3. Real-Time State Synchronization: Keeping the multi-agent chat, audit logs, file tree, and live preview builder synchronized required building a resilient WebSocket pipeline native to Bun + Hono.

  4. Persistent Memory Management: To prevent agents from losing context in long sessions or restarting from scratch, we designed a dual-layer project memory architecture: short-term session memory and long-term persistent project memory (storing architectural decisions and team conventions).


💡 Key Learnings

  • Concepts > Code: Building an autonomous AI system isn't just about sending prompts to an API. It requires engineering a true agentic runtime: portable capabilities (SKILL.md), real system tools (MCP), and persistent state.
  • Executive vs. Consultative AI: The real leap in productivity happens when AI transitions from suggesting code to executing, testing, and previewing changes in a secure sandbox.
  • Human-in-the-Loop Enables Autonomy: Maintaining human oversight through real-time intervention doesn't slow down AI—it gives users the confidence required to delegate complex autonomous workflows.
  • Strict Shared Contracts: Defining every API schema with Zod in the shared package from day one eliminated contract drift between the streaming server and React 19 components.

💎 Value Delivered

  • Unified Workspace: Brings chat, code editing, terminal execution, team flow visualizers, and live preview into a single interface.
  • Actionable Execution: Autonomous agents that actually commit code, run test suites, execute terminal commands, and render live previews instead of returning plain text answers.
  • Multi-Model Flexibility: No vendor lock-in; easily assign the optimal model (OpenAI, Gemini, DeepSeek, etc.) to specific roles or tasks based on complexity and cost.
  • Full Observability & Auditability: Transparent real-time decision logs, tool call tracking, and natural language audit trails for complete confidence.

Built With

Share this project:

Updates