Install
Install with PiG
pig install npm:@diffbot/piInstall with Pi
pi install npm:@diffbot/piPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"image": "https://www.diffbot.com/img/home/diffy-surf.gif",
"skills": [
"./skills"
],
"extensions": [
"./extensions"
]
}README
Written by the package's publisher, shown as published in version 0.4.0 (README.md). PiG does not review it.
@diffbot/pi
Pi package that adds Diffbot tools to the coding agent — Knowledge Graph (DQL), Extract, Web Search, Entities, Crawl, Ask, and Ontology.
All runtime calls go through @diffbot/typescript. This package does not use the Python SDK or CLI.
Install
# from npm
pi install npm:@diffbot/pi
# from git
pi install git:github.com/diffbot/diffbot-pi
# from a local checkout
pi install .
Try without installing:
pi -e .
If you also have diffbot-skills discoverable in Pi, disable those skills (or remove them from settings). Skill names collide on purpose; package skills have lower precedence than user/auto skills, so the Python-oriented ones would win otherwise.
Auth
Token resolution (via resolveToken from @diffbot/typescript/node):
DIFFBOT_API_TOKENenvironment variableDIFFBOT_API_TOKEN=...in~/.diffbot/credentials
Check status in Pi with /diffbot.
Tools
| Tool | Purpose |
|---|---|
diffbot_dql | Query / export KG with DQL (filter, format, exportspec) |
diffbot_dql_probe | Parallel hit counts for query variants |
diffbot_ontology | Browse / refresh KG ontology |
diffbot_extract | Extract structured content from a URL |
diffbot_web_search | Search Diffbot's web index (maxTokens) |
diffbot_entities | Named entities + sentiment (format: dql helper) |
diffbot_ask | Diffbot LLM ask / short chat |
diffbot_crawl | Start a Crawlbot job (optional watch) |
diffbot_crawl_jobs | List or inspect crawler jobs |
diffbot_crawl_delete | Delete a crawler job |
Skills
Workflow guidance for those tools (parity with diffbot-skills, but invoking TS-backed Pi tools). Invoke with /skill:name:
| Skill | Command |
|---|---|
| DQL / Knowledge Graph | /skill:diffbot-dql |
| Organizations (companies) | /skill:diffbot-organizations |
| People | /skill:diffbot-people |
| Places (geography) | /skill:diffbot-places |
| Deals (funding / M&A) | /skill:diffbot-deals |
| News & articles | /skill:diffbot-news |
| Extract | /skill:diffbot-extract |
| Web Search | /skill:diffbot-web-search |
| Entities (NLP) | /skill:diffbot-entities |
| Crawl | /skill:diffbot-crawl |
| Ask | /skill:diffbot-ask |
Develop
git clone https://github.com/diffbot/diffbot-pi.git
cd diffbot-pi
npm install
npm run typecheck
# load from this directory
pi -e .
# or install into user settings
pi install .
0.4.0 depends on @diffbot/typescript ^0.6.0. DQL goes through the SDK dql() helper, which posts a JSON body; the token stays a query parameter. package-lock.json still records the published 0.3.0 tarball — run npm update @diffbot/typescript once 0.6.0 is on npm. A missing crawl job from crawlGetJob() is undefined.
Release
Publishing uses npm trusted publishing from .github/workflows/release.yml (no npm token).
- Bump
versioninpackage.json(and updatepackage-lock.json) on a branch. - Merge to
main. - Tag the merge commit and push the tag:
git tag vX.Y.Z && git push origin vX.Y.Z.
The workflow checks the tag matches package.json, runs npm ci and npm run typecheck, then runs npm publish --access public --provenance and creates the GitHub Release with generated notes. Running the workflow manually (workflow_dispatch) only does the checks and npm publish --dry-run.
One-time npm setup (package settings → Trusted publisher): org diffbot, repo diffbot-pi, workflow release.yml, no environment.
Package layout
Follows the Pi package conventions:
diffbot-pi/
├── extensions/ # TypeScript extensions (tools + /diffbot)
├── skills/ # Agent Skills (SKILL.md workflows)
├── package.json # pi manifest + pi-package keyword
└── README.md
License
MIT