运行时与执行

一句话总结
agent 在哪里、以何种形态运行:代码执行沙箱、并发模型、部署形态(库 / 服务 / serverless / 桌面 / GitHub Actions)。尤其当 agent 会执行模型生成的代码时,安全沙箱是刚需。

它解决什么问题

agent 要真正做事——跑代码、调系统——就需要执行环境,并要在能力与安全之间权衡。部署形态决定它如何融入产品。

设计维度 / 实现谱系

  • 代码执行:直接本地执行(危险)↔ 受限沙箱 ↔ 远程隔离(e2b 微 VM)
  • 并发:同步 ↔ async ↔ 事件驱动(Pipecat 流水线)
  • 部署形态:库(import 即用)↔ 服务/API(DustAgentField)↔ serverless(Modus)↔ 桌面/Electron(SwarmClaw)↔ GitHub Actions(Aeon
  • 多语言/边缘:Go/Rust 基础设施、WASM 本地(Ailoy
  • 资源治理:超时、配额、隔离

关键要点

  • CodeAct 类 agent(smolagents)必须配安全沙箱,否则等于任意代码执行。
  • 部署形态是框架 vs 平台的分界(库 vs 全托管服务)。
  • 语言生态深刻影响运行时设计,见 language-ecosystem

关联

各框架实现对比

下表汇总 49 个实现了「运行时」的框架(源码级阅读结论)。网站上以可展开 + 源码节选呈现。

框架实现方式
AeonGitHub Actions 即运行时:messages.yml(/5 cron 调度器,纯 bash cron_match 解析+gh workflow run 派发) + aeon.yml(runner,ubuntu-latest、装 @anthropic-ai/claude-code、30 分超时)。无服务器、公共仓库免费分钟数。本地 ./aeon 起 Next.js 仪表盘配置
AG2纯库,同步为主(多数 API 有 a_ 异步孪生)。run() 在后台线程跑对话返回 RunResponse 事件流,run_iter() 可逐事件步进;代码执行器可插拔:local/docker/jupyter/daytona/yepcode/remyx 等(沙箱程度各异);a2a/ag_ui 暴露协议端点
Agency Swarm纯库;async 优先(get_response / get_response_stream),get_response_sync 为同步包装。部署:run_fastapi()(REST + 可选 AG-UI)、run_mcp()(暴露为 MCP server)、copilot_demo()(Web UI)、tui()(终端,watchfiles 热重载)
Agent-LLM (AGiXT)FastAPI + uvicorn 服务(app.py:220),Docker/docker-compose.yml 部署;危险代码经 safeexecute(Docker 沙箱执行库,见 requirements)隔离;agixt start CLI 一键起服务,ngrok 内网穿透可选
AgentDock纯库(agentdock-core,tsup 打包,含 .+/server 两个 export,区分 edge/Node);自身不起服务,由 Next.js 客户端(Vercel 一键部署)或宿主后端驱动;流式执行依赖 Vercel AI SDK,serverless 下用 @vercel/functions waitUntil 跑后台任务
Agentic Context Engine (ACE)纯库(pip/uv 安装),无服务进程;ace CLI 做交互式配置/模型校验,ace-mcp 起 MCP server 供 IDE 集成,kayba 是云端 CLI(上传 trace/拉取洞见);RR 的代码执行在 TraceSandbox(SIGALRM 超时, 仅 Unix; Windows 不强制超时)
AgentScope纯异步库可直接嵌入;沙箱化工作区 workspace/:LocalWorkspace/DockerWorkspace/E2BWorkspace + Offloader 把大上下文/工具结果卸载;生产侧 app/ 提供 FastAPI 多租户、多会话 agent 服务(create_app)、调度器(apscheduler)、AG-UI 协议、Redis 存储;支持本地/Serverless/K8s + OTel
AgentsetNext.js 应用(maxDuration=120, region iad1,chat/route.ts:54);摄取/删除经 Trigger.dev durable task(processDocument maxDuration 3h、并发 90,jobs/tasks/process-document.ts:72),解析调外部 Partition API,批次经 Redis、向量化经 embedMany 后 upsert
AgentVerse纯 Python 库 + CLI;环境 run() 同步驱动、每个 step 内 asyncio.gather 并发跑多 agent 的 astep(simulation_env/basic.py:67);4 个 console_scripts 入口(simulation / simulation-gui / tasksolving / benchmark,setup.py:48);GUI 经 gradio,Pokemon demo 经 FastAPI+uvicorn(pokemon_server.py) + 前端(ui/)
AiloyRust crate 编译为 cdylib,三平台分发为 PyPI(ailoy-py)/npm(ailoy-node/ailoy-web);本地推理走 TVM Relax VM(native 用 tvm-runtime-rs,wasm 用 tvmjs_bridge,src/ffi/web/tvmjs_bridge.rs);按平台选 Vulkan/Metal/WebGPU(src/model/local/inferencer.rs:41);支持同步/异步双 API(Python run_sync/run)。另有 ailoy-model CLI 管理模型(src/cli/ailoy_model.rs,feature-gated)
Astron Agent多进程微服务 + 异步:各 Python 服务 FastAPI/uvicorn,workflow 引擎 asyncio 并发跑 DAG 节点;代码节点 code_node 支持多 executor(e2b 沙箱 / ifly / local / langchain);部署 Docker Compose(docker/astronAgent)或 Helm(开发中),鉴权用 Casdoor,数据面 MySQL+Redis+Kafka+MinIO
AutoGenAgentRuntime Protocol 多实现:SingleThreadedAgentRuntime(单进程异步事件队列);分布式 gRPC worker/host runtime(autogen-ext,跨 .NET/Python,见 protos/);agent 经 register_factory 惰性实例化;code executor 经 autogen-ext(Docker/本地)沙箱执行
Botpress双 VM 驱动:默认 QuickJS(WASM) 沙箱(完全隔离、128MB 内存上限、超时中断、可 abort),失败回退 Node VM;浏览器/Lambda/CF Workers/Bun/Deno 全支持。平台侧经 bp deploy 部署到 Botpress Cloud 工作区
ConnectOnion纯库;同步执行,工具在本进程顺序执行(无沙箱);host() 起 uvicorn ASGI(HTTP+WS) 服务,配置在 .co/host.yaml;co create/init/deploy CLI 脚手架
Cordum多服务部署:Docker Compose / Helm chart(cordum-helm/)/ K8s(deploy/k8s/);镜像 cosign keyless 签名(README.md:251);TLS mTLS 默认;端口 8081 Gateway / 8082 Dashboard / 50051 Safety Kernel gRPC(README.md:312)。一键起栈 tools/scripts/quickstart.sh
Cortex Memory五种接入:① REST 服务(Axum,默认 8085,service/src/main.rs:134 Router /api/v2);② MCP server(stdio);③ CLI 二进制;④ Rust 库直接嵌入(CortexMemBuilder builder.rs:74 build);⑤ Rig 工具集。Tokio 异步运行时
CrewAI纯库;crew.kickoff() 同步执行(支持 kickoff_async/kickoff_for_each/stream),async task 用 ThreadPool 并行;CLI crewai create/run/install;AMP 云控制面做生产部署
Dust服务化平台:front=Next.js(Pages Router+SSR),agent loop 跑在 Temporal 持久化工作流(可取消/中断/优雅停止);core=Rust 多二进制(core-api/oauth/sqlite-worker);docker-compose 编排 + Postgres/Qdrant/Elasticsearch;工具可在 E2B 沙箱内以非 root 执行
E2B核心强项。云端 Firecracker microVM 隔离运行时(envd 在 e2b-dev/infra)。SDK:commands.run(cmd, {background,cwd,user,envs,timeoutMs,onStdout/onStderr,stdin}) 起进程并流式回传 stdout/stderr(底层走 /bin/bash -l -c,ConnectRPC 流);pty 提供伪终端;files 提供 read/write/list/makeDir/rename/remove/exists/getInfo/watchDir;git 封装 clone/commit/push 等;网络出口经 allowOut/denyOut/rules 精细控制;可自托管(AWS/GCP, Terraform)
Haystack纯 Python 库;Pipeline.run() 同步顺序执行,AsyncPipeline.run_async() 让无依赖分支并行(asyncio);warm_up() 钩子做模型/连接的重初始化;本进程执行无沙箱;生产部署经 Hayhooks(独立项目) 把 pipeline 包成 REST API / MCP server / OpenAI 兼容端点
hcom单 Rust 二进制,无常驻服务。被挂 agent 跑在 PTY 包装里(run_pty,src/main.rs:69;pty/mod.rs),暴露 TCP inject/state 端口;spawn 用真实终端模拟器(kitty/wezterm/tmux/zellij/iterm…)或 —headless 后台(terminal.rs, integration_spec.rs:82 BackgroundMode)。装机:brew / curl installer / pip/uv
Hermes Agent六种终端后端:local/Docker/SSH/Singularity/Modal/Daytona(TERMINAL_ENV 选;Modal/Daytona 提供 idle 休眠的 serverless 持久化);code_execution 工具让脚本经 UDS/文件 RPC 回调 Hermes 工具,把多步流水线压成零上下文成本一轮;可 $5 VPS 长驻
Hiveuv workspace;async 执行,节点可并行;headless 24/7 运行(docs/key_concepts/worker_agent.md);AgentHost/colony_runtime 管 colony 生命周期;webhook/timer/event triggers;framework.cli:main(hive 命令) + 浏览器 dashboard
Lagent纯库;可经 distributed/ 服务化——HTTPAgentServer/Client(subprocess 起 FastAPI + /chat_completion、/memory/{session_id}、/health_check) 与 AgentRayActor(Ray 分布式);工具执行无沙箱,IPython/Python 解释器靠子进程+timeout 隔离
LangChain纯库;create_agent 产出可 invoke/stream/astream 的 CompiledStateGraph(factory.py:714),运行时为 LangGraph Pregel;debug=/cache=/transformers= 透传;生产部署指向 LangSmith Deployment(README)
Llama Agentic System (llama-stack-apps)C/S 架构:server 单独启动(llama stack run,uvicorn :8321),client app 经 HTTP 连接。部署形态多样:CLI 脚本(python -m examples.agents.)、Gradio web(agent_store/interior_design_assistant)、桌面(DocQA .dmg/PyInstaller)、移动端(android/iOS 样例)
LlamaIndex纯库;agent 是 async Workflow,agent.run() 返回 WorkflowHandler(可 await / 流式迭代);步骤并发由 Workflow 引擎(外部 workflows 包)调度;无内置 server,部署/服务化交给 LlamaDeploy / LlamaAgents(仓库外)
llm-agents纯库,同步单进程顺序执行;pip install -e . 安装,python run_agent.py 交互式提问运行;无服务化/异步/沙箱
LoongFlow纯 Python 库(pip install -e .,需 3.12+);全异步 asyncio;进化任务由 run_general.sh/run_math.sh/run_ml.sh 脚本以 —background 后台跑并写 run.log;代码执行隔离靠 multiprocessing 子进程 + timeout(非容器沙箱);ClaudeCodeAgent 默认 permission_mode=“acceptEdits” 直接读写真实文件系统
Maestro纯脚本,同步阻塞执行,CLI input() 驱动;create_folder_structure() 直接在本地建工程目录/写代码文件(无沙箱);flask_app/ 提供一个调 run_maestro() 的极简 Web 包装
Mastra库 + 服务双形态:agent.stream() 流式(基于 ReadableStream + MastraModelOutput);嵌入 React/Next/Node 或经 @mastra/deployer/server-adapters 部署为独立 HTTP 服务;create-mastra 脚手架 + playground 本地调试 UI;engines.node>=22.13;工具默认本进程执行,可控并发(toolCallConcurrency)
MetaGPT纯库 + typer CLI(metagpt/software_company.py 的 generate_repo/startup);全异步(asyncio);产物落盘到 workspace/ 经 ProjectRepo/GitRepository(含 archive git 提交);代码执行经 RunCode Action / Data Interpreter 在本地执行(无强沙箱);提供 Dockerfile
Modusserverless WASM:Go Runtime + Wazero 执行模块,按调用加载沙箱跑完即释放;modus CLI(modus new/dev/build) 脚手架与 fast-refresh 本地开发;可自托管或推 GitHub 由 Hypermode 自动构建部署到全球基础设施
nanobot纯 asyncio 库 + CLI;三种入口:CLI nanobot agent、网关 nanobot gateway(WebSocket 多路复用 + 内置 WebUI,打进 wheel)、OpenAI 兼容 HTTP API;shell 工具带 sandbox 后端与 allow-list;Docker / docker-compose / Linux service / macOS LaunchAgent 部署
Open Multi-Agent纯 ESM 库,嵌入任意 Node 18+;并发由 AgentPool 的 Semaphore 控制(默认 maxConcurrency:5);文件工具沙箱在 /.agent-workspace(符号链接也解析进根,防 TOCTOU),bash 不沙箱;JSON-first oma CLI 供 shell/CI;tsc 编译 src→dist
OpenClaw常驻 Gateway daemon(launchd/systemd user service)作为单一控制平面;CLI openclaw onboard/gateway/agent/message/cron/…;Node 24(推荐)/22.19+;Docker / docker-compose / fly.toml / render.yaml 多种部署;companion apps(Windows Hub、macOS menu bar、iOS/Android node);built-in runtime id=openclaw,auto 可切换到插件 harness
Pilot Protocol核心:单 daemon 二进制(pilot-daemon/pilotctl/pilot-gateway/pilot-updater),daemon.New(cfg)+d.Start() 起隧道与 IPC;systemd(Linux)/launchd(macOS) 系统服务托管 + 自动更新器每小时检查;gateway 把远程 agent 映射成本地 IP(sudo pilotctl gateway start);compat 模式经 WSS 走 :443 穿透 UDP 封锁
PipecatPipelineWorker 包管道,WorkerRunner.run() 异步驱动并管 SIGINT/SIGTERM 优雅退出(auto_end=True 时根 worker 跑完即结束,长驻服务用 False);pipecat.runner(extra runner:uvicorn+fastapi)提供 dev 服务器与 create_transport;可部署到 Pipecat Cloud
PraisonAI纯 Python 库,同步/异步(astart/achat)双轨;可选 sandbox/ 隔离代码执行;praisonai CLI(TUI/auto/interactive/chat)、praisonai claw Dashboard(13 页, :8082)、praisonai flow(Langflow :7861)、praisonai ui、ACP server、Docker
Semantic Kernel纯 SDK/库,宿主自管(async/IAsyncEnumerable 流式)。多 agent 编排跑在 Agents/Runtime(InProcess actor runtime);Process 框架可 InProcess 或 Dapr 分布式运行(Process.Runtime.Dapr);无内建沙箱,工具在宿主进程执行
smolagents纯库 + 多档代码执行:local(AST 解释器,进程内,非安全)、e2b/modal/blaxel(云沙箱)、docker(容器隔离);GradioUI 提供 web 界面;smolagent/webagent CLI;push_to_hub 导出为 HF Space
Strands Agents纯库;agent() 同步(run_async 跨线程跑 event loop),invoke_async/stream_async 异步流式;工具默认并发执行;agent.cancel() 线程安全优雅取消;experimental.bidi 提供语音双向流式 runtime;并发调用默认抛 ConcurrencyException
Swarm纯库,同步;工具在本进程直接执行(无沙箱)
SwarmClawNext.js 16 standalone server(npm i -g→CLI 起服务,端口 3456);Electron 桌面 app 把 standalone server 当子进程 spawn(ELECTRON_RUN_AS_NODE);心跳 60s tick + 调度器 60s tick;Docker / fly / railway / render 部署配置齐全;sandbox 浏览器走独立 Docker 镜像
Swarms纯库;同步为主,Concurrent/run_agents_concurrently 用 ThreadPoolExecutor,另有 arun/arun_stream 异步与 asyncio 版;aop.py(Agent-as-server)、cron_job.py(schedule)、batch_agent_execution;autosave 落盘状态;swarms CLI 入口
Transformers Agents代码工具在受限 Python 解释器执行(安全沙箱有限);库内调用
Upsonic纯库;sync 入口经常驻后台事件循环跑 async pipeline(agent.py:21 _get_bg_loop);agent.as_mcp() 把 agent 暴露为 FastMCP server(agent.py:4214);upsonic CLI(pyproject.toml:295);AutonomousAgent 提供 workspace 沙箱(文件/shell 限定在 workspace,路径越界即 raise),可接 E2B 云沙箱
vectara-agentic纯 Python 库;chat() 用 asyncio.run 包裹 achat()(agent.py:547)。内置 OpenAI 兼容 HTTP 端点:create_app() 基于 FastAPI 暴露 /chat、/v1/completions、/v1/chat(X-API-Key 鉴权),start_app() 用 uvicorn 起服务(agent_endpoint.py:95,240);附 Dockerfile
VoltAgent库 + server provider 模式:@voltagent/server-hono/server-elysia/serverless-hono(Cloudflare/边缘) 把 agents/workflows 暴露为 HTTP(默认 :3141);代码沙箱适配器 sandbox-e2b/sandbox-daytona/sandbox-blaxel;create-voltagent-app 脚手架、@voltagent/cli

各框架实现对比 · 源码级

49 个框架实现该组件 · 44 个附源码节选 · 点击任意框架展开看实现要点与代码

Aeon yaml GitHub Actions 即运行时:messages.yml(/5 cron 调度器,纯 bash cron_match 解析+gh workflow run 派发) + aeon.yml(runner,ubuntu-latest、装 @anthropic-ai/claude-code、30 分超时)。无服务器、公共仓库免费分钟数。本地 ./aeon 起 Next.js 仪表盘配置

GitHub Actions 即运行时:messages.yml(/5 cron 调度器,纯 bash cron_match 解析+gh workflow run 派发) + aeon.yml(runner,ubuntu-latest、装 @anthropic-ai/claude-code、30 分超时)。无服务器、公共仓库免费分钟数。本地 ./aeon 起 Next.js 仪表盘配置

github/workflows/messages.yml:52github/workflows/aeon.yml:74
.github/workflows/messages.yml:52 yaml
          git config user.name "aeonframework"
          git config user.email "aeonframework@proton.me"

      - name: Determine and dispatch scheduled skills
        env:
          GH_TOKEN: ${{ secrets.GH_GLOBAL || secrets.GITHUB_TOKEN }}
        run: |
          MINUTE=$(date -u +%-M)
          HOUR=$(date -u +%-H)
          DOM=$(date -u +%-d)
          MONTH=$(date -u +%-m)
          DOW=$(date -u +%w)
          NOW_ISO=$(date -u +%FT%TZ)
查看 Aeon 完整笔记 →
AG2 python 纯库,同步为主(多数 API 有 a_ 异步孪生)。run() 在后台线程跑对话返回 RunResponse 事件流,run_iter() 可逐事件步进;代码执行器可插拔:local/docker/jupyter/daytona/yepcode/remyx 等(沙箱程度各异);a2a/ag_ui 暴露协议端点

纯库,同步为主(多数 API 有 a_ 异步孪生)。run() 在后台线程跑对话返回 RunResponse 事件流,run_iter() 可逐事件步进;代码执行器可插拔:local/docker/jupyter/daytona/yepcode/remyx 等(沙箱程度各异);a2a/ag_ui 暴露协议端点

conversable_agent.py:1524
autogen/agentchat/conversable_agent.py:1524 python
        )
        return chat_result

    def run(
        self,
        recipient: Optional["ConversableAgent"] = None,
        clear_history: bool = True,
        silent: bool | None = False,
        cache: AbstractCache | None = None,
        max_turns: int | None = None,
        summary_method: str | Callable[..., Any] | None = DEFAULT_SUMMARY_METHOD,
        summary_args: dict[str, Any] | None = {},
        message: dict[str, Any] | str | Callable[..., Any] | None = None,
查看 AG2 完整笔记 →
Agency Swarm python 纯库;async 优先(get_response / get_response_stream),get_response_sync 为同步包装。部署:run_fastapi()(REST + 可选 AG-UI)、run_mcp()(暴露为 MCP server)、copilot_demo()(Web UI)、tui()(终端,watchfiles 热重载)

纯库;async 优先(get_response / get_response_stream),get_response_sync 为同步包装。部署:run_fastapi()(REST + 可选 AG-UI)、run_mcp()(暴露为 MCP server)、copilot_demo()(Web UI)、tui()(终端,watchfiles 热重载)

agency/core.py:229agency/core.py:363
src/agency_swarm/agency/core.py:229 python
            raise ValueError(f"No runtime state found for agent: {agent_name}")
        return self._agent_runtime_state[agent_name]

    async def get_response(
        self,
        message: str | list[TResponseInputItem],
        recipient_agent: str | Agent | None = None,
        context_override: dict[str, Any] | None = None,
        hooks_override: RunHooks | None = None,
        run_config: RunConfig | None = None,
        file_ids: list[str] | None = None,
        additional_instructions: str | None = None,
        agency_context_override: AgencyContext | None = None,
查看 Agency Swarm 完整笔记 →
Agent-LLM (AGiXT) python FastAPI + uvicorn 服务(app.py:220),Docker/docker-compose.yml 部署;危险代码经 safeexecute(Docker 沙箱执行库,见 requirements)隔离;agixt start CLI 一键起服务,ngrok 内网穿透可选

FastAPI + uvicorn 服务(app.py:220),Docker/docker-compose.yml 部署;危险代码经 safeexecute(Docker 沙箱执行库,见 requirements)隔离;agixt start CLI 一键起服务,ngrok 内网穿透可选

app.py:220
agixt/app.py:220 python
else:
    logging.debug("Signal handlers skipped outside the main thread")

app = FastAPI(
    title="AGiXT",
    description="AGiXT is an Artificial Intelligence Automation platform for creating and managing AI agents. Visit the GitHub repo for more information or to report issues. https://github.com/Josh-XT/AGiXT/",
    version=version,
    docs_url="/",
    lifespan=lifespan,
)


raw_allowed_origins = getenv("ALLOWED_DOMAINS", "*")
查看 Agent-LLM (AGiXT) 完整笔记 →
AgentDock typescript 纯库(agentdock-core,tsup 打包,含 .+/server 两个 export,区分 edge/Node);自身不起服务,由 Next.js 客户端(Vercel 一键部署)或宿主后端驱动;流式执行依赖 Vercel AI SDK,serverless 下用 @vercel/functions waitUntil 跑后台任务

纯库(agentdock-core,tsup 打包,含 .+/server 两个 export,区分 edge/Node);自身不起服务,由 Next.js 客户端(Vercel 一键部署)或宿主后端驱动;流式执行依赖 Vercel AI SDK,serverless 下用 @vercel/functions waitUntil 跑后台任务

agentdock-core/package.json:6llm/llm-orchestration-service.ts:26
agentdock-core/package.json:6 json
  "private": true,
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "exports": {
    ".": {
      "import": "./dist/index.mjs",
      "require": "./dist/index.js"
    },
    "./server": {
      "import": "./dist/server.mjs",
      "require": "./dist/server.js"
    }
  },
查看 AgentDock 完整笔记 →
Agentic Context Engine (ACE) python 纯库(pip/uv 安装),无服务进程;ace CLI 做交互式配置/模型校验,ace-mcp 起 MCP server 供 IDE 集成,kayba 是云端 CLI(上传 trace/拉取洞见);RR 的代码执行在 TraceSandbox(SIGALRM 超时, 仅 Unix; Windows 不强制超时)

纯库(pip/uv 安装),无服务进程;ace CLI 做交互式配置/模型校验,ace-mcp 起 MCP server 供 IDE 集成,kayba 是云端 CLI(上传 trace/拉取洞见);RR 的代码执行在 TraceSandbox(SIGALRM 超时, 仅 Unix; Windows 不强制超时)

ace/core/sandbox.py:612
ace/core/sandbox.py:612 python
        """
        self.namespace[name] = value

    def execute(self, code: str, timeout: float = 30.0) -> ExecutionResult:
        """Execute code in the sandbox and capture output.

        Args:
            code: Python code to execute
            timeout: Maximum execution time in seconds (default: 30.0).
                     - Unix: uses signal.SIGALRM
                     - Windows: not enforced (in-process execution)

        Returns:
查看 Agentic Context Engine (ACE) 完整笔记 →
AgentScope python 纯异步库可直接嵌入;沙箱化工作区 workspace/:LocalWorkspace/DockerWorkspace/E2BWorkspace + Offloader 把大上下文/工具结果卸载;生产侧 app/ 提供 FastAPI 多租户、多会话 agent 服务(create_app)、调度器(apscheduler)、AG-UI 协议、Redis 存储;支持本地/Serverless/K8s + OTel

纯异步库可直接嵌入;沙箱化工作区 workspace/:LocalWorkspace/DockerWorkspace/E2BWorkspace + Offloader 把大上下文/工具结果卸载;生产侧 app/ 提供 FastAPI 多租户、多会话 agent 服务(create_app)、调度器(apscheduler)、AG-UI 协议、Redis 存储;支持本地/Serverless/K8s + OTel

查看 AgentScope 完整笔记 →
Agentset typescript Next.js 应用(maxDuration=120, region iad1,chat/route.ts:54);摄取/删除经 Trigger.dev durable task(processDocument maxDuration 3h、并发 90,jobs/tasks/process-document.ts:72),解析调外部 Partition API,批次经 Redis、向量化经 embedMany 后 upsert

Next.js 应用(maxDuration=120, region iad1,chat/route.ts:54);摄取/删除经 Trigger.dev durable task(processDocument maxDuration 3h、并发 90,jobs/tasks/process-document.ts:72),解析调外部 Partition API,批次经 Redis、向量化经 embedMany 后 upsert

chat/route.ts:54packages/jobs/src/tasks/process-document.ts:72jobs/tasks/ingest.ts:33
apps/web/src/app/api/(internal-api)/chat/route.ts:54 typescript
  );
};

export const preferredRegion = "iad1"; // make this closer to the DB
export const maxDuration = 120;

export const POST = withAuthApiHandler(
  async ({ req, namespace, tenantId, headers }) => {
    const body = await chatSchema.parseAsync(await parseRequestBody(req));

    const messages = convertToModelMessages(body.messages);
    const messagesWithoutQuery = messages.slice(0, -1);
    const lastMessage =
查看 Agentset 完整笔记 →
AgentVerse python 纯 Python 库 + CLI;环境 run() 同步驱动、每个 step 内 asyncio.gather 并发跑多 agent 的 astep(simulation_env/basic.py:67);4 个 console_scripts 入口(simulation / simulation-gui / tasksolving / benchmark,setup.py:48);GUI 经 gradio,Pokemon demo 经 FastAPI+uvicorn(pokemon_server.py) + 前端(ui/)

纯 Python 库 + CLI;环境 run() 同步驱动、每个 step 内 asyncio.gather 并发跑多 agent 的 astep(simulation_env/basic.py:67);4 个 console_scripts 入口(simulation / simulation-gui / tasksolving / benchmark,setup.py:48);GUI 经 gradio,Pokemon demo 经 FastAPI+uvicorn(pokemon_server.py) + 前端(ui/)

agentverse.py:47setup.py:48
agentverse/agentverse.py:47 python

        return cls(agents, environment)

    def run(self):
        """Run the environment from scratch until it is done."""
        self.environment.reset()
        while not self.environment.is_done():
            asyncio.run(self.environment.step())

    def reset(self):
        self.environment.reset()
        for agent in self.agents:
            agent.reset()
查看 AgentVerse 完整笔记 →
Ailoy rust Rust crate 编译为 cdylib,三平台分发为 PyPI(ailoy-py)/npm(ailoy-node/ailoy-web);本地推理走 TVM Relax VM(native 用 tvm-runtime-rs,wasm 用 tvmjs_bridge,src/ffi/web/tvmjs_bridge.rs);按平台选 Vulkan/Metal/WebGPU(src/model/local/inferencer.rs:41);支持同步/异步双 API(Python run_sync/run)。另有 ailoy-model CLI 管理模型(src/cli/ailoy_model.rs,feature-gated)

Rust crate 编译为 cdylib,三平台分发为 PyPI(ailoy-py)/npm(ailoy-node/ailoy-web);本地推理走 TVM Relax VM(native 用 tvm-runtime-rs,wasm 用 tvmjs_bridge,src/ffi/web/tvmjs_bridge.rs);按平台选 Vulkan/Metal/WebGPU(src/model/local/inferencer.rs:41);支持同步/异步双 API(Python run_sync/run)。另有 ailoy-model CLI 管理模型(src/cli/ailoy_model.rs,feature-gated)

src/model/local/inferencer.rs:13src/cli/mod.rs:1
src/model/local/inferencer.rs:13 rust
    utils::BoxFuture,
};

pub fn get_lib_extension() -> &'static str {
    #[cfg(target_os = "macos")]
    {
        "dylib"
    }
    #[cfg(target_os = "linux")]
    {
        "so"
    }
    #[cfg(target_os = "windows")]
查看 Ailoy 完整笔记 →
Astron Agent python 多进程微服务 + 异步:各 Python 服务 FastAPI/uvicorn,workflow 引擎 asyncio 并发跑 DAG 节点;代码节点 code_node 支持多 executor(e2b 沙箱 / ifly / local / langchain);部署 Docker Compose(docker/astronAgent)或 Helm(开发中),鉴权用 Casdoor,数据面 MySQL+Redis+Kafka+MinIO

多进程微服务 + 异步:各 Python 服务 FastAPI/uvicorn,workflow 引擎 asyncio 并发跑 DAG 节点;代码节点 code_node 支持多 executor(e2b 沙箱 / ifly / local / langchain);部署 Docker Compose(docker/astronAgent)或 Helm(开发中),鉴权用 Casdoor,数据面 MySQL+Redis+Kafka+MinIO

core/workflow/engine/dsl_engine.py:786
core/workflow/engine/dsl_engine.py:786 python
        return DefaultNodeExecutionStrategy()


class WorkflowEngine(BaseModel):
    """
    Main workflow execution engine.

    Orchestrates the execution of workflow nodes using depth-first search,
    manages error handling, retry mechanisms, and provides various execution
    strategies for different node types.
    """

    engine_ctx: WorkflowEngineCtx = None  # type: ignore
查看 Astron Agent 完整笔记 →
AutoGen python AgentRuntime Protocol 多实现:SingleThreadedAgentRuntime(单进程异步事件队列);分布式 gRPC worker/host runtime(autogen-ext,跨 .NET/Python,见 protos/);agent 经 register_factory 惰性实例化;code executor 经 autogen-ext(Docker/本地)沙箱执行

AgentRuntime Protocol 多实现:SingleThreadedAgentRuntime(单进程异步事件队列);分布式 gRPC worker/host runtime(autogen-ext,跨 .NET/Python,见 protos/);agent 经 register_factory 惰性实例化;code executor 经 autogen-ext(Docker/本地)沙箱执行

autogen-core/src/autogen_core/_single_threaded_agent_runtime.py:149_agent_runtime.py:75_base_agent.py:60
python/packages/autogen-core/src/autogen_core/_single_threaded_agent_runtime.py:149 python
        )


class SingleThreadedAgentRuntime(AgentRuntime):
    """A single-threaded agent runtime that processes all messages using a single asyncio queue.
    Messages are delivered in the order they are received, and the runtime processes
    each message in a separate asyncio task concurrently.

    .. note::

        This runtime is suitable for development and standalone applications.
        It is not suitable for high-throughput or high-concurrency scenarios.
查看 AutoGen 完整笔记 →
Botpress typescript 双 VM 驱动:默认 QuickJS(WASM) 沙箱(完全隔离、128MB 内存上限、超时中断、可 abort),失败回退 Node VM;浏览器/Lambda/CF Workers/Bun/Deno 全支持。平台侧经 bp deploy 部署到 Botpress Cloud 工作区

双 VM 驱动:默认 QuickJS(WASM) 沙箱(完全隔离、128MB 内存上限、超时中断、可 abort),失败回退 Node VM;浏览器/Lambda/CF Workers/Bun/Deno 全支持。平台侧经 bp deploy 部署到 Botpress Cloud 工作区

packages/llmz/src/vm.ts:79vm.ts:200vm.ts:204packages/llmz/README.md:73
packages/llmz/src/vm.ts:79 typescript
  }

  // Determine which driver to use - try QuickJS first, fallback to node if it fails
  let DRIVER: Driver = 'quickjs'

  // Check if user explicitly disabled QuickJS
  if (typeof process !== 'undefined' && process?.env?.USE_QUICKJS === 'false') {
    DRIVER = 'node'
  }

  // ============================================================================
  // QuickJS Driver
  // ============================================================================
查看 Botpress 完整笔记 →
ConnectOnion python 纯库;同步执行,工具在本进程顺序执行(无沙箱);host() 起 uvicorn ASGI(HTTP+WS) 服务,配置在 .co/host.yaml;co create/init/deploy CLI 脚手架

纯库;同步执行,工具在本进程顺序执行(无沙箱);host() 起 uvicorn ASGI(HTTP+WS) 服务,配置在 .co/host.yaml;co create/init/deploy CLI 脚手架

network/host/server.py:280network/asgi/__init__.py:24
connectonion/network/host/server.py:280 python
DEFAULT_RELAY_URL = "wss://oo.openonion.ai"


def host(
    create_agent: Callable,
    port: int = None,
    trust: Union[str, "Agent"] = None,
    result_ttl: int = None,
    workers: int = None,
    reload: bool = None,
    *,
    relay_url: str = DEFAULT_RELAY_URL,
    blacklist: list | None = None,
查看 ConnectOnion 完整笔记 →
Cordum go 多服务部署:Docker Compose / Helm chart(cordum-helm/)/ K8s(deploy/k8s/);镜像 cosign keyless 签名(README.md:251);TLS mTLS 默认;端口 8081 Gateway / 8082 Dashboard / 50051 Safety Kernel gRPC(README.md:312)。一键起栈 tools/scripts/quickstart.sh

多服务部署:Docker Compose / Helm chart(cordum-helm/)/ K8s(deploy/k8s/);镜像 cosign keyless 签名(README.md:251);TLS mTLS 默认;端口 8081 Gateway / 8082 Dashboard / 50051 Safety Kernel gRPC(README.md:312)。一键起栈 tools/scripts/quickstart.sh

README.md:402
README.md:402 markdown

## Architecture

```
cordum/
├── cmd/                          # Service entrypoints + CLI
│   ├── cordum-api-gateway/       # API gateway (HTTP/WS + gRPC)
│   ├── cordum-scheduler/         # Scheduler + safety gating
│   ├── cordum-safety-kernel/     # Policy evaluation
│   ├── cordum-workflow-engine/   # Workflow orchestration
│   ├── cordum-context-engine/    # Optional context/memory service
│   └── cordumctl/                # CLI
├── core/                         # Core libraries
查看 Cordum 完整笔记 →
Cortex Memory rust 五种接入:① REST 服务(Axum,默认 8085,service/src/main.rs:134 Router /api/v2);② MCP server(stdio);③ CLI 二进制;④ Rust 库直接嵌入(CortexMemBuilder builder.rs:74 build);⑤ Rig 工具集。Tokio 异步运行时

五种接入:① REST 服务(Axum,默认 8085,service/src/main.rs:134 Router /api/v2);② MCP server(stdio);③ CLI 二进制;④ Rust 库直接嵌入(CortexMemBuilder builder.rs:74 build);⑤ Rig 工具集。Tokio 异步运行时

cortex-mem-service/src/main.rs:134cortex-mem-core/src/builder.rs:74Cargo.toml:24
cortex-mem-service/src/main.rs:134 rust
    let state = Arc::new(state);

    // Build router
    let app = Router::new()
        .route("/health", get(handlers::health::health_check))
        .nest("/api/v2", routes::api_routes())
        .layer(CorsLayer::permissive())
        .layer(TraceLayer::new_for_http())
        .with_state(state);

    // Start server
    let addr = SocketAddr::from(([127, 0, 0, 1], cli.port));
    info!("Server listening on http://{}", addr);
查看 Cortex Memory 完整笔记 →
CrewAI python 纯库;crew.kickoff() 同步执行(支持 kickoff_async/kickoff_for_each/stream),async task 用 ThreadPool 并行;CLI crewai create/run/install;AMP 云控制面做生产部署

纯库;crew.kickoff() 同步执行(支持 kickoff_async/kickoff_for_each/stream),async task 用 ThreadPool 并行;CLI crewai create/run/install;AMP 云控制面做生产部署

crewai/crew.py:963crewai/flow/runtime.py:1925
lib/crewai/src/crewai/crew.py:963 python
            CrewTrainingHandler(filename).clear()
            raise

    def kickoff(
        self,
        inputs: dict[str, Any] | None = None,
        input_files: dict[str, FileInput] | None = None,
        from_checkpoint: CheckpointConfig | None = None,
    ) -> CrewOutput | CrewStreamingOutput:
        """Execute the crew's workflow.

        Args:
            inputs: Optional input dictionary for task interpolation.
查看 CrewAI 完整笔记 →
Dust typescript 服务化平台:front=Next.js(Pages Router+SSR),agent loop 跑在 Temporal 持久化工作流(可取消/中断/优雅停止);core=Rust 多二进制(core-api/oauth/sqlite-worker);docker-compose 编排 + Postgres/Qdrant/Elasticsearch;工具可在 E2B 沙箱内以非 root 执行

服务化平台:front=Next.js(Pages Router+SSR),agent loop 跑在 Temporal 持久化工作流(可取消/中断/优雅停止);core=Rust 多二进制(core-api/oauth/sqlite-worker);docker-compose 编排 + Postgres/Qdrant/Elasticsearch;工具可在 E2B 沙箱内以非 root 执行

front/temporal/agent_loop/workflows.ts:202
front/temporal/agent_loop/workflows.ts:202 typescript
  let cancelRequested = false;
  const executionScope = new CancellationScope();

  setHandler(cancelAgentLoopSignal, () => {
    cancelRequested = true;
    executionScope.cancel();
  });

  // Interrupt: same immediate kill as cancel, but pending queued messages will be processed
  // afterwards (unlike a full cancel which abandons the queue).
  let interruptRequested = false;

  setHandler(interruptAgentLoopSignal, () => {
查看 Dust 完整笔记 →
E2B typescript 核心强项。云端 Firecracker microVM 隔离运行时(envd 在 e2b-dev/infra)。SDK:commands.run(cmd, {background,cwd,user,envs,timeoutMs,onStdout/onStderr,stdin}) 起进程并流式回传 stdout/stderr(底层走 /bin/bash -l -c,ConnectRPC 流);pty 提供伪终端;files 提供 read/write/list/makeDir/rename/remove/exists/getInfo/watchDir;git 封装 clone/commit/push 等;网络出口经 allowOut/denyOut/rules 精细控制;可自托管(AWS/GCP, Terraform)

核心强项。云端 Firecracker microVM 隔离运行时(envd 在 e2b-dev/infra)。SDK:commands.run(cmd, {background,cwd,user,envs,timeoutMs,onStdout/onStderr,stdin}) 起进程并流式回传 stdout/stderr(底层走 /bin/bash -l -c,ConnectRPC 流);pty 提供伪终端;files 提供 read/write/list/makeDir/rename/remove/exists/getInfo/watchDir;git 封装 clone/commit/push 等;网络出口经 allowOut/denyOut/rules 精细控制;可自托管(AWS/GCP, Terraform)

js-sdk/src/sandbox/commands/index.ts:402js-sdk/src/sandbox/filesystem/index.ts:226python-sdk/e2b/sandbox_sync/main.py:45
packages/js-sdk/src/sandbox/commands/index.ts:402 typescript
    cmd: string,
    opts?: CommandStartOpts & { background?: boolean }
  ): Promise<CommandHandle | CommandResult>
  async run(
    cmd: string,
    opts?: CommandStartOpts & { background?: boolean }
  ): Promise<CommandHandle | CommandResult> {
    const proc = await this.start(cmd, opts)

    return opts?.background ? proc : proc.wait()
  }

  private async start(
查看 E2B 完整笔记 →
Haystack python 纯 Python 库;Pipeline.run() 同步顺序执行,AsyncPipeline.run_async() 让无依赖分支并行(asyncio);warm_up() 钩子做模型/连接的重初始化;本进程执行无沙箱;生产部署经 Hayhooks(独立项目) 把 pipeline 包成 REST API / MCP server / OpenAI 兼容端点

纯 Python 库;Pipeline.run() 同步顺序执行,AsyncPipeline.run_async() 让无依赖分支并行(asyncio);warm_up() 钩子做模型/连接的重初始化;本进程执行无沙箱;生产部署经 Hayhooks(独立项目) 把 pipeline 包成 REST API / MCP server / OpenAI 兼容端点

core/pipeline/pipeline.py:114core/pipeline/async_pipeline.py:28core/component/component.py:49
haystack/core/pipeline/pipeline.py:114 python

            return component_output

    def run(  # noqa: PLR0915, PLR0912, C901
        self,
        data: dict[str, Any],
        include_outputs_from: set[str] | None = None,
        *,
        break_point: Breakpoint | AgentBreakpoint | None = None,
        pipeline_snapshot: PipelineSnapshot | None = None,
        snapshot_callback: SnapshotCallback | None = None,
    ) -> dict[str, Any]:
        """
查看 Haystack 完整笔记 →
hcom rust 单 Rust 二进制,无常驻服务。被挂 agent 跑在 PTY 包装里(run_pty,src/main.rs:69;pty/mod.rs),暴露 TCP inject/state 端口;spawn 用真实终端模拟器(kitty/wezterm/tmux/zellij/iterm…)或 --headless 后台(terminal.rs, integration_spec.rs:82 BackgroundMode)。装机:brew / curl installer / pip|uv

单 Rust 二进制,无常驻服务。被挂 agent 跑在 PTY 包装里(run_pty,src/main.rs:69;pty/mod.rs),暴露 TCP inject/state 端口;spawn 用真实终端模拟器(kitty/wezterm/tmux/zellij/iterm…)或 --headless 后台(terminal.rs, integration_spec.rs:82 BackgroundMode)。装机:brew / curl installer / pip|uv

src/main.rs:69
src/main.rs:69 rust
}

/// Run PTY wrapper mode.
pub fn run_pty(args: &[String]) -> Result<()> {
    if args.is_empty() || args[0] == "--help" || args[0] == "-h" {
        eprintln!("hcom pty - PTY wrapper for hcom");
        eprintln!();
        eprintln!("Usage: hcom pty <tool> [args...]");
        eprintln!();
        eprintln!(
            "Tools: claude, gemini, codex, opencode, kilo, pi, antigravity (agy), cursor, kimi"
        );
        eprintln!();
查看 hcom 完整笔记 →
Hermes Agent python 六种终端后端:local/Docker/SSH/Singularity/Modal/Daytona(TERMINAL_ENV 选;Modal/Daytona 提供 idle 休眠的 serverless 持久化);code_execution 工具让脚本经 UDS/文件 RPC 回调 Hermes 工具,把多步流水线压成零上下文成本一轮;可 $5 VPS 长驻

六种终端后端:local/Docker/SSH/Singularity/Modal/Daytona(TERMINAL_ENV 选;Modal/Daytona 提供 idle 休眠的 serverless 持久化);code_execution 工具让脚本经 UDS/文件 RPC 回调 Hermes 工具,把多步流水线压成零上下文成本一轮;可 $5 VPS 长驻

tools/terminal_tool.py:5tools/code_execution_tool.py:5
tools/terminal_tool.py:5 python
"""
Terminal Tool Module

A terminal tool that executes commands in local, Docker, Modal, SSH,
Singularity, and Daytona environments. Supports local execution,
containerized backends, and cloud sandboxes, including managed Modal mode.

Supported environments:
- "local": Execute directly on the host machine (default, fastest)
- "docker": Execute in Docker containers (isolated, requires Docker)
- "modal": Execute in Modal cloud sandboxes (direct Modal or managed gateway)

Features:
查看 Hermes Agent 完整笔记 →
Hive python uv workspace;async 执行,节点可并行;headless 24/7 运行(docs/key_concepts/worker_agent.md);AgentHost/colony_runtime 管 colony 生命周期;webhook/timer/event triggers;framework.cli:main(hive 命令) + 浏览器 dashboard

uv workspace;async 执行,节点可并行;headless 24/7 运行(docs/key_concepts/worker_agent.md);AgentHost/colony_runtime 管 colony 生命周期;webhook/timer/event triggers;framework.cli:main(hive 命令) + 浏览器 dashboard

core/pyproject.toml:28
core/pyproject.toml:28 toml
]

[project.scripts]
hive = "framework.cli:main"

[tool.uv.sources]
tools = { workspace = true }

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
查看 Hive 完整笔记 →
Lagent python 纯库;可经 distributed/ 服务化——HTTPAgentServer/Client(subprocess 起 FastAPI + /chat_completion、/memory/{session_id}、/health_check) 与 AgentRayActor(Ray 分布式);工具执行无沙箱,IPython/Python 解释器靠子进程+timeout 隔离

纯库;可经 distributed/ 服务化——HTTPAgentServer/Client(subprocess 起 FastAPI + /chat_completion、/memory/{session_id}、/health_check) 与 AgentRayActor(Ray 分布式);工具执行无沙箱,IPython/Python 解释器靠子进程+timeout 隔离

distributed/http_serve/api_server.py:14
lagent/distributed/http_serve/api_server.py:14 python
from lagent.schema import AgentMessage


class HTTPAgentClient:

    def __init__(self, host='127.0.0.1', port=8090, timeout=None):
        self.host = host
        self.port = port
        self.timeout = timeout

    @property
    def is_alive(self):
        try:
查看 Lagent 完整笔记 →
LangChain python 纯库;create_agent 产出可 invoke/stream/astream 的 CompiledStateGraph(factory.py:714),运行时为 LangGraph Pregel;debug=/cache=/transformers= 透传;生产部署指向 LangSmith Deployment(README)

纯库;create_agent 产出可 invoke/stream/astream 的 CompiledStateGraph(factory.py:714),运行时为 LangGraph Pregel;debug=/cache=/transformers= 透传;生产部署指向 LangSmith Deployment(README)

agents/factory.py:1671factory.py:714pyproject.toml:28
libs/langchain_v1/langchain/agents/factory.py:1671 python

    middleware_transformers = [t for m in middleware for t in getattr(m, "transformers", ())]

    return graph.compile(
        checkpointer=checkpointer,
        store=store,
        interrupt_before=interrupt_before,
        interrupt_after=interrupt_after,
        debug=debug,
        name=name,
        cache=cache,
        transformers=[
            ToolCallTransformer,
查看 LangChain 完整笔记 →
Llama Agentic System (llama-stack-apps) python C/S 架构:server 单独启动(llama stack run,uvicorn :8321),client app 经 HTTP 连接。部署形态多样:CLI 脚本(python -m examples.agents.)、Gradio web(agent_store/interior_design_assistant)、桌面(DocQA .dmg/PyInstaller)、移动端(android/iOS 样例)

C/S 架构:server 单独启动(llama stack run,uvicorn :8321),client app 经 HTTP 连接。部署形态多样:CLI 脚本(python -m examples.agents.)、Gradio web(agent_store/interior_design_assistant)、桌面(DocQA .dmg/PyInstaller)、移动端(android/iOS 样例)

README.md:52examples/agent_store/app.py:151
README.md:52 markdown
This will install all dependencies required to (1) Build and start a Llama Stack server (2) Connect your client app to Llama Stack server.


### 2. Starting a Llama Stack Server
- Please see our [llama-stack](https://github.com/meta-llama/llama-stack) repo's [Getting Started Guide](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html) for setting up a Llama Stack distribution and running server to serve API endpoints. You should have a server endpoint for building your client apps.

Once your server is started, you should have seen outputs --
```
...
Listening on :::8321
INFO:     Started server process [587053]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
查看 Llama Agentic System (llama-stack-apps) 完整笔记 →
LlamaIndex python 纯库;agent 是 async Workflow,agent.run() 返回 WorkflowHandler(可 await / 流式迭代);步骤并发由 Workflow 引擎(外部 workflows 包)调度;无内置 server,部署/服务化交给 LlamaDeploy / LlamaAgents(仓库外)

纯库;agent 是 async Workflow,agent.run() 返回 WorkflowHandler(可 await / 流式迭代);步骤并发由 Workflow 引擎(外部 workflows 包)调度;无内置 server,部署/服务化交给 LlamaDeploy / LlamaAgents(仓库外)

agent/workflow/base_agent.py:761workflow/workflow.py:1
llama-index-core/llama_index/core/agent/workflow/base_agent.py:761 python
        **kwargs: Any,
    ) -> WorkflowHandler: ...

    def run(self, *args: Any, **kwargs: Any) -> WorkflowHandler:
        user_msg: Optional[Union[str, ChatMessage]] = None
        chat_history: Optional[List[ChatMessage]] = None
        memory: Optional[BaseMemory] = None
        ctx: Optional[Context] = None
        start_event: Optional[StartEvent] = None

        if args:
            first = args[0]
            if isinstance(first, Context):
查看 LlamaIndex 完整笔记 →
llm-agents python 纯库,同步单进程顺序执行;pip install -e . 安装,python run_agent.py 交互式提问运行;无服务化/异步/沙箱

纯库,同步单进程顺序执行;pip install -e . 安装,python run_agent.py 交互式提问运行;无服务化/异步/沙箱

setup.py:3run_agent.py:3README.md:28
setup.py:3 python
from setuptools import setup, find_packages

setup(
    name='llm_agents',
    version='0.1.0',
    description='A package for building agents which use the OpenAI API to figure out actions to take and can use tools.',
    author='Marc Päpper',
    author_email='marc@paepper.com',
    url='https://github.com/mpaepper/llm_agents',
    packages=find_packages(),
    install_requires=[
        'google-search-results>=2.4.2',
查看 llm-agents 完整笔记 →
LoongFlow python 纯 Python 库(pip install -e .,需 3.12+);全异步 asyncio;进化任务由 run_general.sh/run_math.sh/run_ml.sh 脚本以 --background 后台跑并写 run.log;代码执行隔离靠 multiprocessing 子进程 + timeout(非容器沙箱);ClaudeCodeAgent 默认 permission_mode="acceptEdits" 直接读写真实文件系统

纯 Python 库(pip install -e .,需 3.12+);全异步 asyncio;进化任务由 run_general.sh/run_math.sh/run_ml.sh 脚本以 --background 后台跑并写 run.log;代码执行隔离靠 multiprocessing 子进程 + timeout(非容器沙箱);ClaudeCodeAgent 默认 permission_mode="acceptEdits" 直接读写真实文件系统

framework/pes/evaluator/evaluator.py:217claude_code_agent.py:183
src/loongflow/framework/pes/evaluator/evaluator.py:217 python
{result_data.get('score', '')}. Result summary: {result_data.get('summary', '')}")
        os._exit(0)

    def _execute_in_process_with_timeout(
        self, eval_id: str, evaluator_file_path: str, llm_file_path: str
    ) -> dict:
        """
        Execute the evaluation in a separate process with a timeout, reading result from file.
        """
        self._logger.debug(
            f"[Parent] Preparing to spawn process for eval_id: {eval_id}"
        )
查看 LoongFlow 完整笔记 →
Maestro python 纯脚本,同步阻塞执行,CLI input() 驱动;create_folder_structure() 直接在本地建工程目录/写代码文件(无沙箱);flask_app/ 提供一个调 run_maestro() 的极简 Web 包装

纯脚本,同步阻塞执行,CLI input() 驱动;create_folder_structure() 直接在本地建工程目录/写代码文件(无沙箱);flask_app/ 提供一个调 run_maestro() 的极简 Web 包装

maestro.py:168flask_app/app.py:17
maestro.py:168 python
    console.print(Panel(response_text, title="[bold green]Final Output[/bold green]", title_align="left", border_style="green"))
    return response_text

def create_folder_structure(project_name, folder_structure, code_blocks):
    # Create the project folder
    try:
        os.makedirs(project_name, exist_ok=True)
        console.print(Panel(f"Created project folder: [bold]{project_name}[/bold]", title="[bold green]Project Folder[/bold green]", title_align="left", border_style="green"))
    except OSError as e:
        console.print(Panel(f"Error creating project folder: [bold]{project_name}[/bold]\nError: {e}", title="[bold red]Project Folder Creation Error[/bold red]", title_align="left", border_style="red"))
        return

    # Recursively create the folder structure and files
查看 Maestro 完整笔记 →
Mastra typescript 库 + 服务双形态:agent.stream() 流式(基于 ReadableStream + MastraModelOutput);嵌入 React/Next/Node 或经 @mastra/deployer/server-adapters 部署为独立 HTTP 服务;create-mastra 脚手架 + playground 本地调试 UI;engines.node>=22.13;工具默认本进程执行,可控并发(toolCallConcurrency)

库 + 服务双形态:agent.stream() 流式(基于 ReadableStream + MastraModelOutput);嵌入 React/Next/Node 或经 @mastra/deployer/server-adapters 部署为独立 HTTP 服务;create-mastra 脚手架 + playground 本地调试 UI;engines.node>=22.13;工具默认本进程执行,可控并发(toolCallConcurrency)

loop/loop.ts:139
packages/core/src/loop/loop.ts:139 typescript
  // Build observability context from modelSpanTracker if tracing context is available
  const observabilityContext = createObservabilityContext(rest.modelSpanTracker?.getTracingContext());

  modelOutput = new MastraModelOutput({
    model: {
      modelId: firstModel.model.modelId,
      provider: firstModel.model.provider,
      version: firstModel.model.specificationVersion,
    },
    stream,
    messageList,
    messageId: messageId!,
    options: {
查看 Mastra 完整笔记 →
MetaGPT python 纯库 + typer CLI(metagpt/software_company.py 的 generate_repo/startup);全异步(asyncio);产物落盘到 workspace/ 经 ProjectRepo/GitRepository(含 archive git 提交);代码执行经 RunCode Action / Data Interpreter 在本地执行(无强沙箱);提供 Dockerfile

纯库 + typer CLI(metagpt/software_company.py 的 generate_repo/startup);全异步(asyncio);产物落盘到 workspace/ 经 ProjectRepo/GitRepository(含 archive git 提交);代码执行经 RunCode Action / Data Interpreter 在本地执行(无强沙箱);提供 Dockerfile

metagpt/software_company.py:14metagpt/team.py:122metagpt/environment/base_env.py:244
metagpt/software_company.py:14 python
app = typer.Typer(add_completion=False, pretty_exceptions_show_locals=False)


def generate_repo(
    idea,
    investment=3.0,
    n_round=5,
    code_review=True,
    run_tests=False,
    implement=True,
    project_name="",
    inc=False,
    project_path="",
查看 MetaGPT 完整笔记 →
Modus go serverless WASM:Go Runtime + Wazero 执行模块,按调用加载沙箱跑完即释放;modus CLI(modus new/dev/build) 脚手架与 fast-refresh 本地开发;可自托管或推 GitHub 由 Hypermode 自动构建部署到全球基础设施

serverless WASM:Go Runtime + Wazero 执行模块,按调用加载沙箱跑完即释放;modus CLI(modus new/dev/build) 脚手架与 fast-refresh 本地开发;可自托管或推 GitHub 由 Hypermode 自动构建部署到全球基础设施

runtime/actors/wasmagent.go:29README.md:53
runtime/actors/wasmagent.go:29 go
	"github.com/tochemey/goakt/v3/goaktpb"
)

type wasmAgentActor struct {
	pid          *goakt.PID
	agentId      string
	agentName    string
	status       AgentStatus
	pluginName   string
	plugin       *plugins.Plugin
	host         wasmhost.WasmHost
	module       wasm.Module
	buffers      utils.OutputBuffers
查看 Modus 完整笔记 →
nanobot python 纯 asyncio 库 + CLI;三种入口:CLI nanobot agent、网关 nanobot gateway(WebSocket 多路复用 + 内置 WebUI,打进 wheel)、OpenAI 兼容 HTTP API;shell 工具带 sandbox 后端与 allow-list;Docker / docker-compose / Linux service / macOS LaunchAgent 部署

纯 asyncio 库 + CLI;三种入口:CLI nanobot agent、网关 nanobot gateway(WebSocket 多路复用 + 内置 WebUI,打进 wheel)、OpenAI 兼容 HTTP API;shell 工具带 sandbox 后端与 allow-list;Docker / docker-compose / Linux service / macOS LaunchAgent 部署

查看 nanobot 完整笔记 →
Open Multi-Agent typescript 纯 ESM 库,嵌入任意 Node 18+;并发由 AgentPool 的 Semaphore 控制(默认 maxConcurrency:5);文件工具沙箱在 <cwd>/.agent-workspace(符号链接也解析进根,防 TOCTOU),bash 不沙箱;JSON-first oma CLI 供 shell/CI;tsc 编译 src→dist

纯 ESM 库,嵌入任意 Node 18+;并发由 AgentPool 的 Semaphore 控制(默认 maxConcurrency:5);文件工具沙箱在 <cwd>/.agent-workspace(符号链接也解析进根,防 TOCTOU),bash 不沙箱;JSON-first oma CLI 供 shell/CI;tsc 编译 src→dist

src/tool/built-in/path-safety.ts:30package.json:65
src/tool/built-in/path-safety.ts:30 typescript
  | { ok: true; path: string; root: string }
  | { ok: false; error: string }

export async function resolvePathWithinCwd(
  inputPath: string,
  context: ToolUseContext,
  options: { ensureRoot?: boolean } = {},
): Promise<SafePathResult> {
  // Sandbox explicitly disabled. Return the input path verbatim so the
  // tool behaves as if no sandbox were in place.
  if (context.cwd === null) {
    return { ok: true, path: inputPath, root: '/' }
  }
查看 Open Multi-Agent 完整笔记 →
OpenClaw typescript 常驻 Gateway daemon(launchd/systemd user service)作为单一控制平面;CLI openclaw onboard/gateway/agent/message/cron/...;Node 24(推荐)/22.19+;Docker / docker-compose / fly.toml / render.yaml 多种部署;companion apps(Windows Hub、macOS menu bar、iOS/Android node);built-in runtime id=openclaw,auto 可切换到插件 harness

常驻 Gateway daemon(launchd/systemd user service)作为单一控制平面;CLI openclaw onboard/gateway/agent/message/cron/...;Node 24(推荐)/22.19+;Docker / docker-compose / fly.toml / render.yaml 多种部署;companion apps(Windows Hub、macOS menu bar、iOS/Android node);built-in runtime id=openclaw,auto 可切换到插件 harness

docs/agent-runtime-architecture.md:42
docs/agent-runtime-architecture.md:42 markdown
The package manager also discovers conventional `extensions/`, `skills/`, `prompts/`, and `themes/` directories.

## Runtime Selection

The default built-in runtime id is `openclaw`. Plugin harnesses can register additional runtime ids. `auto` selects a supporting plugin harness when one exists and otherwise uses the built-in OpenClaw runtime.

## Related

- [OpenClaw agent runtime workflow](/openclaw-agent-runtime)
- [Agent runtimes](/concepts/agent-runtimes)
查看 OpenClaw 完整笔记 →
Pilot Protocol go 核心:单 daemon 二进制(pilot-daemon/pilotctl/pilot-gateway/pilot-updater),daemon.New(cfg)+d.Start() 起隧道与 IPC;systemd(Linux)/launchd(macOS) 系统服务托管 + 自动更新器每小时检查;gateway 把远程 agent 映射成本地 IP(sudo pilotctl gateway start);compat 模式经 WSS 走 :443 穿透 UDP 封锁

核心:单 daemon 二进制(pilot-daemon/pilotctl/pilot-gateway/pilot-updater),daemon.New(cfg)+d.Start() 起隧道与 IPC;systemd(Linux)/launchd(macOS) 系统服务托管 + 自动更新器每小时检查;gateway 把远程 agent 映射成本地 IP(sudo pilotctl gateway start);compat 模式经 WSS 走 :443 穿透 UDP 封锁

cmd/daemon/main.go:152pkg/daemon/daemon.go:414README.md:281cmd/daemon/main.go:83
cmd/daemon/main.go:152 go
		slog.Warn("PILOT_BEACON env var overrides compiled default — beacon address redirected to " + *beaconAddr + ". If this is unexpected, check the daemon's environment for tampering.")
	}

	d := daemon.New(daemon.Config{
		RegistryAddr:          *registryAddr,
		BeaconAddr:            *beaconAddr,
		ListenAddr:            *listenAddr,
		SocketPath:            *socketPath,
		Endpoint:              *endpoint,
		AdvertiseEndpoint:     *advertiseEndpoint,
		Encrypt:               *encrypt,
		RegistryTLS:           *registryTLS,
		RegistryFingerprint:   *registryFingerprint,
查看 Pilot Protocol 完整笔记 →
Pipecat python PipelineWorker 包管道,WorkerRunner.run() 异步驱动并管 SIGINT/SIGTERM 优雅退出(auto_end=True 时根 worker 跑完即结束,长驻服务用 False);pipecat.runner(extra runner:uvicorn+fastapi)提供 dev 服务器与 create_transport;可部署到 Pipecat Cloud

PipelineWorker 包管道,WorkerRunner.run() 异步驱动并管 SIGINT/SIGTERM 优雅退出(auto_end=True 时根 worker 跑完即结束,长驻服务用 False);pipecat.runner(extra runner:uvicorn+fastapi)提供 dev 服务器与 create_transport;可部署到 Pipecat Cloud

workers/runner.py:80pipeline/worker.py:170workers/base_worker.py:102
src/pipecat/workers/runner.py:80 python
    runner_task: asyncio.Task | None = field(default=None, repr=False)


class WorkerRunner(BaseObject, BusSubscriber):
    """Manages worker execution.

    Provides a high-level interface for running workers with
    automatic signal handling (SIGINT/SIGTERM), optional garbage
    collection, proper cleanup of resources, and a worker bus + registry
    for multi-worker orchestration.

    Two entry points:
查看 Pipecat 完整笔记 →
PraisonAI python 纯 Python 库,同步/异步(astart/achat)双轨;可选 sandbox/ 隔离代码执行;praisonai CLI(TUI/auto/interactive/chat)、praisonai claw Dashboard(13 页, :8082)、praisonai flow(Langflow :7861)、praisonai ui、ACP server、Docker

纯 Python 库,同步/异步(astart/achat)双轨;可选 sandbox/ 隔离代码执行;praisonai CLI(TUI/auto/interactive/chat)、praisonai claw Dashboard(13 页, :8082)、praisonai flow(Langflow :7861)、praisonai ui、ACP server、Docker

agent/execution_mixin.py:602
src/praisonai-agents/praisonaiagents/agent/execution_mixin.py:602 python
            # If LLM class not available, just update the model string
            pass

    def start(self, prompt: Optional[str] = None, **kwargs: Any) -> Union[str, Generator[str, None, None], None]:
        """Start the agent interactively with verbose output.
        
        Beginner-friendly execution. Defaults to verbose output with streaming
        when running in a TTY. Use this for interactive/terminal usage where 
        you want to see output in real-time with rich formatting.
        
        Args:
            prompt: The input prompt to process. If not provided, uses the 
                    agent's instructions as the task (useful when instructions
查看 PraisonAI 完整笔记 →
Semantic Kernel csharp 纯 SDK/库,宿主自管(async/IAsyncEnumerable 流式)。多 agent 编排跑在 Agents/Runtime(InProcess actor runtime);Process 框架可 InProcess 或 Dapr 分布式运行(Process.Runtime.Dapr);无内建沙箱,工具在宿主进程执行

纯 SDK/库,宿主自管(async/IAsyncEnumerable 流式)。多 agent 编排跑在 Agents/Runtime(InProcess actor runtime);Process 框架可 InProcess 或 Dapr 分布式运行(Process.Runtime.Dapr);无内建沙箱,工具在宿主进程执行

查看 Semantic Kernel 完整笔记 →
smolagents python 纯库 + 多档代码执行:local(AST 解释器,进程内,非安全)、e2b/modal/blaxel(云沙箱)、docker(容器隔离);GradioUI 提供 web 界面;smolagent/webagent CLI;push_to_hub 导出为 HF Space

纯库 + 多档代码执行:local(AST 解释器,进程内,非安全)、e2b/modal/blaxel(云沙箱)、docker(容器隔离);GradioUI 提供 web 界面;smolagent/webagent CLI;push_to_hub 导出为 HF Space

agents.py:1598remote_executors.py:335remote_executors.py:551agents.py:1160
src/smolagents/remote_executors.py:335 python
            raise SerializationError("Unknown final answer format: expected 'safe:' or 'pickle:' prefix")


class E2BExecutor(RemotePythonExecutor):
    """
    Remote Python code executor in an E2B sandbox.

    Args:
        additional_imports (`list[str]`): Additional Python packages to install.
        logger (`Logger`): Logger to use for output and errors.
        allow_pickle (`bool`, default `False`): Whether to allow pickle serialization for objects that cannot be safely serialized to JSON.
            - `False` (default, recommended): Only safe JSON serialization is used. Raises error if object cannot be safely serialized.
            - `True` (legacy mode): Tries safe JSON serialization first, falls back to pickle with warning if needed.
查看 smolagents 完整笔记 →
Strands Agents python 纯库;agent() 同步(run_async 跨线程跑 event loop),invoke_async/stream_async 异步流式;工具默认并发执行;agent.cancel() 线程安全优雅取消;experimental.bidi 提供语音双向流式 runtime;并发调用默认抛 ConcurrencyException

纯库;agent() 同步(run_async 跨线程跑 event loop),invoke_async/stream_async 异步流式;工具默认并发执行;agent.cancel() 线程安全优雅取消;experimental.bidi 提供语音双向流式 runtime;并发调用默认抛 ConcurrencyException

agent.py:484agent.py:810
查看 Strands Agents 完整笔记 →
Swarm python 纯库,同步;工具在本进程直接执行(无沙箱)

纯库,同步;工具在本进程直接执行(无沙箱)

core.py:122
swarm/core.py:122 python
            # pass context_variables to agent functions
            if __CTX_VARS_NAME__ in func.__code__.co_varnames:
                args[__CTX_VARS_NAME__] = context_variables
            raw_result = function_map[name](**args)

            result: Result = self.handle_function_result(raw_result, debug)
            partial_response.messages.append(
                {
                    "role": "tool",
                    "tool_call_id": tool_call.id,
                    "tool_name": name,
                    "content": result.value,
                }
查看 Swarm 完整笔记 →
SwarmClaw typescript Next.js 16 standalone server(npm i -g→CLI 起服务,端口 3456);Electron 桌面 app 把 standalone server 当子进程 spawn(ELECTRON_RUN_AS_NODE);心跳 60s tick + 调度器 60s tick;Docker / fly / railway / render 部署配置齐全;sandbox 浏览器走独立 Docker 镜像

Next.js 16 standalone server(npm i -g→CLI 起服务,端口 3456);Electron 桌面 app 把 standalone server 当子进程 spawn(ELECTRON_RUN_AS_NODE);心跳 60s tick + 调度器 60s tick;Docker / fly / railway / render 部署配置齐全;sandbox 浏览器走独立 Docker 镜像

runtime/heartbeat-service.ts:592runtime/scheduler.ts:51
src/lib/server/runtime/heartbeat-service.ts:592 typescript
  return now < record.lastFailedAt + backoffMs
}

export async function tickHeartbeats() {
  const settings = loadSettings()
  const globalOngoing = shouldRunHeartbeats(settings)

  const now = Date.now()
  // Mission scheduler runs every tick, independent of heartbeat active window,
  // so wallclock budgets and periodic reports still fire overnight.
  try { runMissionScheduler() } catch (error) { log.warn('heartbeat', 'mission scheduler tick failed', error) }

  const nowDate = new Date(now)
查看 SwarmClaw 完整笔记 →
Swarms python 纯库;同步为主,Concurrent/run_agents_concurrently 用 ThreadPoolExecutor,另有 arun/arun_stream 异步与 asyncio 版;aop.py(Agent-as-server)、cron_job.py(schedule)、batch_agent_execution;autosave 落盘状态;swarms CLI 入口

纯库;同步为主,Concurrent/run_agents_concurrently 用 ThreadPoolExecutor,另有 arun/arun_stream 异步与 asyncio 版;aop.py(Agent-as-server)、cron_job.py(schedule)、batch_agent_execution;autosave 落盘状态;swarms CLI 入口

structs/concurrent_workflow.py:403agent.py:3075
swarms/structs/concurrent_workflow.py:403 python

        max_workers = int(get_cpu_cores() * 0.95)

        with concurrent.futures.ThreadPoolExecutor(
            max_workers=max_workers
        ) as executor:
            future_to_agent = {
                executor.submit(
                    self._run_agent_with_streaming,
                    agent,
                    task,
                    img,
                    imgs,
查看 Swarms 完整笔记 →
Transformers Agents python 代码工具在受限 Python 解释器执行(安全沙箱有限);库内调用

代码工具在受限 Python 解释器执行(安全沙箱有限);库内调用

查看 Transformers Agents 完整笔记 →
Upsonic python 纯库;sync 入口经常驻后台事件循环跑 async pipeline(agent.py:21 _get_bg_loop);agent.as_mcp() 把 agent 暴露为 FastMCP server(agent.py:4214);upsonic CLI(pyproject.toml:295);AutonomousAgent 提供 workspace 沙箱(文件/shell 限定在 workspace,路径越界即 raise),可接 E2B 云沙箱

纯库;sync 入口经常驻后台事件循环跑 async pipeline(agent.py:21 _get_bg_loop);agent.as_mcp() 把 agent 暴露为 FastMCP server(agent.py:4214);upsonic CLI(pyproject.toml:295);AutonomousAgent 提供 workspace 沙箱(文件/shell 限定在 workspace,路径越界即 raise),可接 E2B 云沙箱

agent.py:4214src/upsonic/agent/autonomous_agent/autonomous_agent.py:216autonomous_agent/filesystem_toolkit.py:62
src/upsonic/agent/autonomous_agent/autonomous_agent.py:216 python
        from .filesystem_toolkit import AutonomousFilesystemToolKit
        from .shell_toolkit import AutonomousShellToolKit
        
        if workspace is not None:
            self.autonomous_workspace: Path = Path(workspace).resolve()
        else:
            self.autonomous_workspace = Path.cwd().resolve()
        
        if not self.autonomous_workspace.exists():
            self.autonomous_workspace.mkdir(parents=True, exist_ok=True)
        
        effective_storage: Optional[Storage]
        if db is not None:
查看 Upsonic 完整笔记 →
vectara-agentic python 纯 Python 库;chat() 用 asyncio.run 包裹 achat()(agent.py:547)。内置 OpenAI 兼容 HTTP 端点:create_app() 基于 FastAPI 暴露 /chat、/v1/completions、/v1/chat(X-API-Key 鉴权),start_app() 用 uvicorn 起服务(agent_endpoint.py:95,240);附 Dockerfile

纯 Python 库;chat() 用 asyncio.run 包裹 achat()(agent.py:547)。内置 OpenAI 兼容 HTTP 端点:create_app() 基于 FastAPI 暴露 /chat、/v1/completions、/v1/chat(X-API-Key 鉴权),start_app() 用 uvicorn 起服务(agent_endpoint.py:95,240);附 Dockerfile

agent_endpoint.py:95agent_endpoint.py:240
vectara_agentic/agent_endpoint.py:95 python
    usage: CompletionUsage


def create_app(agent: Agent, config: AgentConfig) -> FastAPI:
    """
    Create and configure the FastAPI app.

    Args:
        agent (Agent): The agent instance to handle chat/completion.
        config (AgentConfig): Configuration containing the API key.

    Returns:
        FastAPI: Configured FastAPI application.
查看 vectara-agentic 完整笔记 →
VoltAgent typescript 库 + server provider 模式:@voltagent/server-hono/server-elysia/serverless-hono(Cloudflare/边缘) 把 agents/workflows 暴露为 HTTP(默认 :3141);代码沙箱适配器 sandbox-e2b/sandbox-daytona/sandbox-blaxel;create-voltagent-app 脚手架、@voltagent/cli

库 + server provider 模式:@voltagent/server-hono/server-elysia/serverless-hono(Cloudflare/边缘) 把 agents/workflows 暴露为 HTTP(默认 :3141);代码沙箱适配器 sandbox-e2b/sandbox-daytona/sandbox-blaxel;create-voltagent-app 脚手架、@voltagent/cli

voltagent.ts:144
packages/core/src/voltagent.ts:144 typescript
        this.registerWorkflows(options.workflows);
      }

      // Handle server provider if provided
      if (options.server) {
        this.serverInstance = options.server({
          agentRegistry: this.registry,
          workflowRegistry: this.workflowRegistry,
          logger: this.logger,
          voltOpsClient: this.registry.getGlobalVoltOpsClient(),
          observability: this.observability,
          mcp: {
            registry: this.mcpServerRegistry,
查看 VoltAgent 完整笔记 →