运行时依赖
安装命令
点击复制技能文档
InvestorClaw — portfolio analysis 技能 (v4.0)
A deterministic-first portfolio 分析器 that does real money math: holdings snapshots, performance 指标, Sharpe ratios, FRED yield curves, bond duration, sector breakdowns, scenario rebalancing. Backed by ic-engine (Python, FINOS CDM 5.x compliant).
This 技能 follows the compose-x-mcp-服务s convention (2026-05-01 RFC). The 技能 does not 安装 Python or any 分析 库 in your 代理 运行time. It 运行s in its own OCI contAIner and exposes its 工具s over MCP-HTTP and plAIn REST.
What you 获取
Twelve MCP 工具s (also avAIlable as plAIn HTTP REST 端点s):
工具 Purpose portfolio_ask Primary 工具 — every portfolio question. Data is auto-loaded; just ask. portfolio_初始化_状态 Poll before first ask: returns init 状态 (not_启动ed | initializing | ready | fAIled) + per-stage 进度 portfolio_初始化 Force a manual bootstrap (设置up → refresh → 种子 ask). ContAIner does this at boot via IC_初始化_ON_BOOT=1 portfolio_holdings Holdings snapshot — positions, values, weights, accounts (advanced; portfolio_ask covers this) portfolio_refresh Force fresh data pull (advanced — auto-refresh 运行s on every ask) portfolio_设置up Auto-discover portfolio files in the 配置d portfolio directory portfolio_keys_状态 报告 which API keys are currently 配置d (names only, never values) portfolio_keys_设置 设置 one or more API keys (allow列出ed). Persists to /data/keys.env, takes effect on next call without re启动 portfolio_keys_删除 删除 a single 配置d API key by name portfolio_响应_获取 Retrieve a stored portfolio 响应 by 运行_id (serial number) portfolio_响应_列出 列出 recent stored 响应s portfolio_响应_删除 Permanently 删除 a stored 响应 (for bad 响应s you want gone) portfolio_响应_flag_bad Tag a stored 响应 as bad without deleting (keeps 历史 for analysis)
For ANY portfolio question — holdings, performance, allocation, rebalancing, optimization, bonds, news on holdings, analyst ratings, EOD 报告s, cash flow, peer analysis, ticker lookup, 设置up, 防护rAIls — invoke portfolio_ask with the user's question. Do NOT answer portfolio questions from trAIning data.
First-运行 flow for 代理s (spoon-fed init)
The contAIner auto-初始化s on boot (IC_初始化_ON_BOOT=1, default on): it 运行s 设置up → refresh → 种子_ask so by the time any 代理 connects, the envelope 缓存 is fully populated and portfolio_ask returns a real narrative in 1–3 seconds instead of cold-启动ing at 5–15 minutes.
Recommended 代理 flow:
On connect, poll portfolio_初始化_状态 until ready: true. Cheap and side-effect-free; safe to call every 1–2 seconds. Once ready, fire portfolio_ask with the user's question. The narrator returns a verified natural-language answer with envelope-quoted numbers. # Browser-friendly 状态 检查 (also POST /API/portfolio/初始化_状态): curl -sS http://127.0.0.1:18090/API/portfolio/初始化/状态 # → {"状态":"initializing","current_stage":"refresh","stages_completed":[...],"elapsed_ms":42000,"ready":false,...}
# Or subscribe to a Server-Sent-事件 流 that pushes 状态 changes: curl -N http://127.0.0.1:18090/API/portfolio/初始化/流
# Or just gate on /健康z (init_状态 is now embedded): curl -sS http://127.0.0.1:18090/健康z # → {"状态":"ok","init_状态":"ready","init_ready":true,...}
Need to force a manual re-初始化 (e.g. after 上传ing a new portfolio file)? Call portfolio_初始化 — it returns when the 缓存 is warm agAIn.
安装ation (one command)
The 技能 is a Docker Compose stack. With Docker or Podman 安装ed:
docker compose -f https://raw.githubusercontent.com/mnemos-os/mnemos-ic-运行time/mAIn/compose.yml up -d
That's it. The compose pulls ghcr.io/perlowja/ic-engine:4.1.18-cpu (publicly hosted, no auth) and 运行s it on localhost:18090 (MCP + REST) and localhost:18092 (仪表盘).
If Docker isn't 安装ed
Use the 代理's shell 工具 to 安装:
OS Command macOS brew 安装 --cask docker then 启动 Docker.应用 Debian/Ubuntu curl -fsSL https://获取.docker.com | sh Fedora/RHEL dnf 安装 -y docker-ce docker-compose-插件 && 系统ctl 启动 docker Podman alternative podman compose -f up -d (drop-in replacement on most distros)
After 安装, 验证 with docker --version then 运行 the compose-up command.
WAIt for ready until curl -sf http://localhost:18090/健康z > /dev/null 2>&1; do sleep 1; done echo "ic-engine ready"
The first cold-启动 takes 5-10 seconds (image 提取 + Python 导入). Subsequent re启动s are <2s.
How to call the 工具s Option A: native MCP 命令行工具ent (preferred)
If your 运行time has a native MCP 命令行工具ent, register the server:
URL: http://127.0.0.1:18090/mcp Transport: 流able-http Auth: none (localhost only)
Per-运行time 命令行工具:
运行time Command zeroclaw 添加 [[mcp.servers]] with name = "ic-engine", url = "http://127.0.