# Bindings Guide

A **Binding** is a knowledge container — the core unit of Bindly.

## What is a Binding?

A Binding holds a piece of knowledge: an article, a note, a conversation extract, or any text content. Each Binding belongs to a Space and has:

- **Name**: A human-readable title
- **Slug**: URL-friendly identifier (default UUID, optionally user-specified)
- **Source Type**: `text`, `url`, `file`, or `conversation`
- **Content**: Markdown text stored in R2

## Versions (Immutability)

**Bindly never modifies existing content.** When you update a Binding, a new **Version** is created:

```
Binding: "Kubernetes Guide"
├── Version 1 (created March 1) — original content
├── Version 2 (created March 5) — added deployment section
└── Version 3 (created March 20) — updated for v1.30 ← current
```

Each Version is immutable — once created, it cannot be changed. This preserves the complete history of your knowledge.

## Version Metadata

Each Version includes metadata stored alongside the content:

| Field | Description |
|-------|-------------|
| **summary** | 2-3 sentence summary |
| **keyPoints** | Up to 10 key points |
| **entities** | Extracted named entities (up to 20) |
| **contentTokenCount** | LLM token count for budget planning |
| **source** | `human` (created via web) or `llm` (created via MCP) |

## Tiered Content Delivery

When retrieving a Binding, choose the detail level:

| Tier | Content | ~Tokens | Use Case |
|------|---------|---------|----------|
| **1** | Summary, key points, entities | ~300 | Browsing, search results |
| **1.5** | Above + first 400 chars preview | ~800 | Deciding if you need full content |
| **2** | Full content + version history | ~2000+ | Reading, editing, deep analysis |

## Creating a Binding

### Via Web
Fill in: title, summary, content (markdown), and optional key points.

### Via MCP
```
mcp_create_binding({
  spaceId: "your-space-id",
  title: "My Knowledge",
  content: "Full markdown content...",
  summary: "A brief summary of the knowledge.",
  keyPoints: ["Point 1", "Point 2"],
  sourceType: "text"
})
```

## Public Bindings

Bindings in public team or official Spaces are accessible at:
- HTML: `bind.ly/@space/binding`
- Markdown: `bind.ly/@space/binding?format=md`
