# Grounding and sources

> Why an AgentBag answer can name the page it came from — and what "published" means.

HTML version: https://agentbag.ai/docs/grounding-and-sources — updated 2026-10-05.

Every agent answer is assembled from the owner’s published leaves — the documents, uploads, and crawled pages the owner chose to ship. The agent quotes those leaves and cites them; it does not free-associate from the open internet.

## The lifecycle of a leaf

- Draft — exists in the catalog, editable, invisible to visitors.
- Indexed — embedded and searchable inside the workspace.
- Published — part of the agent’s ground truth; can appear in answers.

Editing a published leaf takes it back out of the grounding set until it is published again. An agent that "forgot" something is usually holding an edited leaf that was never republished.

> Per-leaf audience policy decides WHO may receive a leaf’s content: public, signed-in, or owner-approved. Grounding decides what exists to answer from; audience decides who may hear it.

