ChainPeer Large Logo

ChainPeer

ChainPeer v1.0 is now available

The intelligent terminal for modern engineering.

A universal, lightweight, and incredibly capable coding agent. Built to understand context, write code, and solve problems directly in your terminal.

Meet ChainPeer

Your AI engineering partner.

Plan & Execute

ChainPeer treats planning as executable control state, not loose notes. The plan tools turn complex work into inspectable steps, dependency edges, and strict progress updates.

DAG task design: steps declare depends_on, parallel work stays parallel, and blocked dependencies cannot be executed early.

Plan tools coordinate execution: plan_create, plan_next, plan_update_step, plan_link_dependency, and plan_close provide scheduling, cycle checks, state transitions, and expected_version optimistic locking.

>_ ChainPeer v0.1.1
Ready for engineering work
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
首先,创建计划:
Tokens: input 5.8k / 245.5k (2.4%), cached 0 (0.0%), output 452
Running plan_create
Tool: plan_create completed in 2ms
计划已创建,版本号为 1。现在查看可执行的步骤并开始工作。
Tokens: input 6.1k / 245.5k (2.9%), cached 5.7k (80.0%), output 52
Running plan_next
Tool: plan_next completed in 1ms
Step 1 可以开始。先创建 data 目录,然后创建三个 Python 文件(它们之间的代码无实际依赖,可以一起创建)。
Tokens: input 7.4k / 245.5k (3.0%), cached 7.1k (96.6%), output 452
Running bash: mkdir -p data
Running plan_update_step
Tool: bash completed in 146ms
Tool: plan_update_step completed in 10ms
现在创建三个 Python 文件:
Tokens: input 7.7k / 245.5k (3.1%), cached 5.7k (73.8%), output 1.3k
Running write_file
Running write_file
Running write_file
Tool: write_file completed in 1ms
Tool: write_file completed in 1ms
Tool: write_file completed in 1ms
三个文件已创建完成。现在将前三个步骤标记为完成,并开始执行。
Tokens: input 9.3k / 245.5k (3.8%), cached 7.7k (82.7%), output 117
Running plan_update_step
Running plan_update_step
Running plan_update_step
Tool: plan_update_step completed in 10ms

Long Context & History Recovery

Never lose track. Seamlessly resume long conversations with intelligent history summarization.

>_ ChainPeer v0.1.1
Ready for engineering work
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
Resumed session 20260604_1...fb38: 16 visible message(s), showing last 6.
Full context is still loaded; 10 older message(s) are hidden from the terminal.
- assistant: 任务1验证通过,10个随机数已写入 JSON。现在执行任务2。
- assistant: 任务2执行成功。验证输出。
- assistant: 统计数据验证通过。现在执行最后一个任务3。
- assistant: 任务3执行成功。读取最终报告并呈现。
- assistant: 关闭最后一个步骤和计划。
- assistant: 全部完成。下面是整个流程的总结和最终报告。 --- ## 任务链式依赖执行总结 ### 三个任务及其依赖关系 ```任务1 > 任务2 > 任务3```
↓ random_numbers.json → statistics.json → final_report.txt ``` ### 任务说明 | 任务 | Python 文件 | 输入 | 输出 ...
Use /status for details, /sessions to switch, or continue typing below.
You > |
session 20260604...fb38 | model glm-5-turbo | ctx 6.1% cache 38.5%

Engineered for precision.

Every detail of ChainPeer is crafted to eliminate friction between your thought process and the final code.

Universal Context

ChainPeer seamlessly indexes your entire codebase, understanding the subtle architectural decisions and patterns unique to your project. It writes code that looks like yours.

Lightning Fast

Native execution with zero bloat. ChainPeer runs locally and connects to models with minimal latency.

Multi-Model

ChainPeer currently targets OpenAI-compatible API models. Its model-side interaction design and prompts are primarily tuned around the GLM model family.

Terminal Native

No context switching. Run tests, review diffs, and execute complex refactors without ever leaving your command line interface.

Industry Innovation

Workflow Design

The core architectural breakthrough of ChainPeer.

The model understands intent, explains complex inputs, and chooses the right workflow.

Workflow turns repeated work into deterministic commands, schemas, preflight checks, runs, and artifact contracts.

ChainPeer provides planning, context, session recovery, and tool execution; ChainPeerFi injects finance prompts and workflow commands at runtime.

Financial Agent Extension

ChainPeerFi

A specialized financial agent extension for quantitative research and investment analysis.

Factor Detection & Research

Check data, define factor logic, build reproducible experiments, and report leakage, bias, and robustness risks.

>_ ChainPeerFi v0.1.1
Finance research and strategy workspace
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
You > 请使用 $factor_detection 对 (-1 * Ts_Rank(rank(low), 9)) 进行因子回测
Agent:
Skill: factor_detection (explicit_dollar_name)
我将按照因子检测工作流来执行回测。首先,让我解读因子定义并检查本地可用数据。
因子定义解读:
- rank(low):横截面排名(按当日最低价在全市场中的百分位排名)
- Ts_Rank(..., 9):在 9 天滚动窗口内的时序排名
- -1 *:取反,即做多时序排名低的标的(近期最低价排名处于低位的标的的)
让我先检查本地数据和项目结构。
Tokens: input 7.2k / 245.5k (2.9%), cached 0 (0.0%), output 349
Running bash: python -m chainpeer_fi.commands.finance factor discover-data
Running bash: python -m chainpeer_fi.commands.finance factor preflight --config factor.json
Tool: bash completed in 146ms
预检通过。现在执行因子回测并生成 manifest、指标文件和 HTML 报告。
Running bash: python -m chainpeer_fi.commands.finance factor run --config factor.json
20260604_170344_neg_ts_rank_rank_low_9

Each run writes an auditable artifact folder: charts, config, structured metrics, Markdown notes, PDF report, and manifest for reproduction.

config.json fixes the factor expression, data scope, and backtest parameters.
factor_report.json stores structured metrics for programmatic comparison.
factor_report.md and factor_report.pdf provide readable research notes and a fixed-format report.
manifest.json records run artifacts, commands, and reproduction metadata.
charts/ outputs IC, quantile returns, drawdown, turnover, and sample-stability visuals.
deterministic
charts/13 png
cumulative_rank_ic.png
factor_distribution.png
factor_vs_forward_return.png
ic_decay.png
long_short_drawdown.png
monthly_rank_ic_heatmap.png
quantile_cumulative.png
quantile_mean_returns.png
rank_ic_timeseries.png
rank_ic_vs_sample_size.png
top_bottom_turnover.png
walk_forward_rank_ic.png
yearly_rank_ic.png
config.json
JSON
factor_report.json
JSON
factor_report.md
MD
factor_report.pdf
PDF
manifest.json
RUN

Fixed-format PDF factor report

ChainPeerFi can consistently output the same PDF report structure for every factor backtest, making results easy to compare, archive, and review.

Backtest Report Page 2
Backtest Report Page 3
Backtest Report Page 4
Backtest Report Page 5
Backtest Report Cover Page

Strategy Iteration

Manage experiment configurations, validate runs, and enable reproducible strategy improvements.

>_ ChainPeerFi v0.1.0
Finance research and strategy workspace
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
You > 请使用 $long_strategy_iteration对该项目下的策略进行迭代,目标: 去手续费年化>30%,最大回撤<15%。
Agent:
Skill: long_strategy_iteration (explicit_dollar_name)
我先来探索一下项目结构并理解现有的策略和数据。
Tokens: input 6.6k / 245.5k (2.7%), cached 0 (0.0%), output 93
Running list_files: .
Tool: list_files completed in 2ms
Tokens: input 7.0k / 245.5k (2.9%), cached 6.6k (93.8%), output 62
Running read_file: data/final_report.txt
Running read_file: data/statistics.json
Running read_file: data/reproduce_config.json
Running read_file: data/sample_reproduce_config.json
Tool: read_file completed in 7ms
Tool: read_file completed in 0ms
Tool: read_file completed in 0ms
Tool: read_file completed in 0ms
Tokens: input 10.9k / 245.5k (4.4%), cached 7.0k (64.7%), output 94
Running read_file: outputs/research_extraction.md
Running read_file: outputs/data_requirements.md

Broker Report Reproduction

Convert formulas, tables, and conclusions into auditable code.

>_ ChainPeerFi v0.1.0
Finance research and strategy workspace
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
You > 请使用 $research_reproduction对 'xxxx研报.pdf' 进行复现。
Agent:
Skill: research_reproduction (explicit_dollar_name)
我来按照 research_reproduction 的工作流,首先在项目目录中定位并读取该研报 PDF。
Tokens: input 6.6k / 245.5k (2.7%), cached 0 (0.0%), output 113
Running glob: **/*研报*.pdf in .
Running glob: **/*.pdf in .
Tool: glob completed in 1ms
Tool: glob completed in 1ms
找到文件 xxxx研报.pdf (7.4 MB)。先读取前 30 页内容以提取研报核心信息。
Tokens: input 6.9k / 245.5k (2.8%), cached 6.6k (95.6%), output 58
Running read_pdf: xxxx研报.pdf
Tool: read_pdf completed in 39.13s
研报内容已提取完毕。现在让我整理关键信息并检查工作环境。
Tokens: input 12.2k / 245.5k (5.0%), cached 6.9k (56.8%), output 623
Running bash: cd /e/code/agent/test && python -m chainpeer_fi.commands.finance --help 2>&1 | head -50
Running bash: cd /e/code/agent/test && python -m chainpeer_fi.commands.finance factor

Investment Analysis

Separate assumptions based on provided facts, explain risks, and avoid hallucinated data.

>_ ChainPeerFi v0.1.0
Finance research and strategy workspace
model glm-5-turbo|workspace test
Type /help|Enter send|Ctrl+J newline
Ctrl+O history|Ctrl+L clear|Ctrl+C drafts
You > 请使用 $investment_advice,结合我的个人持仓情况('持仓情况.txt'),进行投资分析
Agent:
Skill: investment_advice (explicit_dollar_name)
我先读取您的持仓文件,了解您的投资情况。
Tokens: input 6.6k / 245.5k (2.7%), cached 6.3k (94.7%), output 54
Running read_file: 持仓情况.txt
Tool: read_file completed in 0ms
现在让我检查一下投资分析工具是否可用。
Tokens: input 7.5k / 245.5k (3.0%), cached 6.6k (88.4%), output 1.2k
Running bash: python -m chainpeer_fi.commands.finance investment --help 2>&1 | head -30
接下来将结合持仓结构、风险暴露和可用市场数据生成投资分析。

Try ChainPeer

For local engineering work, planned execution, and long conversation recovery.

Try Install

Consult ChainPeerFi

For quantitative research, factor backtesting, strategy iteration, and investment analysis.

Contact Us

contact@sky-castle.com.cn