KnowlyrCore
Agent 环境协议与共享数据模型 - Gym 风格环境注册表与领域配置 Gym-style agent environment protocol, registry, and domain profiles
快速开始 · 环境协议 · 注册表 · 领域配置 · Knowlyr 生态
GitHub Topics: gym, agent-environment, registry, domain-profile, pydantic, mcp
为 knowlyr-agent 生态提供统一的 Gym 风格环境协议、环境注册表和领域配置,是其余 5 个子包的共享基础。
核心能力 / Core Capabilities
AgentEnv 协议 → TimeStep 返回 → Registry 注册/查找 → DomainProfile 领域配置
设计特点 / Design Highlights
| 特点 | 说明 |
|---|---|
| Gym 协议 | 借鉴 Gymnasium / BrowserGym,统一 reset/step/close 接口 |
| 类型安全 | Pydantic 数据模型,完整类型标注 |
| 可组合包装器 | EnvWrapper 基类,MaxSteps/Timeout/Reward/Recorder 自由叠加 |
| 多领域 | 7 个内置 DomainProfile:coding, browser, conversation, engineering, advisory, discussion, generic |
| 注册表 | register/make/list_envs,与 Gymnasium 一致的环境管理方式 |
安装 / Installation
pip install knowlyr-core
开发模式:
pip install knowlyr-core[dev]
快速开始 / Quick Start
环境协议 / Environment Protocol
from knowlyrcore import AgentEnv, TimeStep, make, register
# 注册自定义环境
class MyEnv(AgentEnv):
domain = "coding"
def reset(self, *, task=None, seed=None) -> TimeStep:
return TimeStep(observation="ready")
def step(self, action: dict) -> TimeStep:
return TimeStep(observation="done", terminated=True)
def close(self): ...
@property
def available_tools(self) -> list[str]:
return ["bash", "submit"]
register("my/env", MyEnv, domain="coding")
env = make("my/env")
ts = env.reset()
领域配置 / Domain Profiles
from knowlyrcore import get_domain_profile, list_domain_profiles
# 查看所有领域
print(list_domain_profiles())
# ['coding', 'browser', 'conversation', 'engineering', 'advisory', 'discussion', 'generic']
# 获取领域工具列表
profile = get_domain_profile("coding")
for tool in profile.tools:
print(f"{tool.name}: {tool.description}")
包装器组合 / Composable Wrappers
from knowlyrcore.wrappers import MaxStepsWrapper, TimeoutWrapper
env = make("my/env")
env = MaxStepsWrapper(env, max_steps=30)
env = TimeoutWrapper(env, timeout=300)
API 概览
| 模块 | 核心导出 | 说明 |
|---|---|---|
env |
AgentEnv, EnvWrapper |
环境协议与包装器基类 |
timestep |
TimeStep |
统一返回类型 (observation/reward/terminated/truncated/info) |
registry |
register, make, list_envs, spec |
环境注册表 |
domain |
DomainProfile, ToolSpec, get_domain_profile |
领域配置 |
models |
TaskInfo, ToolResult |
共享数据模型 |
wrappers |
MaxStepsWrapper, TimeoutWrapper, RewardWrapper, RecorderWrapper |
内置包装器 |
License
AI Data Pipeline 生态
10 个工具覆盖 AI 数据工程全流程,均支持 CLI + MCP,可独立使用也可组合成流水线。
| 层 | 项目 | 说明 | 仓库 |
|---|---|---|---|
| 情报 | AI Dataset Radar | 数据集竞争情报、趋势分析 | GitHub |
| 分析 | DataRecipe | 逆向分析、Schema 提取、成本估算 | GitHub |
| 生产 | DataSynth | LLM 批量合成、种子数据扩充 | GitHub |
| 生产 | DataLabel | 轻量标注工具、多标注员合并 | GitHub |
| 质检 | DataCheck | 规则验证、重复检测、分布分析 | GitHub |
| 质检 | ModelAudit | 蒸馏检测、模型指纹、身份验证 | GitHub |
| Agent | KnowlyrCore | Gym 协议、注册表、领域配置 | You are here |
| Agent | AgentSandbox | Docker 执行沙箱、轨迹重放 | GitHub |
| Agent | AgentRecorder | 标准化轨迹录制、多框架适配 | GitHub |
| Agent | AgentReward | 过程级 Reward、Rubric 多维评估 | GitHub |
graph LR
A[Radar] --> B[Recipe] --> C[Synth] --> E[Check] --> F[Audit] --> G[Hub]
B --> D[Label] --> E
G --> H[Sandbox] --> I[Recorder] --> J[Reward]
style H fill:#e1f5fe
Metadata
Release files for knowlyr-core 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| knowlyr_core-0.1.2.tar.gz | 17.5 kB | Without provenance | Details for knowlyr_core-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| knowlyr_core-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for knowlyr_core-0.1.2-py3-none-any.whl |
Total release size: 31.9 kB
Release files / knowlyr_core-0.1.2.tar.gz
| Download URL | knowlyr_core-0.1.2.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
182a35cc71905d5a70e915b1fd5684a410beaa03f0ec89378ce4b23888c3456e
|
|
BLAKE2b-256 checksum How to use checksums |
8952fb50a97153c8169e8be9c92f009b9aa707e76f37972eed5253e3a3392763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / knowlyr_core-0.1.2-py3-none-any.whl
| Download URL | knowlyr_core-0.1.2-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
609e7f87d522f9eeb465eefdec8022339e046a5db3026920affcc57d230c9d13
|
|
BLAKE2b-256 checksum How to use checksums |
f65b50498cd2f75785312ba9ed4c24785dd5d739fab8878c9258169032604a20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for knowlyr-core 0.1.2
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.