展示HN:Horizons – 开源代理执行引擎
Show HN: Horizons – OSS agent execution engine

原始链接: https://github.com/synth-laboratories/Horizons

## Horizons 服务器摘要 Horizons 是一个用于构建和执行由 LLM 和工具驱动的有向无环图 (DAG) 的框架。它专为复杂工作流设计,并提供 Python 和 Rust SDK,以及一个 TypeScript 客户端。 **入门:** 推荐使用 Docker Compose 在 `http://localhost:8000` 上进行快速设置,并具有持久化存储。或者,您可以直接构建并运行 Rust 服务器(需要 Rust 1.85+),默认使用 SQLite 和本地文件系统后端。 **主要特性:** Horizons 通过 API (`/api/v1/graph/*`) 暴露一个图引擎,允许您列出、验证和执行用 YAML 定义的图。Python 执行默认使用本地子进程,并提供可选的嵌入式解释器。 **重要提示:** 服务器会自动将组织和项目 ID 注入到图输入中。LLM 节点使用环境变量中的 API 密钥。工具调用可以路由到远程执行器。该项目采用 FSL-1.1-Apache-2.0 许可,限制竞争性产品开发两年,之后转换为 Apache 2.0。

Synth Laboratories 发布了 Horizons,一个开源的智能体执行引擎(可在 GitHub 上获取:github.com/synth-laboratories)。Horizons 旨在简化基于智能体的产品构建,它提供了一个完整的堆栈,用于智能体优化(使用 GEPA 和 MIPRO 等方法)、评估(RLM)和大规模部署。 它旨在成为一个可自托管的“开箱即用”替代方案,类似于 OpenAI 的 Frontier 和 OpenClaw 等平台,支持与 Claude、Codex 和 OpenCode 的集成。主要功能包括用于后端集成的双向事件驱动接口、多智能体控制 (MCP) 支持以及基于角色的访问控制 (RBAC) 规划。 开发者设想 Horizons 可以满足对上下文更新、内存管理和持续学习标准化实现的需求——特别是当项目规模扩大并需要管理具有权限操作的多个智能体时。早期用户反馈强调了它在调整长周期任务和超越手动提示优化方面的潜力。
相关文章

原文

Docker Compose (recommended):

Starts the Horizons server on http://localhost:8000 with persistent local storage. No external services required.

curl http://localhost:8000/health
npm install @horizons-ai/sdk

Prerequisites: Rust 1.85+ (edition 2024 support).

cargo build --release -p horizons_server --features all
cargo run --release -p horizons_server --features all -- serve

Starts on http://localhost:8000 with dev backends (SQLite + local filesystem). No external services required.

Python execution backends:

  • Default: local python3 subprocess.
  • Optional: embedded interpreter via pydantic/monty (requires --features graph_monty and HORIZONS_GRAPH_PYTHON_BACKEND=monty).

Horizons exposes the graph engine under /api/v1/graph/*.

List built-in graphs:

curl -sS \
  -H "x-org-id: $ORG_ID" \
  -H "x-project-id: $PROJECT_ID" \
  "http://localhost:8000/api/v1/graph/registry"

Validate a built-in graph:

curl -sS \
  -H "x-org-id: $ORG_ID" \
  -H "x-project-id: $PROJECT_ID" \
  -X POST "http://localhost:8000/api/v1/graph/validate" \
  -d '{"graph_id":"verifier_rubric_single","strictness":"strict"}'

Execute a graph from YAML:

curl -sS \
  -H "x-org-id: $ORG_ID" \
  -H "x-project-id: $PROJECT_ID" \
  -X POST "http://localhost:8000/api/v1/graph/execute" \
  -d '{
    "graph_yaml": "name: hello\nstart_nodes: [n1]\nend_nodes: [n1]\nnodes:\n  n1:\n    name: n1\n    type: DagNode\n    input_mapping: \"{}\"\n    implementation:\n      type: python_function\n      fn_name: main\n      fn_str: |\n        def main():\n            return {\"ok\": True}\ncontrol_edges:\n  n1: []\n",
    "inputs": {}
  }'

Notes:

  • The HTTP layer injects "_horizons": {"org_id": "...", "project_id": "..."} into graph inputs.
  • LLM nodes resolve API keys from GRAPH_LLM_API_KEY and provider-specific env vars (e.g. OPENAI_API_KEY).
  • Tool calls can be routed to a remote executor via GRAPH_TOOL_EXECUTOR_URL (optional).
Crate Version Description
horizons_server 0.1.0 Axum HTTP API server
horizons-ai (horizons_rs/) 0.1.0 Rust SDK client — crates.io
horizons_core 0.1.0 Core domain models and backend traits (events, projects DB, agents/actions, pipelines, sandbox runtime)
horizons_graph 0.1.0 DAG execution engine (LLM/tool/python nodes) with built-in verifier graph registry
horizons_integrations 0.1.0 Infrastructure adapters (vector store, queue backends, observability sinks)
voyager 0.1.0 Memory — embed/retrieve/rank
mipro_v2 0.1.0 Optimization — prompt/policy optimization engine
rlm 0.1.0 Evaluation — reward signals, weighted scoring, pass/fail verification

All crates use Rust edition 2024.

SDK Version Path
Python (horizons) 0.1.0 horizons_py/PyPI
TypeScript (@horizons-ai/sdk) 0.1.0 horizons_ts/npm
Rust (horizons-ai) 0.1.0 horizons_rs/crates.io

Horizons keeps test code out of the repo. See synth-laboratories/testing (horizons-tests/) for unit, property-based, mocked integration, and opt-in live-LLM tests.

FSL-1.1-Apache-2.0 (the Sentry license) — Copyright 2026 Synth Incorporated.

Free to use, modify, and redistribute for any purpose except building a competing product. Converts to Apache 2.0 after two years.

联系我们 contact @ memedata.com