Metadata-Version: 2.4
Name: openearth-ai
Version: 0.4.3
Summary: Self-evolving agent system — 越用越强 · 明文优先,权重兜底
Project-URL: Homepage, https://github.com/coo-2022/OpenEarth
Requires-Python: >=3.9
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: eval-type-backport>=0.2; python_version < '3.10'
Requires-Dist: lxml>=4.9
Requires-Dist: markitdown>=0.0.1
Requires-Dist: pydantic-ai-slim[openai]>=1.0
Requires-Dist: pydantic>=2
Requires-Dist: pymupdf>=1.23
Requires-Dist: python-docx>=1.1
Requires-Dist: python-pptx>=0.6.23
Requires-Dist: pyyaml>=6
Requires-Dist: trafilatura>=1.6
Provides-Extra: agent
Requires-Dist: openai>=1.0; extra == 'agent'
Provides-Extra: codegraph
Requires-Dist: tree-sitter-python>=0.23; extra == 'codegraph'
Requires-Dist: tree-sitter>=0.23; extra == 'codegraph'
Provides-Extra: connectors
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Provides-Extra: light
Provides-Extra: spreadsheet
Requires-Dist: openpyxl>=3; extra == 'spreadsheet'
Provides-Extra: swebench
Requires-Dist: pandas>=2; extra == 'swebench'
Requires-Dist: pyarrow>=10; extra == 'swebench'
Requires-Dist: swebench>=2; extra == 'swebench'
Requires-Dist: unidiff>=0.7; extra == 'swebench'
Description-Content-Type: text/markdown

<div align="center">

# OpenEarth

**Self-evolving agent system — 让你的 coding agent 越用越强。**

[![CI](https://github.com/coo-2022/OpenEarth/actions/workflows/ci.yml/badge.svg)](https://github.com/coo-2022/OpenEarth/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/coo-2022/OpenEarth?sort=semver&color=E07A5F)](https://github.com/coo-2022/OpenEarth/releases)
[![Python](https://img.shields.io/badge/python-3.10–3.13-4A90B8)](https://github.com/coo-2022/OpenEarth)

[English](README.en.md) · 简体中文

</div>

## 介绍

OpenEarth 把 agent 运行过程中的**全部经验** —— 轨迹、技能、知识、记忆 —— 沉淀成可检视、可演进、可分享的明文数据,下次会话直接用上,越用越强。

- 📡 **无感采集**:后台读各 agent 原生会话库(零插桩),采下完整轨迹(思考 / 工具调用 / 结果),训练与推理共用一套。
- 🗂️ **经验即数据**:轨迹 / 技能 / 知识 / 记忆进同一个明文 git store,可检视、可版本化、可分享。
- 🌿 **从经验演进**:在 `train/*` 分支上从轨迹蒸馏技能,**无回退 gate** 通过才合并进 `main`。
- 📚 **知识库**:文档摄入成可检索 wiki,agent 直接读。
- 🔌 **多 agent**:opencode · claude-code · codex · cursor · codeagent。

## 安装

> **把下面这段整体复制给你的 agent,它会自动装好并初始化。** 也可自己照着敲。

````markdown
---
name: openearth-install
description: 安装并初始化 OpenEarth。
---

# openearth-install

用户要安装 / 初始化 OpenEarth 时按此执行。**不要索要 API key 明文**,需要就让用户设环境变量。

## 1. 装包 + 配置

```bash
python -m pip install openearth-ai
openearth config --init
```

编辑 `~/.openearth/config.yaml`,确认 `domain_agent`(`base_url` / `model`),`api_key` 保持 `env:` 形式:

```yaml
domain_agent:
  agent_backend: pydantic-ai
  model: <your-model>
  base_url: https://<your-openai-compatible-endpoint>/v1
  api_key: env:OPENEARTH_DOMAIN_AGENT_KEY
```

设环境变量(Windows 用 `setx`,重开终端生效):

```bash
export OPENEARTH_DOMAIN_AGENT_KEY=sk-...      # 摄入图片/PDF 图表再设 OPENEARTH_CURATOR_VLM_KEY
```

## 2. 装到 agent + 启动 daemon

```bash
openearth install         # 装技能 + 写 Knowledge pointer + 起 daemon
openearth service status
openearth agents
```

启动失败就前台调试:`openearth daemon`(日志 `~/.openearth/log/daemon.log`)。

## 3. 加文档到知识库(用户给路径时)

```bash
openearth knowledge ingest <path>     # 把返回的 job_id 告诉用户
openearth knowledge progress
```

摄入完成后读 `~/.openearth/experience/Knowledge/*.md` 回答用户问题。
````

锁版本 / 离线:到 [Releases](https://github.com/coo-2022/OpenEarth/releases) 下载 `.whl`,`pip install openearth_ai-<ver>-py3-none-any.whl`。
