How jaseci-labs/jaseci works
Project Type and Purpose
• This is a polyglot, full-stack language & tooling ecosystem, not a single web app.
• Components include:
– A superset language & compiler (jaclang)
– Cloud-native server tooling (jac-cloud)
– An IDE extension (VS Code)
– An LLM integration library (mtllm)
File Structure
• Top-level modules:
– jac/ → language definition, compiler passes, runtime, langserve (LSP)
– jac-cloud/ → REST & WebSocket server, plugin system, SSO, data sources
– jac/support/vscode_ext/ → VS Code extension, LSP client, visual debugger
– jac-mtllm/ → LLM abstraction layer, provider adapters, tools
• Notice subfolders: compiler/passes, langserve, runtimelib, routers, plugin implementations, llms providers.
Extract Architecture Insights from README
• “jaclang” is the CPython‐like reference implementation (compiler → runtime).
• “jac-cloud” auto-wraps a Jac app into a production API server.
• “mtllm” plugs language models into Jac programs.
• The VS Code extension connects to jaclang’s LSP (langserve).
Main Components & Their Relationships
a. Developer Tools Layer
– VS Code Extension (UI)
• LSP Client ↔ Langserve (JSON-RPC)
• CLI Wrapper (jac commands)
b. Language Processing Layer
– Langserve Server
• Provides language-service APIs (syntax, diagnostics, code completion)
– jaclang Compiler
• Parser (Lark), AST & IR passes, bytecode generator
• Sym-tab builder, type inference, code formatter
– Runtime Library
• Constructs, memory, importer, machine executor
c. Cloud Runtime Layer
– jac-cloud Server
• HTTP API (FastAPI routers for healthz, SSO, user, webhook)
• WebSocket plugin support, scheduler, memory contexts
• Data sources: local DB, Redis, external SSO providers
– Plugin System
• CLI plugin, scheduler plugin, websocket plugin
d. LLM Integration Layer
– mtllm Core
• Abstract LLM interface, tool registry (math, wiki, Serper)
• Provider adapters (OpenAI, Anthropic, Hugging Face, etc.)
e. External Services
– Redis, SSO providers (Google, Apple), Database
– HTTP clients for LLM providers
Architectural Patterns & Design Principles
• Layered architecture: UI/CLI → language service → compiler → runtime → infrastructure
• Plugin architecture in both jac-cloud and mtllm for extensibility
• Microservices style for langserve (LSP) and jac-cloud (API server)
• Pass-based compiler pipeline
• Clear separation of concerns: parsing, analysis, codegen, execution
Elements
• Component labels: exact folder/namespace names (e.g., jaclang/compiler, jac_cloud/jaseci/routers)
• Notes on protocols (LSP JSON-RPC, HTTP REST, WebSocket, gRPC)