Skip to content

matsen/bipartite

Repository files navigation

bipartite

Agentic hacking like a PI.

For motivation and a walkthrough of the workflow, see the blog post: Bipartite: manuscript-driven development with a team of agents.

Computational PIs have always worked at a high level: directing teams of researchers, framing problems, choosing which experiments are worth running, and weaving the results into papers. Bipartite is a platform for bringing that workflow into the agentic age — a bip CLI and a library of Claude Code skills that coordinate teams of agents across GitHub issues, code repositories, manuscripts, and the literature.

The workflow runs as two coupled loops, ideas and experiments, with GitHub as the shared transport layer. On the ideas side, manuscript sessions surface new results, situate them in the literature, and turn them into well-scoped issues. On the experiments side, those issues are picked up by autonomous workers in dedicated clones, implemented, reviewed, and landed — surfacing fresh results back for discussion. Two human touchpoints anchor the otherwise-autonomous flow: high-level discussion of new findings on the ideas side, and pre-merge review on the experiments side.

What Bipartite Does

Ideas Coordination

For a PI, the paper is the unit that ties a team's work together. Manuscript sessions (/bip-ms) operate at that level: they track EPIC issues across code repositories and react when new results arrive. High-level discussion of findings, grounded in the literature via /bip-lit, becomes new issues, which are validated against project conventions before being filed.

Key skills: /bip-ms, /bip-ms-poll, /bip-lit, /bip-issue-file, /bip-issue-check, /bip-issue-next

Agent Orchestration (the experiments side, EPIC workflow)

The experiments side is the EPIC orchestration system — a conductor/worker pattern for managing multiple Claude Code sessions across clones and worktrees. A conductor session stays on main, scans GitHub for open issues, and spawns workers in dedicated tmux windows. Workers implement, test, and create PRs autonomously. Two subagents keep the loop honest: an issue-lead evaluates progress from file-based state and escalates only when human judgment is needed, and a surprising-conclusion-skeptic interrogates strong or negative claims before they propagate. Quality gates and PR landing close the loop, with follow-up issues flowing back to the ideas side.

Key skills: /bip-epic, /bip-epic-spawn, /bip-epic-poll, /bip-epic-handoff, /bip-pr-review, /bip-pr-land

Workflow Coordination

Cross-cutting tools that span both sides of the workflow: themed narrative digests, cross-repo check-ins that spawn dedicated tmux windows for review, Slack integration, and server resource scouting via SSH.

Key skills: /bip-checkin, /bip-digest, /bip-narrative, /bip-spawn, /bip-scout

Reference Management

The library backing /bip-lit is an agent-first reference manager with JSON output, a CLI interface, git-backed JSONL storage, and search via Semantic Scholar and Asta. Because the storage format is JSONL, your library is mergeable across collaborators using standard git workflows.

Guide: Reference Management

Installation

Full Installation (recommended)

This installs the bip CLI plus Claude Code agents and skills:

git clone https://github.com/matsen/bipartite
cd bipartite
make install

Prerequisites:

Verify with bip --help.

CLI Only

If you just want the bip CLI without agents/skills:

go install github.com/matsen/bipartite/cmd/bip@latest

Note: This installs to $GOBIN if set, otherwise $HOME/go/bin. Ensure the appropriate directory is in your PATH.

Quick Start

  1. Create your private nexus — the repository that stores your paper library, workflow config, and project context. Click "Use this template" on nexus-template, then clone:
git clone https://github.com/YOUR_USERNAME/nexus ~/re/nexus
  1. Point bip to your nexus (minimal config to get started):
mkdir -p ~/.config/bip
echo 'nexus_path: ~/re/nexus' > ~/.config/bip/config.yml
  1. Build the index and try it out:
bip rebuild
bip search "phylogenetics" --human
bip s2 add DOI:10.1038/s41586-021-03819-2

See the Getting Started guide for full setup instructions.

Configuration

For full functionality, add API keys (Semantic Scholar, Asta, GitHub, Slack) to your config:

nexus_path: ~/re/nexus
s2_api_key: your-key
asta_api_key: your-key
github_token: ghp_...
slack_bot_token: xoxb-...

Tokens may also be supplied via environment variables, which take precedence over the config file — useful for secrets managers (e.g. op run from 1Password):

Token Env vars consulted (in order)
GitHub BIP_GITHUB_TOKEN, GITHUB_TOKEN, GH_TOKEN
Slack BIP_SLACK_TOKEN, SLACK_BOT_TOKEN

The BIP_-prefixed names are recommended when a globally-exported GITHUB_TOKEN (e.g. for the gh CLI) might have different scopes than what you want bip to use.

See the Configuration Guide for all options.

To opt into per-issue git worktrees for bip spawn (instead of one shared clone per repo), see docs/guides/layout.md.

Who Is This For?

Bipartite isn't just for people who hold the official PI title. It's for anyone who wants to work with a team of agents the way a PI works with a team of researchers — directing the science at a high level while detailed work runs across many parallel sessions.

License

MIT

About

Connecting research programs and the outside world

Resources

License

Stars

26 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages