SDK 装进你的 SI Agent · MCP 在 IDE 里说人话 · CLI 敲命令做批处理SDK inside your SI Agent · MCP in your IDE · CLI for batch jobs
你已经有 SI Agent 代码库,想把建材合规知识与买家搜索直接接进流程函数里。 装包、传 key、调函数,没有额外服务。You already have an SI Agent codebase and want to call the building-compliance knowledge and buyer search directly from your own functions. Install, pass a key, call the function — no extra service to run.
你在 Claude Code / Cursor 里指挥 Agent,不想写代码。 配一个 server 配置,Agent 就能自己查法规、搜买家。You drive an agent in Claude Code or Cursor and do not want to write code. Add one server config and the agent can look up regulations and search buyers on its own.
你做批量排查、跑定时任务、或者想在 SSH 上直接查。 管道友好,JSON 输出。You run batch checks, scheduled jobs, or just want to query over SSH. Pipe-friendly with JSON output.
| 方法Method | 路径Path | 用途Purpose |
|---|---|---|
| GET | /building/api/stats |
平台运行统计(段数 / 客户站数 / 画像数 / 法规数 / 市场数)Platform runtime statistics (segments / customer sites / profiles / regulations / markets) |
| GET | /building/api/health | 服务健康检查Service health check |
| GET | /building/api/chat/kb | 列出 DiggerChat 全部知识段List all DiggerChat knowledge segments |
| GET | /building/api/chat/health | 知识库段数与拒答规则数Knowledge segment and refusal rule counts |
| POST | /building/api/chat | 建材合规问答Building-compliance Q&A |
| GET | /building/api/customer-types | 7 类客户画像清单List of the 7 customer profiles |
| POST | /building/api/detect-type | 按 brief 判定客户类型Detect the customer type from a brief |
| POST | /building/api/brief/validate | 校验蒸馏输入完整度Validate distillation input completeness |
| GET | /building/api/distill/schema | 蒸馏输入契约Distillation input contract |
| POST | /building/api/distill | 同步蒸馏,返回 3 件产物Synchronous distillation, returns 3 deliverables |
| POST | /building/api/distill/start | 异步蒸馏,返回 job_idAsynchronous distillation, returns a job_id |
| GET | /building/api/distill/status/{job_id} | 异步任务进度Async job progress |
| GET | /building/api/distill/result/{job_id} | 异步任务结果Async job result |
/building/api/site/*
(manifest / modules / update / diagnose / credential/recompute / rebuild),
用于按模块增量更新客户站,不重建整页。💡 The customer-site backend lives under its own prefix /building/api/site/*
(manifest / modules / update / diagnose / credential/recompute / rebuild)
and updates customer sites module by module without rebuilding the page.
?cb=<毫秒> 防缓存Copy and run · add ?cb=<ms> to bypass cachecurl "https://golddigger.gold/building/api/stats"
返回 JSON,数字由平台实际文件与数据库统计得出。Returns JSON; the numbers are counted from the platform's actual files and database.
curl -X POST "https://golddigger.gold/building/api/chat" \
-H "Content-Type: application/json" \
-d '{"message":"What certification does steel structure export need?"}'
回答只来自知识库检索,无检索不回答;高风险问题(代办认证、改分、编造数据)直接拒答。Answers come only from knowledge-base retrieval; no retrieval means no answer. High-risk questions (certification brokering, score editing, fabricated data) are refused outright.
curl -X POST "https://golddigger.gold/building/api/distill" \
-H "Content-Type: application/json" \
-d '{
"company_name": "Example Building Materials Co.",
"customer_type": "Steel structure manufacturer",
"main_products": "Portal frames, steel trusses",
"capacity": "50,000 t/yr",
"export_markets": "Saudi Arabia, Brazil",
"certifications": "ISO 9001, EN 1090-1",
"contact": "sales@example.invalid"
}'
返回客户画像 + 物料底账 + 合规凭证 + 智能网站地址。Returns the customer profile, material ledger, compliance credential and smart website URL.
{
"mcpServers": {
"golddigger-building": {
"command": "npx",
"args": ["-y", "@golddigger/diggerkit-mcp"],
"env": {
"GOLDETRUSPHY_API_KEY": "$GOLDETRUSPHY_API_KEY"
}
}
}
}| 档位Tier | 配额Quota | 适合Suits |
|---|---|---|
| Starter | 先试试水Try it out | |
| Pro | 稳定跑量的中小工厂Steady-volume small and mid-size factories | |
| Premium | 多产线 / 多市场Multiple lines / multiple markets | |
| Whitelabel | 无限Unlimited | 平台化对外服务Platform resale |
429。配额按自然日计算,按 API Key 维度限流。💡 Exceeding the quota returns 429. Quotas are counted per calendar day and rate limited per API key.
请求头带 Authorization: Bearer <你的 key>。
key 在工厂后台自取,平台不代管。Send Authorization: Bearer <your key>.
You obtain the key yourself from the factory console; the platform does not hold it.
统一 JSON。ok 表示成功,
error 字段带可读原因。Always JSON. ok signals success;
the error field carries a readable reason.
纯查询接口无副作用,可安全重试。 写入类接口带幂等键,重复提交返回同一 job。Read-only endpoints have no side effects and are safe to retry. Write endpoints take an idempotency key and return the same job on repeat submission.
400 参数缺 · 401 key 无效 ·
404 资源不存在 · 429 超配额 ·
409 状态冲突 · 500 内部错误。400 missing parameter · 401 invalid key ·
404 not found · 429 quota exceeded ·
409 state conflict · 500 internal error.
接口不做认证代办、不生成认证编号、不编造碳足迹数值、 不保证通过任何认证。The API does not broker certifications, does not generate certificate numbers, does not fabricate carbon footprint values, and does not guarantee any certification outcome.
接口不接收也不存储买家数据。 挖客在你的 Agent 侧完成。The API neither receives nor stores buyer data. Buyer development happens on your agent side.