---
title: Campaigns & Workspace Organization
description: >-
  Organize drug discovery projects with campaigns that group related chats,
  jobs, and results.
tags:
  - campaigns
  - workspace
  - organization
  - projects
---

  beginner

The ivybloom CLI is the scriptable surface for the platform, and campaigns are how you group related chats, jobs, and results into logical workstreams within a project. Reach for campaigns when a script generates work that belongs together — a hit-to-lead effort, a screening campaign, or a target validation run — and you want it organized rather than scattered. They keep large, long-running pipelines navigable; for the full command surface, see the [CLI overview](/docs/cli).

## Campaigns & Workspace Organization _(since v0.8.10)_
Organize drug discovery projects with campaigns that group related chats, jobs, and results.

---

## Overview

Campaigns are organizational units within projects. They group related chats and jobs into logical workstreams — such as a hit-to-lead campaign, a screening campaign, or a target validation effort.

```
Project
├── Campaign: "EGFR Lead Optimization"
│   ├── Chat: "Docking analysis"
│   ├── Chat: "ADMET screening"
│   └── Jobs: [dock_001, admet_002, ...]
└── Campaign: "BRCA1 Target Validation"
    ├── Chat: "Structure prediction"
    └── Jobs: [fold_003, prep_004, ...]
```

---

## Campaign Commands

### List Campaigns

```bash
ivybloom campaigns list
```

### View Campaign Details

```bash
ivybloom campaigns info CAMPAIGN_ID
```

### Create a Campaign

```bash
ivybloom campaigns create "EGFR Lead Optimization" --description "Hit-to-lead campaign for EGFR inhibitors"
```

### Delete a Campaign

```bash
ivybloom campaigns delete CAMPAIGN_ID
```

> Deleting a campaign removes all associated chats. Jobs are preserved but unlinked.

---

## Scoping Operations with `-c`

Use the `-c` flag to scope CLI operations to a specific campaign:

```bash
# Start a chat within a campaign
ivybloom -c CAMPAIGN_ID

# List chats in a campaign
ivybloom chats list --campaign CAMPAIGN_ID

# Submit a job within a campaign context
ivybloom -c CAMPAIGN_ID -m "Fold EGFR and find binding sites"
```

---

## Campaign Chats

### List Chats in a Campaign

```bash
ivybloom chats list --campaign CAMPAIGN_ID
```

### Create a Chat in a Campaign

```bash
ivybloom chats new --campaign CAMPAIGN_ID
```

### View Chat History

```bash
ivybloom chats history CHAT_ID --limit 50
```

### Export a Chat

```bash
ivybloom chats export CHAT_ID --format markdown
ivybloom chats export CHAT_ID --format json
```

---

## MCP Operations

> Commands marked with **MCP** are available via `ivybloom mcp serve` for AI agent integration. They do not have dedicated CLI subcommands.

Additional campaign operations available via MCP:

| Operation | MCP Tool | Description |
|-----------|----------|-------------|
| Archive | `campaigns_update` | Mark campaign as inactive |
| Duplicate | `campaigns_create` | Clone a campaign structure |

---

## Workflow Examples

### Hit-to-Lead Campaign

#### Create the campaign

```bash
ivybloom campaigns create "EGFR Hit-to-Lead" --description "Optimize hits from primary screen"
```

#### Import screening hits

```bash
ivybloom compounds create "EGFR Hits" --project PROJECT_ID
ivybloom compounds import COLL_ID hits.csv
```

#### Run batch ADMET on hits

```bash
ivybloom batch submit admet-screen.yaml
```

#### Analyze results in a campaign chat

```bash
ivybloom -c CAMPAIGN_ID -m "Summarize the ADMET results and identify the top 10 drug-like compounds"
```

### Screening Campaign

#### Set up the campaign

```bash
ivybloom campaigns create "Library Screen" --description "Virtual screen of vendor library"
```

#### Import compound library

```bash
ivybloom compounds create "Vendor Library" --project PROJECT_ID
ivybloom compounds import COLL_ID vendor-library.sdf --skip-duplicates
```

#### Prepare target protein

```bash
ivybloom proteinprep run target.pdb --detect-sites --wait
```

#### Batch dock library

```bash
ivybloom batch submit docking-screen.yaml --wait
ivybloom batch collect BATCH_ID --format csv --output docking-results.csv
```

---

## Read next

- [Sessions & Checkpoints](/docs/cli/sessions) — Chat session management
- [Batch Processing](/docs/cli/batch) — Parallel screening workflows
- [Compounds](/docs/cli/compounds) — Molecular collection management
- [Commands Reference](/docs/cli/commands) — Full command documentation
