Skip to main content

flare-kernel

通用编排与执行内核。

边界文档:

  1. packages/flare-kernel/docs/KERNEL-BOUNDARY.md
  2. docs/contracts/core/agent.md
  3. packages/flare-kernel/docs/replay-snapshot-technical-spec.md

职责:

  1. Decision 路由与策略入口。
  2. Execution 流程推进与状态管理。
  3. Runtime(含重试、超时、追踪)。
  4. 加载 domain pack 并执行。

Day 2 最小骨架

目录:

  1. src/flare_kernel/router:接口路由
  2. src/flare_kernel/runtime:trace_id 与基础日志
  3. src/flare_kernel/contracts:请求/响应契约

最小接口:

  1. POST /kernel/run
  2. POST /kernel/stream
  3. GET /kernel/health
  4. POST /kernel/knowledge/ingest
  5. POST /kernel/knowledge/search

kernel 现已输出 mode/context 运行时占位事件与字段。

品牌注入(可选)

  1. kernel 支持从 domain-pack 读取品牌配置: branding/instance-branding.json
  2. 读取方式:
    • 优先通过环境变量 FLARE_DOMAIN_PACK_ROOT 显式指定
    • 本地仓库运行时可回退到仓库根目录下的 domain-packs/
  3. 注入位置:
    • POST /kernel/run 响应 result.instance_profile
    • POST /kernel/stream SSE 事件 instance_profile

说明:品牌注入通过外部 domain-pack 配置,core 不写死产品名、logo、标签。

本地启动(示例):

uvicorn flare_kernel.main:app --app-dir packages/flare-kernel/src --host 0.0.0.0 --port 8002

环境变量(真实链路):

  1. APIPRO_API_KEY(必填,真实 APIPro 调用)
  2. LLM_PROVIDER_BACKEND(当前本地模板为 apipro)
  3. FLARE_POSTGRES_DSN
  4. FLARE_REDIS_URL
  5. FLARE_QDRANT_URL

健康检查会输出依赖状态:

  1. llm_ready
  2. postgres_ready
  3. redis_ready
  4. qdrant_ready

模式决策优先级(/kernel/run 与 /kernel/stream):

  1. intent_override(外部业务侧注入)
  2. 消息意图识别(内置关键词)
  3. manual_mode
  4. current_mode
  5. fallback(intent/default)

安装与依赖

从 PyPI 安装:

pip install flare-kernel

启用可选的 RapidOCR 支持:

pip install "flare-kernel[ocr]"

本包要求 Python 3.11 或更高版本,并依赖 flare-engines >=1.0.0,<2.0.0。完整第三方依赖及可选依赖以 pyproject.toml 为准。

仓库内本地安装仍可使用 pip install packages/flare-kernel;发布元数据位于 packages/flare-kernel/pyproject.toml。

Metadata

Release files for flare-kernel 1.1.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flare-kernel 1.1.27
File Size Uploaded Provenance Actions
flare_kernel-1.1.27.tar.gz 3.6 MB Without provenance Details for flare_kernel-1.1.27.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flare-kernel 1.1.27
File Interpreter ABI Platform Actions
flare_kernel-1.1.27-py3-none-any.whl Python 3 none any Details for flare_kernel-1.1.27-py3-none-any.whl

Total release size: 6.3 MB

Release files / flare_kernel-1.1.27.tar.gz

Download URL flare_kernel-1.1.27.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
2712b01d42b7fe483f9af3c559a4e52f5f5b8726ce50b265af91af259ab55436
BLAKE2b-256 checksum
How to use checksums
9b2d910e6500fd93aae8d31c58c3fc1d0182f84d7447f96ef010e69c300d8204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / flare_kernel-1.1.27-py3-none-any.whl

Download URL flare_kernel-1.1.27-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1b20f5afc25bbe7b7c7b06e03f8005c9bd658f777fc217c87cb6580ce7b05e28
BLAKE2b-256 checksum
How to use checksums
1df444c7c6f430e650ba11f38f64b0a463f2eae096ac9c6600a69deb0a022b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for flare-kernel 1.1.27

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.27 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page