Sema Code: AIコーディングエージェントをプログラム可能で組み込み可能なインフラストラクチャへ分離
Sema Code: Decoupling AI Coding Agents into Programmable, Embeddable Infrastructure
April 13, 2026
著者: Huacan Wang, Jie Zhou, Ningyan Zhu, Shuo Zhang, Feiyu Chen, Jiarou Wu, Ge Chen, Chen Liu, Wangyi Chen, Xiaofeng Mou, Yi Xu
cs.AI
要旨
AIコーディングエージェントは開発者ワークフローの中心的存在となっているが、既存の全てのソリューションは、CLIやIDEプラグイン、ウェブアプリケーションといった特定の提供形態に推論能力を閉じ込めている。この制約は、企業が異種混在のエンジニアリング環境でこれらの能力を再利用しようとする際に、体系的な障壁を生み出している。この課題に対処するため、我々は埋め込み可能、プラガブル、フレームワークファーストを原則として構築されたオープンなAIコーディングフレームワーク「Sema Code」を提案する。Sema Codeは、コアエージェントエンジンを全てのクライアント層から完全に分離し、任意のランタイムがプログラム的に駆動可能なスタンドアロンのnpmライブラリとして公開する。このアーキテクチャを基盤として、我々は8つの主要なメカニズムを設計した:マルチテナントエンジン分離、安全なセッション再構築を伴うFIFO入力キューイング、適応的コンテキスト圧縮、マルチエージェント協調スケジューリング、インテリジェントなTodoベースのプロセス管理、4層の非同期権限制御、MCP、スキル、プラグインに跨る3階層のエコシステム統合、そして実行権限と観測権限が分離されたバックグラウンドタスクフレームワークである。これらのメカニズムは総合的に、複雑なエージェントエンジンを共有可能でプログラム可能なコアへと変換するというエンジニアリング上の課題に対処する。そのアーキテクチャの汎用性を示すため、同一のSema Coreエンジンが、VSCode拡張機能と、TelegramやFeishuといったプラットフォーム横断でエージェントインタラクションを統一するマルチチャネルメッセージングゲートウェイ(我々がSemaClawと命名したもの)を同時に駆動している。これらは、同一の推論カーネルを共有し、クライアント層のみが異なる、根本的に異なる二つの製品形態を表している。
English
AI coding agents have become central to developer workflows, yet every existing solution locks its reasoning capabilities within a specific delivery form, such as a CLI, IDE plugin, or web application. This limitation creates systemic barriers when enterprises attempt to reuse these capabilities across heterogeneous engineering environments. To address this challenge, we present Sema Code, an open AI coding framework built on the principle of being embeddable, pluggable, and framework-first. Sema Code completely decouples the core agent engine from all client layers, publishing it as a standalone npm library that any runtime can drive programmatically. Built around this architecture, we designed eight key mechanisms: multi-tenant engine isolation, FIFO input queuing with safe session reconstruction, adaptive context compression, multi-agent collaborative scheduling, intelligent Todo-based process management, four-layer asynchronous permission control, three-tier ecosystem integration spanning MCP, Skills, and Plugins, and a background task framework with separated execution and observation privileges. These mechanisms collectively address the engineering challenges of transforming a complex agent engine into a shared, programmable core. Demonstrating its architectural versatility, the same Sema Core engine simultaneously powers a VSCode extension and a multi-channel messaging gateway, which we name SemaClaw, to unify agent interactions across platforms such as Telegram and Feishu. These represent two fundamentally different product forms sharing an identical reasoning kernel, differing only at the client layer.