Repository navigation
API Reference parrot.knowledge.bookstore.library
The Bookstore manager — catalogs + PageIndex trees per scope.
:class:Bookstore composes one :class:~parrot.knowledge.bookstore.catalog.CatalogStore
and one :class:~parrot.knowledge.pageindex.toolkit.PageIndexToolkit
per resolved library location (project first, then global), providing:
- the ingestion surface used by the
bookstoreCLI (:meth:add_book, :meth:remove_book, :meth:refresh_card), and - the read surface wrapped by
:class:
~parrot.knowledge.bookstore.toolkit.BookstoreToolkitfor agents (catalog search → ToC → in-book search → section read).
The whole library works without any LLM configured: ingestion falls back to deterministic carding and searches run BM25-only.
Re-exported from parrot.knowledge.bookstore.models.Anchor.
Re-exported from parrot.knowledge.bookstore.models.Annotation.
Re-exported from parrot.knowledge.bookstore.models.BookCard.
Re-exported from parrot.knowledge.bookstore.models.BookCommunity.
Re-exported from parrot.knowledge.bookstore.models.BookRelation.
Personal indexed library over one or more library locations.
| Parameter | Type | Default | Description |
|---|---|---|---|
locations |
list[LibraryLocation] |
Ordered locations (project scope first) from :func:~parrot.knowledge.bookstore.config.resolve_locations. |
|
adapter |
Optional[Any] |
None |
Optional heavy :class:~parrot.knowledge.pageindex.llm_adapter.PageIndexLLMAdapter. When None the library runs in degraded (no-LLM) mode: BM25-only search and deterministic carding. |
lightweight_model |
Optional[str] |
None |
Optional cheap model id for PageIndex helper calls. Ignored (with a warning) when adapter is None. |
reindex_lock_timeout_s |
float |
5.0 |
Attributes:
| Attribute | Type | Description |
|---|---|---|
has_llm |
bool |
Whether a real LLM adapter is configured. |
Report recovery, structural drift and missing judgements; optionally repair or relate.
A structural comparison only covers the derived table of contents. It cannot prove that a crashed publication did not replace text with different content having an identical table of contents.
doctor(scope: Optional[str] = None, *, repair: bool = False, relate: bool = False, use_llm: bool = True, notes: bool = False) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
scope |
Optional[str] |
None |
|
repair |
bool |
False |
|
relate |
bool |
False |
|
use_llm |
bool |
True |
|
notes |
bool |
False |
Returns: dict[str, Any]
All cards across scopes, project scope winning collisions.
list_books() -> list[BookCard]
Returns: list[BookCard]
Lexical "which book covers X?" search over the fichas.
catalog_search(query: str, top_k: int = 8) -> list[BookCard]
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str |
||
top_k |
int |
8 |
Returns: list[BookCard]
Find a card by id across scopes (project first).
resolve_book(book_id: str) -> tuple[BookCard, LibraryLocation]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Returns: tuple[BookCard, LibraryLocation]
Raises:
-
BookstoreError— When no scope holdsbook_id.
Full ficha for one book.
get_card(book_id: str) -> BookCard
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Returns: BookCard
Structured table of contents with node ids and page ranges.
get_toc(book_id: str) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Returns: dict[str, Any]
Hybrid search inside one book's tree.
The LLM tree-walk runs only when an adapter is configured;
otherwise this is BM25-only (requires the optional bm25s).
search_book(book_id: str, query: str, top_k: int = 8) -> list[dict[str, Any]]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
||
query |
str |
||
top_k |
int |
8 |
Returns: list[dict[str, Any]]
Load one section's markdown body (plus title/pages context).
Falls back to the node summary when the content sidecar is missing.
read_section(book_id: str, node_id: str) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
||
node_id |
str |
Returns: dict[str, Any]
Registered or on-disk <book_id>_notes in the book's scope (lazy kind='notes' upsert).
notebook_for(book_id: str) -> Optional[BookCard]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
The annotated book. |
Returns: Optional[BookCard] — The notebook card (scope stamped), or None when no notebook tree exists.
Registered or on-disk _library_notes of scope.
library_notebook(scope: str) -> Optional[BookCard]
| Parameter | Type | Default | Description |
|---|---|---|---|
scope |
str |
Library scope ("project" or "global"). |
Returns: Optional[BookCard] — The library notebook card, or None when its tree does not exist.
Create the conventional notebook tree when missing and register it.
ensure_notebook(book_id: Optional[str], scope: str = 'project') -> BookCard
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
Optional[str] |
Book to annotate, or None for the scope's library notebook. |
|
scope |
str |
'project' |
Scope of the library notebook; ignored for a book notebook, which always lives in the book's own scope. |
Returns: BookCard — The registered kind='notes' card.
Re-point notebook anchors of book_id after a re-index; never deletes (spec S9).
remap_anchors(book_id: str, *, previous: Optional[dict[str, dict[str, Any]]] = None) -> dict[str, int]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
The re-indexed book. | |
previous |
Optional[dict[str, dict[str, Any]]] |
None |
Snapshot of the pre-re-index tree nodes (_anchor_snapshot). Without it only anchors whose node still exists can be judged; the rest are stale. |
Returns: dict[str, int] — Counts {"current": n, "remapped": n, "stale": n} over the anchors of this book.
Notes anchored to (book_id, node_id); [] when the book has no notebook.
annotations_for(book_id: str, node_id: str) -> list[Annotation]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
The annotated book. | |
node_id |
str |
Node of the book the notes point at. |
Returns: list[Annotation] — The anchored notebook nodes, in tree order.
Which books treat query and where: sectors of every _library_notes first, catalog FTS fallback.
Each scope's library notebook is searched with the PageIndex hybrid search (BM25; the LLM
walk only when an adapter is configured), project scope first. A hit counts only when it
is a sector node (metadata.sector_code) sharing at least one query term with its code,
title, summary or note body; its anchors are resolved through (scope, book_id) against
the catalog (S11) — whole-book anchors name the book, node anchors point at ToC entries.
Book bodies are never read. Without bm25s the sectors are matched by title only and
the hint says so.
find_books(query: str, top_k: int = 5) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str |
Topic or keywords. | |
top_k |
int |
5 |
Maximum sectors (or fallback books) returned. |
Returns: dict[str, Any] — {"source": "sectors", "sectors": [{code, title, books: [{book_id, title, scope, [{node_id, title, start_page, end_page}]}]}]} (plus hint when degraded), or {"source": "catalog_fts", "books": [brief...], "hint": ...}.
Return per-book PageIndex evidence with generation-safe book citation labels.
agentic_retrieve(book_id: str, query: str, top_k: int = 5, draft_answer: bool = True, budget_chars: Optional[int] = None, max_reads: Optional[int] = None, timeout_s: Optional[float] = None) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Stable identifier of the indexed book to research. | |
query |
str |
Research question for the bounded PageIndex reading loop. | |
top_k |
int |
5 |
Number of first-stage candidates to consider. |
draft_answer |
bool |
True |
Whether PageIndex should ask the model for a final answer. |
budget_chars |
Optional[int] |
None |
Optional read-character budget forwarded to PageIndex. |
max_reads |
Optional[int] |
None |
Optional read-operation budget forwarded to PageIndex. |
timeout_s |
Optional[float] |
None |
Optional total request timeout forwarded to PageIndex. |
Returns: dict[str, Any]
Raises:
-
BookstoreError— If the book lacks indexed segments or no compatible LLM is configured. -
ValueError— If PageIndex rejects a numeric argument.
Copy and enrich citations, using ownership only from the matching snapshot.
Public so other packages (the multi-store origin) decorate citations identically.
A current tree is safe to consult only when it is the same generation captured by the PageIndex retrieval. It may otherwise describe a re-indexed document whose node ownership no longer applies to the already validated citation.
decorate_citations(card: BookCard, scope: str, bundle: dict[str, Any]) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
card |
BookCard |
||
scope |
str |
||
bundle |
dict[str, Any] |
Returns: dict[str, Any]
Read a page range of a book ("5-7,12") with citable segment addresses.
read_pages(book_id: str, pages: str, max_chars: int = 12000, cursor: Optional[str] = None) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
||
pages |
str |
||
max_chars |
int |
12000 |
|
cursor |
Optional[str] |
None |
Returns: dict[str, Any]
Read paragraphs of a book by position or a section's own text (node_id).
read_segments(book_id: str, start: Optional[int] = None, end: Optional[int] = None, node_id: Optional[str] = None, max_chars: int = 12000, cursor: Optional[str] = None, *, expected_revision: Optional[str] = None) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Stable identifier of the book to read. | |
start |
Optional[int] |
None |
Optional first segment sequence number. |
end |
Optional[int] |
None |
Optional exclusive final segment sequence number. |
node_id |
Optional[str] |
None |
Optional section node to read instead of a sequence range. |
max_chars |
int |
12000 |
Maximum text budget for the read. |
cursor |
Optional[str] |
None |
Optional continuation cursor from a previous read. |
expected_revision |
Optional[str] |
None |
Optional revision that the returned snapshot must match. |
Returns: dict[str, Any]
Raises:
-
RevisionMismatchError— The returned snapshot or cursor names another revision. -
BookstoreError— The underlying read cannot be completed.
Compact outline of a book or one of its sections.
outline(book_id: str, node_id: Optional[str] = None, max_depth: int = 3) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
||
node_id |
Optional[str] |
None |
|
max_depth |
int |
3 |
Returns: dict[str, Any]
Cross-book research search.
Shortlists books via the catalog (or validates book_ids),
then searches each shortlisted tree — via the scoped LLM
tree-walk when an adapter is configured, else per-book BM25.
search(query: str, book_ids: Optional[list[str]] = None, max_books: int = 3, top_k: int = 5, expand_related: bool = False) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
str |
Natural-language research question. | |
book_ids |
Optional[list[str]] |
None |
Explicit books to search; None = catalog shortlist. |
max_books |
int |
3 |
Cap on books searched (keep small — each book may cost an LLM call). |
top_k |
int |
5 |
Per-book result cap in the BM25 path. |
expand_related |
bool |
False |
When True, widen the shortlist with depth-1 related books (:meth:related_books, no extra LLM call) before applying max_books — the cap still applies afterwards, so this can only narrow which books are searched, never how many. |
Returns: dict[str, Any] — {"query", "books": [{book_id, title, scope, results|context}]}.
Walk the book graph outward from book_id (SQL-only, no LLM).
Backs both the CLI bookstore related command and the
bookstore_related_books MCP tool — synchronous and
side-effect-free by design.
related_books(book_id: str, rel: Optional[str] = None, depth: int = 1, top_k: int = 10, min_confidence: float = 0.0) -> list[dict[str, Any]]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Origin book. | |
rel |
Optional[str] |
None |
Optional relation kind filter. |
depth |
int |
1 |
Hops to walk from book_id — clamped to 1 or 2. |
top_k |
int |
10 |
Maximum results returned. |
min_confidence |
float |
0.0 |
Drop LLM edges below this confidence (deterministic/community edges have no confidence and are never filtered by this). |
Returns: list[dict[str, Any]] — Dicts {book, rel, origin, weight, confidence, rationale, hop, via} — book is the neighbour's :meth:BookCard.brief, via is the hop-1 book that led to a hop-2 result (None for hop-1). Ordered by hop ascending, then weight descending. When several edges reach the same book, the strongest (smallest hop, then largest weight) wins.
Raises:
-
BookstoreError— Whenbook_idis unknown.
Compute and persist relations for book_ids (or every visible book).
Runs Stage 1 (deterministic, always — unless communities_only),
Stage 2 (LLM conceptual relations, when use_llm and self.has_llm and not communities_only), and Stage 3 (communities — a hook
only in this task; see :meth:_relate_stage3, wired by TASK-2917).
relate_books(book_ids: Optional[list[str]] = None, *, use_llm: bool = True, communities: bool = True, communities_only: bool = False, force: bool = False, resolution: float = 1.0) -> RelateSummary
| Parameter | Type | Default | Description |
|---|---|---|---|
book_ids |
Optional[list[str]] |
None |
Explicit target book ids (validated via :meth:resolve_book), or None for every visible book. |
use_llm |
bool |
True |
Whether Stage 2 may run at all (still gated by :attr:has_llm). |
communities |
bool |
True |
Whether Stage 3 runs. |
communities_only |
bool |
False |
Skip Stage 1/2 entirely and only run Stage 3 (used by :meth:add_folder's end-of-batch pass). |
force |
bool |
False |
Re-judge candidate pairs already logged in relation_judgements instead of skipping them. |
resolution |
float |
1.0 |
Forwarded to Stage 3's community detection. |
Returns: RelateSummary — class:RelateSummary describing what ran.
Raises:
-
BookstoreError— An explicitbook_idsentry is unknown.
All communities from the merged graph (read-only, SQL-only).
communities() -> list[BookCommunity]
Returns: list[BookCommunity]
One community by id.
get_community(community_id: str) -> BookCommunity
| Parameter | Type | Default | Description |
|---|---|---|---|
community_id |
str |
Returns: BookCommunity
Raises:
-
BookstoreError— Whencommunity_idis unknown.
Project the book graph into a dedicated wikitoolkit plane.
Lazily imports parrot.knowledge.wiki/graphindex.export_html
(via .wiki_export) — the MCP read path never touches this
method, so parrot.knowledge.wiki never enters sys.modules
there.
export_wiki(output_dir: Optional[Path] = None, *, scope: str = 'project', register: bool = True) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
output_dir |
Optional[Path] |
None |
Export directory; defaults to <library>/wiki for scope. |
scope |
str |
'project' |
Which library location to export ("project" or "global"); cards from every scope are still exported as pages (the graph is the full merged one), this only picks the output directory and the default namespace registry. |
register |
bool |
True |
Register namespace "bookstore" afterwards (project's .parrot/wiki.json normally, global wikis.json when scope="global" or no git root is found). |
Returns: dict[str, Any] — {"pages", "edges", "html", "json", "registered_in"} — registered_in is the registry path written, or None when register=False.
Raises:
-
BookstoreError— The wiki/graphindex packages are not importable, or namespace registration conflicts with an existing, different entry.
Index a book file and catalog its ficha.
add_book(file_path: str | Path, scope: str = 'project', title: Optional[str] = None, authors: Optional[list[str]] = None, topics: Optional[list[str]] = None, force: bool = False, *, relate: bool = False) -> tuple[BookCard, str]
| Parameter | Type | Default | Description |
|---|---|---|---|
file_path |
str | Path |
Source PDF, Markdown, text, EPUB, MOBI, or DOCX book. | |
scope |
str |
'project' |
Target library ("project" or "global"). |
title |
Optional[str] |
None |
Override the carded title (also seeds the slug). |
authors |
Optional[list[str]] |
None |
Override the carded authors. |
topics |
Optional[list[str]] |
None |
Override the carded topics. |
force |
bool |
False |
Re-index even when the same file (by sha256) is already catalogued. A file whose content changed at an already-catalogued path is always re-indexed in place (same book_id), force or not. |
relate |
bool |
False |
When True, run :meth:relate_books for just this book (Stages 1-2 only, no communities) right after cataloguing it. False by default (G3: plain add must never call the relation LLM). |
Returns: tuple[BookCard, str] — (card, status) where status is "added", "updated" or "skipped" (sha match without force). "updated" also covers changed content at an already-catalogued path.
Raises:
-
BookstoreError— Unsupported format, missing file,.pdfor.txtwithout an LLM, or EPUB withoutai-parrot-loaders.
Adopt an existing PageIndex tree as a book or a notebook, without re-ingesting.
source is a tree JSON path outside the library (copied; the original is untouched) or an uncatalogued
tree name inside it (adopted in place). Status added | adopted | skipped (same snapshot sha).
import_tree(source: str | Path, scope: str = 'project', *, as_kind: Literal['book', 'notes'] = 'book', notes_for: Optional[str] = None, title: Optional[str] = None, force: bool = False) -> tuple[BookCard, str]
| Parameter | Type | Default | Description |
|---|---|---|---|
source |
str | Path |
||
scope |
str |
'project' |
|
as_kind |
Literal['book', 'notes'] |
'book' |
|
notes_for |
Optional[str] |
None |
|
title |
Optional[str] |
None |
|
force |
bool |
False |
Returns: tuple[BookCard, str]
Raises:
-
BookstoreError—as_kind='book'with != 1 document; a_notestree withoutas_kind='notes';notes_foralready has a notebook and notforce; unresolvable body/segment references.
Enumerate a folder's ingestable files.
iter_folder_files(folder: str | Path, recursive: bool = False) -> tuple[list[Path], list[Path]]
| Parameter | Type | Default | Description |
|---|---|---|---|
folder |
str | Path |
Directory to scan. | |
recursive |
bool |
False |
Also descend into subdirectories. |
Returns: tuple[list[Path], list[Path]] — (supported, ignored) — files whose suffix add_book can ingest, and the rest — both in stable alphabetical order (relative path).
Raises:
-
BookstoreError— Whenfolderis not a directory.
Index every supported file in a folder, one book per file.
Files are processed sequentially — each book can be a minutes-long LLM batch, and sequential ingest is friendly to provider rate limits. A failing file never stops the loop; its error is recorded and the next file proceeds.
add_folder(folder: str | Path, scope: str = 'project', recursive: bool = False, force: bool = False, *, relate: bool = False) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
folder |
str | Path |
Directory holding the books. | |
scope |
str |
'project' |
Target library ("project" or "global"). |
recursive |
bool |
False |
Also ingest files in subdirectories. |
force |
bool |
False |
Re-index files already catalogued (by sha256). Files whose content changed at a catalogued path are always re-indexed in place. |
relate |
bool |
False |
When True, each new book is related right after its own ingest (Stage 1-2 only, per file — same as add_book(relate=True)); once the whole folder is processed, one Stage-3-only relate_books(None, communities_only=True) pass runs if at least one file was added/updated — communities are computed once over the whole merged library, never per file. |
Returns: dict[str, Any] — {"folder", "results": [{file, status, book_id?, error?}], "ignored": [paths]} where status is added / updated / skipped / failed.
Remove a book — catalog row, PageIndex tree, and graph edges.
Edges touching book_id may live in either scope's DB (the
scope owning an edge's src — spec §7 cross-scope rule), so
the relation/judgement cascade runs across every store, not
just the book's own scope.
Any persisted community partition is also invalidated (spec §7:
community ids are membership hashes, so removing a member
changes every affected community's identity at once — there is
no way to "repair" the old partition in place). The next
successful relate_books(communities=True) recomputes it;
until then, communities()/get_community() correctly
report nothing rather than a book that no longer exists.
The book's notebook (<book_id>_notes) is kept by default as an
orphan (row kept, notes_for cleared); with_notes=True also
deletes the notebook tree and its row.
remove_book(book_id: str, *, with_notes: bool = False) -> bool
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
The book to remove. | |
with_notes |
bool |
False |
Also delete the book's notebook. |
Returns: bool — Whether the catalog row was removed.
Optimize a book's PageIndex tree and refresh its structural card fields.
optimize_book(book_id: str, *, apply: bool = False, llm_passes: Optional[bool] = None) -> dict[str, Any]
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Catalog id of the book whose tree should be optimized. | |
apply |
bool |
False |
Whether to publish the optimized tree. Defaults to a dry run. |
llm_passes |
Optional[bool] |
None |
Whether to run model-backed optimizer passes. When omitted, follows whether this bookstore has an LLM adapter configured. |
Returns: dict[str, Any] — The optimizer report.
Re-run carding on an existing tree (e.g. after enabling an LLM).
refresh_card(book_id: str) -> BookCard
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
Returns: BookCard
Overwrite the given descriptive fields of an existing card and persist it.
Only non-None arguments are applied. title/summary are
stripped; an empty title is rejected. Marks the card
card_origin="manual"; community stamps survive untouched.
update_card(book_id: str, *, title: Optional[str] = None, authors: Optional[list[str]] = None, topics: Optional[list[str]] = None, summary: Optional[str] = None) -> BookCard
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
str |
||
title |
Optional[str] |
None |
|
authors |
Optional[list[str]] |
None |
|
topics |
Optional[list[str]] |
None |
|
summary |
Optional[str] |
None |
Returns: BookCard
Raises:
-
BookstoreError— Unknownbook_id, emptytitle, or no field given.
User-facing bookstore failure (bad input, missing book, no LLM…).
Re-exported from parrot.knowledge.bookstore.models.CardDraft.
Re-exported from parrot.knowledge.bookstore.catalog.CatalogStore.
Re-exported from parrot.knowledge.pageindex.store.JSONTreeStore.
Re-exported from parrot.knowledge.bookstore.config.LibraryLocation.
Re-exported from parrot.knowledge.pageindex.content_store.NodeContentStore.
Re-exported from parrot.knowledge.pageindex.layout.PDFStructureError.
Re-exported from parrot.knowledge.pageindex.toolkit.PageIndexToolkit.
Re-exported from parrot.knowledge.bookstore.models.REL_WEIGHTS.
Re-exported from parrot.knowledge.pageindex.toolkit.REPLACED_MARKER.
Re-exported from parrot.knowledge.bookstore.models.RelateSummary.
Re-exported from parrot.knowledge.pageindex.segments.RevisionMismatchError.
Re-exported from parrot.knowledge.pageindex.segment_store.SegmentStore.
Re-exported from parrot.knowledge.pageindex.locks.TreeLockTimeout.
Re-exported from parrot.knowledge.bookstore.relations.candidate_pairs.
Re-exported from parrot.knowledge.bookstore.relations.communities_from_result.
Re-exported from parrot.knowledge.bookstore.carding.derive_toc.
Re-exported from parrot.knowledge.bookstore.relations.detect_book_communities.
Re-exported from parrot.knowledge.bookstore.relations.deterministic_relations.
Re-exported from parrot.knowledge.bookstore.carding.disambiguate_title.
Convert a Word document to markdown via parrot_loaders.
Reuses MSWordLoader.docx_to_markdown (heading styles → markdown
headings, tables → markdown tables). The import is lazy —
ai-parrot-loaders is a separate distribution and core must not
hard-depend on it — and the synchronous conversion is offloaded with
:func:asyncio.to_thread. A document with no Word heading styles
yields heading-less markdown and therefore a 0-chapter tree (the same
accepted behaviour as the markdown route).
docx_to_markdown(path: Path) -> str
| Parameter | Type | Default | Description |
|---|---|---|---|
path |
Path |
Path to the .docx file. |
Returns: str — The converted markdown.
Raises:
-
BookstoreError— Whenai-parrot-loadersis not installed, or the document has no readable content.
Re-exported from parrot.knowledge.bookstore.carding.fallback_card_fields.
Re-exported from parrot.knowledge.bookstore.relations.fallback_label.
Re-exported from parrot.knowledge.bookstore.carding.generate_card_fields.
Re-exported from parrot.knowledge.bookstore.relations.judge_relations.
Re-exported from parrot.knowledge.bookstore.relations.label_community.
Re-exported from parrot.knowledge.bookstore.relations.llm_relations_from_draft.
Re-exported from parrot.knowledge.bookstore.catalog.merged_cards.
Re-exported from parrot.knowledge.bookstore.catalog.merged_communities.
Re-exported from parrot.knowledge.bookstore.catalog.merged_relations.
Re-exported from parrot.knowledge.bookstore.catalog.merged_search.
Tree name of a book's notebook, or of the scope's library notebook when book_id is None.
notebook_tree_name(book_id: Optional[str]) -> str
| Parameter | Type | Default | Description |
|---|---|---|---|
book_id |
Optional[str] |
The annotated book's id, or None for the scope-wide library notebook. |
Returns: str — "<book_id>_notes" or "_library_notes".
Re-exported from parrot.knowledge.bookstore.carding.sample_sections.
Re-exported from parrot.knowledge.bookstore.carding.slugify.
Re-exported from parrot.knowledge.pageindex.utils.structure_to_list.
Re-exported from parrot.knowledge.pageindex.locks.tree_lock.
Re-exported from parrot.knowledge.bookstore.carding.unique_slug.
- 1. MCP Server — exposing tools as a service
- 2. A2A — exposing agents and orchestrators as services
- 3. Toolkits for third party services and Cloud Security composition
- 4. Interaction surface — WebSockets, audio, integrations
- 5. Hardening — anti prompt injection, PBAC and tool gating
- 6. Cross cutting concerns and reference deployment
- 7. AgentCrew — Sequential, Parallel, Flow and Loop execution
- 8. AgentsFlow — DAG first orchestration with per node FSM
- 9. Ontologic RAG — graph first retrieval, intent routing & multi tenant knowledge
- 10. Observability — OpenLIT + OpenTelemetry
- Class Catalog by Module
- Module level Functions Catalog
- AI Parrot — Exposure, Interoperability & Hardening Architecture
- Agent Mesh
- AgentService — Standalone Runtime for Autonomous Agents
- AbstractClient: The Provider Client Family
- Anthropic client
- Bedrock Mantle Client
- TypeSafe System One Client (
JevClient) - Meta Model API Client (Muse Spark)
- OpenAI Compatible Client Base (
OpenAIBaseClient) - Per Loop LLM Client Cache
- Question Token Budgets (Bedrock Converse, Nova text, Bedrock Mantle)
- Agent Configure Lifecycle
- AgentTalk Integration Guide
- Agent Configuration via
agents.yaml - AgentFactory HTTP API
- Agent Studio — API Reference
- Agent CLI Daemon (agentd)
- FirefliesInsightsAgent
- Follow up Suggestion Chips (FEAT 752)
- Agents and Chatbots: The Bot Class Hierarchy
- Agent Studio — database storage (host guide)
- Ephemeral User Agents — Frontend Integration Handoff
parrot agent— Agent Terminal Workspace- Crew Handler
- Database Agent
- Running the CVE Experts
- Domain Experts (FEAT 778)
- FEAT 437
- Technical Voice Guide (AgentTalk Voice) for Frontend
- AgentDashboard — A2UI v1.0 Technical Reference for
navigator frontend next - Semantic UI Model → Adaptive Cards (FEAT 303)
- Exposing an AI Parrot Agent as an MCP Server
- AgentCrew User Guide
- AgentsFlow User Guide
- Crew Definition Storage
- A2UI Agent Functions Runtime — the v1.0 RPC leg (FEAT 469)
- Capabilities of an AI Parrot Analytical Agent (PandasAgent)
- Agent Security Guardrails (FEAT 761)
- SpawnSubAgentTool
- Testagent
- Agentic End to End Testing (FEAT 581)
- Uiagent
- WebAgent — Browser Interaction via Chrome DevTools
- WebNavigatorAgent — Catalogued Web Navigation on Your Chrome Profile
- ExecutionMemory Integration Guide
- Agent Brain
- Agent Memory
- Conversation History Ownership
- Conversation Memory Subsystem Overview
- Dream Cycle — episodic → wiki brain consolidation
- Durable Conversation Memory
- Memory Dynamics
- Per Turn Conversation Compaction
- Recoverable Task Memory (FEAT 538)
- Task Memory — Phase 0 Integration Map (FEAT 538 / TASK 2970)
- User Memory
- Bookstore Agentic Retrieval
- Bookstore in Codex
- Bookstore Conceptual Relations — the book graph (FEAT 533)
- Bookstore notebooks
- Contracts catalog performance (FEAT 539, AC14)
- Contracts pilot acceptance — Bob's twelve cases (FEAT 539, AC15)
- Contracts Card & Ontology (FEAT 539)
- Luau parser resource policy (FEAT 532 TASK 2896)
- Glossary of Terms (FEAT 917)
- GraphIndex core seams (FEAT 540)
- GraphIndex — Structured Knowledge Graph Indexing
- Local Knowledge Base
- Procedure Graph — Assembly Manuals (FEAT 601)
- Ontology backend programme
- Ontology vocabulary store
- PageIndex Agentic Retrieval and Citations
- PageIndex Generation Publication
- PageIndex Layout Structure Builder
- PageIndex Local MCP Toolkit
- PageIndex Segment Store
- PageIndex Tree Optimizer
- PageIndex — Tree Based RAG for Document Retrieval
- ArxivTool for AI Parrot
- Accounting metrics layer
- Tool Result Compression Pipeline (FEAT 380)
- DatasetManager Implementation Walkthrough
- FredAPITool Documentation
- EmployeesTool Employee Hierarchy Tool for AI Parrot
- HoobaToolkit
- Jira text templates (JiraToolkit)
- Expose Toolkits as Local MCP (
parrot mcp local) - MultiStoreSearch Toolkit — Multi Origin Retrieval for Agents
- Supervised Obscura Browser Integration
- OdooHelpdeskToolkit — Softhealer helpdesk on Odoo 19
- OdooToolkit Capabilities
- QuerysourceToolkit
- ReadOnlyRepoToolkit (FEAT 484)
- PythonREPLTool Sandbox: Worker Process Execution Model
- Research Tools for Agents
- gVisor Installation Guide for AI Parrot Secure Sandbox
- SDD Sandbox — OS Setup
- Governed semantic layer
- Tool optimizations for Claude Code and Codex (FEAT 543)
- AbstractTool Clone Method
- Toolbar API Documentation
- AudioNoteCaptureToolkit
- ExecutionPlanToolkit — Reference
- Host toolkits for Agent Studio
- Infographic Authoring for Data Agents (FEAT 326)
- InfographicToolkit — Reference
- Tool System Internals: Tools, Toolkits and ToolManager
- AI Parrot Tools Documentation
- What If Scenario Analysis
- Workday worker history
- DecisionFlowNode Usage Guide
- Multi Agent Orchestration: AgentCrew and AgentsFlow
- Docker Tool Executor & Execution Policy
- Generic Gate Host
- HeartbeatManager — Per Agent Autonomous Heartbeat Loop
- JobManager
- Node Types Reference
- OrchestratorAgent — Multi Party Conferencing (
confer) - Planogram compliance cycle (perceive → identify → compare)
- Planogram compliance — migrating configurations to the new cycle (FEAT 574, FEAT 612)
- Planogram perception spike — FEAT 574
- Scheduler backends in multi worker deployments
- Thales User Guide
- Per tenant skills (FEAT 707)
- Skill routing and trigger caching
- Skills system: discovery, toolkits and mixin
- Contextual Embedding Headers
- DocumentDB Usage Patterns
- DocumentDB Interface Guide
- DynamoDB Local (docker compose)
- Fully offline local agent with LanceDB (FEAT 542)
- LanceDB vector, full text and hybrid store (FEAT 542)
- Loader Metadata Standard
- Document Loaders for RAG
- Matryoshka Embedding Truncation
- Parent Child Retrieval (Small to Big)
- Storage Backends Guide
- User stores (Redis by default)
- Vector Stores and Embeddings Reference
- Vector Store Handler — API Reference
- A2A Secure Communication Demo
- Agent as a Local MCP Server (parrot toolkits install agent)
- add repository:
- GitHub MCP Installation and Usage
- MCP integration: client, server and agent tools
- Create and configure agent
- Roost — local inter agent sub protocol
- Roost carriers
- Roost performatives, protocols and obligations
- Simple Mcp Server
- SimpleMCPServer Configuration
- API Endpoints Reference
- Admin UI (FEAT 468)
- Infographic Render Endpoint — Reference
- EventBus v2 Configuration Reference (
[bus]/[bus.alerts]) - EventBus v2 Migration Notes (FEAT 310)
- EventBus v2 — Unified Event Fabric (FEAT 310)
- Session file store
- A2UI Dashboard + Widget Renderer — Frontend Build Guide
- Avatar Technical Guide (LiveAvatar Phase A) for Frontend
- Frontend Guide for SvelteKit: LiveAvatar FULL Mode and VoiceBot (FEAT 248)
- DEPRECATED: Native Voice Avatar (LiveAvatar Phase C) Technical Guide for Frontend
- Technical Guide to Structured Artifacts for Frontend
- VoiceBot · VoiceChatHandler · FEAT 245 — Frontend Guide for Realtime Conversation with Agents
- Server Layer: BotManager and HTTP Handlers
- Infographic Handler — Frontend API Contract
- Interactive Artifacts — Frontend API Contract
- Google Drive file manager
- SharePoint & OneDrive file managers
- WhatsApp Integration Implementation Summary
- WhatsApp Integration for AI Parrot
- P3 — parrot admin ui inventory (canvases / A2UI / infographic / builders)
- WhatsApp + AutonomousOrchestrator Integration
- Audio Form Voice Modes — Developer Guide
- Who owns an OAuth2 (3LO) credential
- CommCenter — Bulk Notification Sender (FEAT 417)
- FormDesigner → MS Teams: Adaptive Card renderer and bot submit path (FEAT 551)
- GitHub reviewer
- Google OAuth 2.0 — AI Parrot Integration
- Fireflies Agent Examples
- HITL Tool Call Confirmation (FEAT 235)
- Teams HITL Channel Setup Guide (FEAT 205)
- JiraSpecialist Prompt Layer Stack
- JiraSpecialist — Daily Standup Lanes
- Jira Transition Actions — Activating
TRIGGER_AGENTDispatch - Jupyter Output Mode Documentation
- Knowledge upload from chat (FEAT 647)
- LiveAvatar over your own LiveKit (Cloud or self hosted)
- Matrix Bridges for the AI Parrot Swarm (FEAT 463)
- Matrix Clients for the AI Parrot Swarm (FEAT 463)
- Migration Guide: FEAT 202 — ai parrot integrations
- Connections on Microsoft Teams
- MS Teams Toolkit for AI Parrot
- Nova Sonic Voice Protocol Reference
- Office 365 OAuth 2.0 (Delegated) — AI Parrot Integration
- PR Review Command — Setup Guide
- Queued chat commands
- Runbook — the
issuesnamespace (Jira ticket corpus) - Dev loop kick off from Slack (FEAT 555)
- Telegram Auth Open Mode (webview | browser)
- Telegram connections
- Telegram Bot Integration Guide
- FEAT 536 — VoiceBot Nova Dual Output + LiveAvatar: Real Live Operational Acceptance
- FEAT 537 — Nova VoiceBot avatar broadcast: operational acceptance
- FEAT 537 — Nova PCM → LiveAvatar LITE → LiveKit multi subscriber live gate
- speech_report TTS backends
- Nova VoiceBot avatar broadcast for multiple browsers (FEAT 537)
- 🦜 AI Parrot Voice Chat
- WhisperX Setup Guide for AI Parrot
- A2UI Linked Surfaces (FEAT 598)
- A2UI v1.0 Wire (FEAT 470)
- === D3.js ===
- Backend HTML Design System (FEAT 493)
- FEAT 488
- FormDesigner Audio Renderer
- Form Designer — Autonomous FormSchema Persistence (Standalone Forms)
- Form Designer — Conditional Sections: Pre/Post Dependencies
- FormBuilder — LLM answer plausibility enforcement
- FormDesigner — orphan upload cleanup (FEAT 731)
- FormDesigner — public response controls
- Form Designer — Relational Fields
- Serving FormDesigner forms from a Teams agent
- Form Designer — Unknown Field Capture Policy for Form Submissions
- FormDesigner — validation audit trail
- Infographic Recipes (FEAT 324)
- Inline A2UI Component Routing (FEAT 755)
- Metric Definition Registry (FEAT 756)
- Smart OutputFormatter Documentation
- N4 — navigator api backend inventory (dashboards / widgets / templates / modules / programs)
- P1 — ai parrot HTTP/WS endpoint inventory (report builder lens)
- P2 — ai parrot (Python) UI components, models, renderers, persistence — inventory for a REPORT BUILDER
- P4 — ai parrot prior art for a Report Builder (SDD inventory)
- ai parrot server — Admin / Bots / Studio / misc endpoint inventory
- P1 — ai parrot HTTP/WS endpoint inventory (report builder lens) ( core)
- parrot formdesigner — HTTP/WS endpoint inventory
- Report Builder — ai parrot inventory and analysis
- WeasyPrint 69.0 CSS Support — Empirical Findings
- Identity Capability User Guide
- Layers Reference
- Output Language (FEAT 638)
- PromptBuilder — User Modifiable Variables
- PromptBuilder User Guide
- Delegated OAuth2 connections
- Delegated OAuth2 connections on the web channel — deployment recipe and live harness
- Deterministic Groundedness Scoring
- ONNX Backend for the Prompt Injection Guardrail (FEAT 439)
- PBAC Guardrails — Policy Driven Tool Call Denial (FEAT 406)
- SecurityAdvisor — SOC2 Oriented Read Only Advisory Agent
- User Profile Management
- AI Parrot MCP Server AWS Deployment Guide
- Bot Cleanup Lifecycle
- Business Automation — Operator Runbook
parrot loginand connections- CompanyInfoToolkit
- Per component and per agent LLM defaults (FEAT 796, FEAT 882)
- Answer Accuracy Metrics for the Evaluation Harness (FEAT 652)
- Infographic CSP and Signed URLs — Operations Guide
- Global install: the parrot managed runtime (reference)
- Runbook — the Fireflies Meeting Registry
- Wiki standup briefs — runbook
parrot.finance— the finance satellite- Migration — FEAT 201: ai parrot embeddings
- Migration — FEAT 203: ai parrot server
- FEAT 223 — Structured Artifact Contract: Migration Guide
- FEAT 273 — Legacy output mode deprecations → A2UI
- Migration — FEAT 315: Unified NovaClient for all Amazon Nova models
- Migration — FEAT 421: Client declared tenant in the forms URL
- Migration — FEAT 446: SaaS Auth Hardening (S0 of Parrot Research Cloud)
- Migration — FEAT 473: A2UI v1.0 for STRUCTURED_CHART / STRUCTURED_TABLE / STRUCTURED_MAP
- Migration — FEAT 523: PEP 420 LLM Client Extraction
- Gemini 2.5 retirement (FEAT 798)
- Migration — FEAT 564: Reliable video reels with Gemini Omni and Veo 3.1
- Native Claude sandbox for SDD sessions (FEAT 768)
- Complementary (collaborative) research partner (FEAT 482)
- Dev flow per seat LLM configuration (
DevFlowModelPlan) - Dev loop
novabackend (AWS Bedrock) - sdd worker as orchestrator of parallel sdd coder seats (FEAT 549)
- SDD compaction capability record
- SDD execution optimization — operation and rollout
- Proposals to Reduce SDD Execution Time
- Dev flow / dev loop telemetry accounting
- Language Agnostic Validation Runners (FEAT 709)
- Spec Driven Development in Google Gemini / Antigravity CLI
- Guide to using the SDD slash commands
- AI Parrot Spec Driven Development (SDD) Platform
- SDD on Google Antigravity (agy)
/sdd donecloseout hooks- Decision Audit (FEAT 784)
- SDD experience memory
- SDD Expert Consult
- Ledger outbox (FEAT 758)
- FEAT 580 LSP Pilot — Live Evaluation Results
- SDD LSP research pilot (FEAT 580)
- Necessity Ladder (FEAT 908)
- Procedure Graph
- Test selection in the SDD flow — the Validation Contract (FEAT 699)
- wikitoolkit Cheatsheet
- wikitoolkit inbox
- wikitoolkit lint
- LLM Wiki — an agent maintained knowledge repository
- Schema Plane — Operator Guide (FEAT 600)
- SQLite concurrency for wiki and ledger
- wikitoolkit standup
- WikiToolkit as Claude Code infrastructure
- Authentication uses Navigator Auth
- AbstractClient base changes require a decision
- Clients are memory less
- Configuration uses NavConfig
- Graph backends — retire ArangoDB for PostgreSQL + SurrealDB
- Conversation history has one writer
- HTTP stack uses aiohttp
- LangChain is not part of the stack
- Async code remains non blocking
- Concrete tools live in ai parrot tools