{"_id":"@companionai/bohr","_rev":"2-8ed9ac5d64fb4f9c2b94b0a5e0d2895e","name":"@companionai/bohr","dist-tags":{"latest":"0.2.19"},"versions":{"0.2.18":{"name":"@companionai/bohr","version":"0.2.18","keywords":["pi-package","research-agent","literature-review","experiments"],"license":"UNLICENSED","_id":"@companionai/bohr@0.2.18","maintainers":[{"name":"dhruvil76001","email":"dhruvil7694@gmail.com"}],"homepage":"https://github.com/Dhruvil7694/BohrAI#readme","bugs":{"url":"https://github.com/Dhruvil7694/BohrAI/issues"},"pi":{"skills":["./skills"],"prompts":["./prompts"],"extensions":["./extensions"]},"bin":{"bohr":"bin/bohr.js"},"dist":{"shasum":"b38f5b4ffd64c9b3eabc58ce3a71f534fcc30684","tarball":"https://registry.npmjs.org/@companionai/bohr/-/bohr-0.2.18.tgz","fileCount":30443,"integrity":"sha512-uLqDgPr5CIYiA+PnT1UvJ/kby4aCbyb3dm1CvZ3liiowy+47l7qr3FmRxQrC/jGC03g6jhzq2TR/wBIHsTmWcQ==","signatures":[{"sig":"MEUCIQC//CjaAlQ9HcicsuPcvrXRTAZdOFGGA06/S5USxqZbkAIgKaBr3UYBqAQcAJmM82NUBEYk3J5sIL+rr+Lyy22oa0c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":419216015},"type":"module","engines":{"node":">=20.19.0"},"gitHead":"87fbffe9dd6b43e6d954d7ee6fa64b08aff3a6ef","scripts":{"dev":"tsx src/index.ts","test":"node --import tsx --test --test-concurrency=1 tests/*.test.ts","build":"tsc -p tsconfig.build.json","start":"tsx src/index.ts","prepack":"node ./scripts/clean-publish-artifacts.mjs && npm run build && node ./scripts/prepare-runtime-workspace.mjs","typecheck":"tsc --noEmit","preinstall":"node ./scripts/check-node-version.mjs","start:dist":"node ./bin/bohr.js","test:paper":"tsx scripts/test-paper-generator.ts","test:search":"tsx -e \"import {searchAllSources} from './src/paper-generator/search-tools.js'; searchAllSources('transformer',5).then(r=>console.log('Found',r.length,'papers'))\"","install:paper-gen":"bash scripts/install-paper-generator.sh","build:native-bundle":"node ./scripts/build-native-bundle.mjs"},"_npmUser":{"name":"dhruvil76001","email":"dhruvil7694@gmail.com"},"overrides":{"express":{"router":{"path-to-regexp":"8.4.2"}},"basic-ftp":"5.2.1","minimatch":{"brace-expansion":"5.0.5"},"proxy-agent":{"pac-proxy-agent":{"get-uri":{"basic-ftp":"5.2.1"}}},"@modelcontextprotocol/sdk":{"hono":"4.12.12","@hono/node-server":"1.19.13"}},"repository":{"url":"git+https://github.com/Dhruvil7694/BohrAI.git","type":"git"},"_npmVersion":"10.9.3","description":"Research-first CLI agent built on Pi and alphaXiv","directories":{},"_nodeVersion":"22.19.0","dependencies":{"dotenv":"^17.3.1","xml2js":"^0.6.2","@sinclair/typebox":"^0.34.48","@mariozechner/pi-ai":"^0.66.1","@companion-ai/alpha-hub":"^0.1.3","@mariozechner/pi-coding-agent":"^0.66.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.9.3","@types/node":"^25.5.0","@types/xml2js":"^0.4.14"},"_npmOperationalInternal":{"tmp":"tmp/bohr_0.2.18_1777190645844_0.7279789110725141","host":"s3://npm-registry-packages-npm-production"}},"0.2.19":{"name":"@companionai/bohr","version":"0.2.19","description":"Research-first CLI agent built on Pi and alphaXiv","license":"UNLICENSED","type":"module","engines":{"node":">=20.19.0"},"bin":{"bohr":"bin/bohr.js"},"scripts":{"preinstall":"node ./scripts/check-node-version.mjs","build":"tsc -p tsconfig.build.json","build:native-bundle":"node ./scripts/build-native-bundle.mjs","dev":"tsx src/index.ts","prepack":"node ./scripts/clean-publish-artifacts.mjs && npm run build && node ./scripts/prepare-runtime-workspace.mjs","start":"tsx src/index.ts","start:dist":"node ./bin/bohr.js","test":"node --import tsx --test --test-concurrency=1 tests/*.test.ts","test:paper":"tsx scripts/test-paper-generator.ts","test:search":"tsx -e \"import {searchAllSources} from './src/paper-generator/search-tools.js'; searchAllSources('transformer',5).then(r=>console.log('Found',r.length,'papers'))\"","install:paper-gen":"bash scripts/install-paper-generator.sh","typecheck":"tsc --noEmit"},"keywords":["pi-package","research-agent","literature-review","experiments"],"pi":{"extensions":["./extensions"],"prompts":["./prompts"],"skills":["./skills"]},"dependencies":{"@companion-ai/alpha-hub":"^0.1.3","@mariozechner/pi-ai":"^0.66.1","@mariozechner/pi-coding-agent":"^0.66.1","@sinclair/typebox":"^0.34.48","dotenv":"^17.3.1","xml2js":"^0.6.2"},"overrides":{"basic-ftp":"5.2.1","@modelcontextprotocol/sdk":{"@hono/node-server":"1.19.13","hono":"4.12.12"},"express":{"router":{"path-to-regexp":"8.4.2"}},"proxy-agent":{"pac-proxy-agent":{"get-uri":{"basic-ftp":"5.2.1"}}},"minimatch":{"brace-expansion":"5.0.5"}},"devDependencies":{"@types/node":"^25.5.0","@types/xml2js":"^0.4.14","tsx":"^4.21.0","typescript":"^5.9.3"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Dhruvil7694/BohrAI.git"},"homepage":"https://github.com/Dhruvil7694/BohrAI#readme","bugs":{"url":"https://github.com/Dhruvil7694/BohrAI/issues"},"_id":"@companionai/bohr@0.2.19","gitHead":"87fbffe9dd6b43e6d954d7ee6fa64b08aff3a6ef","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-ngakUZN13O3CaT5wpCxmPOXSjJeH+X0Y8KdwTnFOeuopMK8GtW0zCAePjOnX656D72/Mn0OnbFwdfcGfMiRG1w==","shasum":"ec41d80f05599d42037137230aeda900cbf74d2b","tarball":"https://registry.npmjs.org/@companionai/bohr/-/bohr-0.2.19.tgz","fileCount":149,"unpackedSize":480010,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH7cOWPtE+q1YFS7TFzZYBUGQNycSxXr8g5JSLa9jYOMAiBl4Gs1NWKcFke38+OCTLi1ZC/Cxg26bg8QSJglNTEdLg=="}]},"_npmUser":{"name":"dhruvil76001","email":"dhruvil7694@gmail.com"},"directories":{},"maintainers":[{"name":"dhruvil76001","email":"dhruvil7694@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bohr_0.2.19_1777191269287_0.4130922222680533"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T08:04:05.745Z","modified":"2026-04-26T08:14:29.583Z","0.2.18":"2026-04-26T08:04:09.112Z","0.2.19":"2026-04-26T08:14:29.474Z"},"bugs":{"url":"https://github.com/Dhruvil7694/BohrAI/issues"},"license":"UNLICENSED","homepage":"https://github.com/Dhruvil7694/BohrAI#readme","keywords":["pi-package","research-agent","literature-review","experiments"],"repository":{"type":"git","url":"git+https://github.com/Dhruvil7694/BohrAI.git"},"description":"Research-first CLI agent built on Pi and alphaXiv","maintainers":[{"name":"dhruvil76001","email":"dhruvil7694@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://github.com/Dhruvil7694/BohrAI\">\n    <img src=\"assets/hero.png\" alt=\"Bohr terminal — REPL session\" width=\"800\" />\n  </a>\n</p>\n<p align=\"center\">The private AI research system.</p>\n<p align=\"center\">\n  <a href=\"https://github.com/Dhruvil7694/BohrAI/tree/main/website/src/content/docs\"><img alt=\"Docs\" src=\"https://img.shields.io/badge/docs-repo-000000?style=flat-square\" /></a>\n</p>\n\r\n---\r\n\r\n### Installation\n\nBohr ships prebuilt standalone bundles for supported macOS, Linux, and Windows machines. You do not need to deploy a running app before changing these commands; you only need the installer scripts and release assets published at reachable URLs.\n\n**macOS / Linux:**\n\r\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install | bash\n```\n\r\n**Windows (PowerShell):**\r\n\r\n```powershell\nirm https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install.ps1 | iex\n```\n\nThe one-line installer fetches the latest tagged release. To pin a version, pass it explicitly, for example `curl -fsSL https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install | bash -s -- 0.2.18`.\n\r\nThe installer downloads a standalone native bundle with its own Node.js runtime.\n\nTo upgrade the standalone app later, rerun the installer. `bohr update` only refreshes installed Pi packages inside Bohr's environment; it does not replace the standalone runtime bundle itself.\n\nFor internal client deployments, do not hardcode the GitHub Raw URLs above. Instead set the deployment variables in `.env.example` such as `PUBLIC_BOHR_SITE_URL`, `PUBLIC_BOHR_INSTALL_BASE_URL`, `BOHR_RELEASES_LATEST_URL`, and `BOHR_INSTALL_BASE_URL`, then publish the same scripts and release bundles on the client's own host. The website homepage already reads those env-based install URLs at build time; the docs page should be published from the same deployment so users copy the correct host-specific command.\n\r\nLocal models are supported through the custom-provider flow. For Ollama, run `bohr setup`, choose `Custom provider (baseUrl + API key)`, use `openai-completions`, and point it at `http://localhost:11434/v1`.\r\n\r\n### Skills Only\r\n\r\nIf you want just the research skills without the full terminal app:\r\n\r\n**macOS / Linux:**\r\n\r\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install-skills | bash\n```\n\r\n**Windows (PowerShell):**\r\n\r\n```powershell\nirm https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install-skills.ps1 | iex\n```\n\r\nThat installs the skill library into `~/.codex/skills/bohr`.\r\n\r\nFor a repo-local install instead:\r\n\r\n**macOS / Linux:**\r\n\r\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install-skills | bash -s -- --repo\n```\n\r\n**Windows (PowerShell):**\r\n\r\n```powershell\n& ([scriptblock]::Create((irm https://raw.githubusercontent.com/Dhruvil7694/BohrAI/main/website/public/install-skills.ps1))) -Scope Repo\n```\n\r\nThat installs into `.agents/skills/bohr` under the current repository.\r\n\r\nThese installers download the bundled `skills/` and `prompts/` trees plus the repo guidance files referenced by those skills. They do not install the Bohr terminal, bundled Node runtime, auth storage, or Pi packages.\r\n\r\n---\r\n\r\n### Token usage & caveman mode\r\n\r\nLong multi-agent runs burn context fast. Bohr mitigates this in several ways:\r\n\r\n- **Bundled caveman skill** (`skills/caveman/caveman.md`) — instructs terse, substance-preserving replies. The skill description targets **roughly 75% fewer tokens** on assistant output versus verbose defaults when the model follows the style; actual savings vary by model and task.\r\n- **Paper-generator / Pi subagent path** — prepends short `[CAVEMAN MODE: lite|full|ultra]` instructions, passes **minimal JSON context** (slug, phase, filenames), and uses **file handoffs** instead of dumping large intermediates into the prompt.\r\n- **Configuration** — optional `CAVEMAN_MODE_DEFAULT` and `ENABLE_TOKEN_OPTIMIZATION` in `.env.example` tune subagent compression when using the CLI (dotenv-loaded). See the repo docs: [Token optimization & caveman mode](https://github.com/Dhruvil7694/BohrAI/blob/main/website/src/content/docs/reference/token-optimization.md).\n- **Cost planning** — illustrative token and dollar scenarios by provider family (OpenAI, Anthropic, Gemini, Grok, DeepSeek, Chinese APIs), tool fees, and self-host FLOPs intuition: [Cost & token estimation](https://github.com/Dhruvil7694/BohrAI/blob/main/website/src/content/docs/reference/cost-token-estimation.md).\n\r\n---\r\n\r\n### What you type → what happens\r\n\r\n```\r\n$ bohr \"what do we know about scaling laws\"\r\n→ Searches papers and web, produces a cited research brief\r\n\r\n$ bohr deepresearch \"mechanistic interpretability\"\r\n→ Multi-agent investigation with parallel researchers, synthesis, verification\r\n\r\n$ bohr lit \"RLHF alternatives\"\r\n→ Literature review with consensus, disagreements, open questions\r\n\r\n$ bohr audit 2401.12345\r\n→ Compares paper claims against the public codebase\r\n\r\n$ bohr replicate \"chain-of-thought improves math\"\r\n→ Replicates experiments on local or cloud GPUs\r\n```\r\n\r\n---\r\n\r\n### Workflows\r\n\r\nAsk naturally or use slash commands as shortcuts.\r\n\r\n| Command | What it does |\r\n| --- | --- |\r\n| `/deepresearch <topic>` | Source-heavy multi-agent investigation |\r\n| `/lit <topic>` | Literature review from paper search and primary sources |\r\n| `/lit-review <topic>` | Full literature pipeline with themes, contradictions, gaps, and validator pass |\n| `/paper <topic-or-artifact>` | Publication-grade paper pipeline with method, figures, and compliance |\n| `/paper-pro <topic-or-artifact>` | Professional paper pipeline with evidence map, adversarial checks, citations, and provenance |\n| `/review <artifact>` | Simulated peer review with severity and revision plan |\n| `/audit <item>` | Paper vs. codebase mismatch audit |\r\n| `/replicate <paper>` | Replicate experiments on local or cloud GPUs |\r\n| `/compare <topic>` | Source comparison matrix |\r\n| `/draft <topic>` | Paper-style draft from research findings |\r\n| `/autoresearch <idea>` | Autonomous experiment loop |\r\n| `/watch <topic>` | Recurring research watch |\r\n| `/hypothesis <topic-or-artifact>` | Ranked, testable hypotheses with explicit falsifiers |\r\n| `/contradict <claim-or-artifact>` | Adversarial contradiction analysis for conclusions |\r\n| `/evidence-score <artifact-or-topic>` | Claim-level evidence strength scoring |\r\n| `/experiment <hypothesis-or-goal>` | Minimal decisive experiment workflow |\r\n| `/citation-check <artifact>` | Sentence-level citation integrity validation |\r\n| `/memory-log <project-or-topic>` | Durable memory consolidation for long-running work |\r\n| `/plan-research <topic-or-goal>` | Planner workflow for agent ordering and stop criteria |\r\n| `/knowledge-graph <artifact-or-topic>` | Build reusable knowledge graph for cross-topic reasoning |\r\n| `/reasoning-validate <artifact>` | Validate logic chain from evidence to conclusions |\r\n| `/iterate <topic-or-artifact>` | Iterative loop controller until confidence/contradiction targets |\r\n| `/outputs` | Browse all research artifacts |\r\n\r\n---\r\n\r\n### Agents\r\n\r\nTen bundled research agents, dispatched automatically.\r\n\r\n- **Researcher** — gather evidence across papers, web, repos, docs\r\n- **Reviewer** — simulated peer review with severity-graded feedback\r\n- **Writer** — structured drafts from research notes\r\n- **Verifier** — inline citations, source URL verification, dead link cleanup\r\n- **Hypothesis** — generate testable hypotheses and ranked falsifiers\r\n- **Contradiction** — find counter-evidence, edge cases, and fragile assumptions\r\n- **Evidence Scorer** — score claim support quality with a transparent rubric\r\n- **Experiment** — design and run minimal experiments to reduce uncertainty\r\n- **Citation Integrity** — validate claim-to-citation alignment at sentence level\r\n- **Memory** — maintain durable project memory across sessions\r\n- **Research Planner** — orchestration brain for agent selection, ordering, and stop rules\r\n- **Knowledge Graph** — convert findings into reusable entities and relations\r\n- **Reasoning Validator** — detect invalid inference chains and logic drift\r\n- **Iteration Controller** — drive multi-loop convergence with explicit thresholds\r\n- **Literature Collector** — collect paper candidates and metadata\r\n- **Literature Quality** — score/filter papers by relevance and recency\r\n- **Literature Synthesizer** — cluster papers into structured themes\r\n- **Literature Contradiction** — detect conflicting claims across papers\r\n- **Literature Gap** — identify missing areas and open problems\r\n- **Literature Review Writer** — write survey-style thematic review\r\n- **Literature Review Validator** — validate completeness, flow, and perspective balance\r\n- **Method Math** — formalize notation, equations, and derivation consistency\r\n- **Figures Tables** — produce publication-ready visuals and captions\r\n- **Paper Compliance** — enforce manuscript structure and submission-style checks\r\n\r\n---\r\n\r\n### Skills & Tools\r\n\r\n- **[AlphaXiv](https://www.alphaxiv.org/)** — paper search, Q&A, code reading, annotations (via `alpha` CLI)\r\n- **Docker** — isolated container execution for safe experiments on your machine\r\n- **Web search** — Gemini or Perplexity, zero-config default\r\n- **Session search** — indexed recall across prior research sessions\r\n- **Preview** — browser and PDF export of generated artifacts\r\n- **Modal** — serverless GPU compute for burst training and inference\r\n- **RunPod** — persistent GPU pods with SSH access for long-running experiments\r\n\r\n---\r\n\r\n### How it works\r\n\r\nBuilt on [Pi](https://github.com/badlogic/pi-mono) for the agent runtime, [alphaXiv](https://www.alphaxiv.org/) for paper search and analysis, and CLI tools for compute and execution. Capabilities are delivered as [Pi skills](https://github.com/badlogic/pi-skills) — Markdown instruction files synced to `~/.bohr/agent/skills/` on startup. Every output is source-grounded — claims link to papers, docs, or repos with direct URLs.\r\n\r\n---\r\n\r\n### Contributing\r\n\r\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full contributor guide.\r\n\r\n```bash\r\ngit clone https://github.com/Dhruvil7694/BohrAI.git\r\ncd BohrAI\r\nnvm use || nvm install\r\nnpm install\r\nnpm test\r\nnpm run typecheck\r\nnpm run build\r\n```\r\n\r\n[Docs](https://github.com/Dhruvil7694/BohrAI/tree/main/website/src/content/docs) · [Proprietary License](LICENSE)\n","readmeFilename":"README.md"}