How antispace-ai/aios works
Project Type and Purpose
• This repository is a monorepo of example “apps” (plugins) built for the Antispace AIOS (Artificially Intelligent Operating System).
• Its purpose is to demonstrate, via multiple sample projects (GitHub, Linear, Slack, Spotify, Wallpaper Generator, Wikipedia, UI Components), how to structure and deploy AI‐powered web apps that hook into the AIOS platform.
File Structure Analysis
• Top level:
• docs/ – static assets (logos, SVGs) and system documentation references
• examples/ – each subfolder is a standalone AIOS app scaffold
• Each example app under examples/<app-name>/src/ typically follows this layout:
• ai/ – AI logic and “actions” modules
• manifest/ – definitions of platform‐exposed serverless functions
• ui/ – React components (page.tsx and widget.tsx) for the browser interface
• routes/ (where present) – HTTP endpoints (e.g., OAuth callbacks)
• util/ or config/ or db/ – helper modules (API wrappers, database connectors, config files)
• Some apps (e.g., wallpaper-generator) include a database schema, migration scripts, and an ORM config (Drizzle).
Key Insights from README
• The repo is part of the Antispace AIOS Labs: a framework/CLI that loads these “apps” into an AIOS environment.
• Apps are deployed as manifest‐driven serverless functions plus static UI assets.
• The development model encourages minimal boilerplate, clear separation of concerns, and integration with external services via actions.
Components
a. Antispace AIOS Platform
• CLI / Runtime Environment – orchestrates app registration, routing, and AIOS shell
• Core AI Engine – processes user messages, invokes actions, returns results to UI
b. Example App (generic template)
• UI Layer (Browser) – React page.tsx + widget.tsx loaded into AIOS shell
• Manifest Functions – serverless entrypoints defined in src/manifest/index.ts
• AI Module – src/ai/index.ts and actions/* implement domain logic and API calls
• Routes / HTTP Endpoints – (optional) src/routes/* for OAuth or webhooks
• Utility Modules – src/util or src/config or src/db (database connectors, API wrappers, migration scripts)
• Database – local SQLite or managed DB for persistence (optional per app)
• External Services – GitHub, Slack, Linear, Spotify, etc., accessed via util modules
c. Interactions & Data Flow
1. User clicks a widget in the AIOS shell → Browser UI
2. UI invokes Manifest Function (HTTP POST over platform gateway)
3. Manifest function loads AI Module → selects and executes Actions
4. Actions call External Service APIs and/or Database
5. Results bubble back through the Manifest Function → AI Engine → UI renderer
6. UI updates user view / streams messages
Architectural Patterns & Design Principles
• Plugin/Serverless architecture: each app is a set of self-contained manifest functions + static UI
• Clear separation: UI (React) vs. Business Logic (AI actions) vs. Persistence/Config vs. External API integration
• Convention over configuration: each app follows identical folder layout, manifest interface, typing (TypeScript)
• Optional microservices: OAuth flows and webhooks live in routes/ as small HTTP handlers