Skip to main content

Build expert agents from documented domains

Project description

expert-agent-builder

Build expert agents from documented domains. Automates the knowledge pipeline: fetch docs, chunk large files, generate summaries, extract beliefs, derive deeper conclusions, review and repair, build FTS5 search indexes.

Install

uv tool install ftl-expert-build

Requires ftl-reasons and either claude or gemini CLI on PATH.

Quick Start

# Bootstrap a new expert agent
expert-build init rhcsa --domain "Red Hat Certified System Administrator"

# Fetch documentation
expert-build fetch-docs https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/ --depth 2

# Generate entries from sources
expert-build summarize --parallel 4

# Extract beliefs for review
expert-build propose-beliefs --parallel 4
# Edit proposed-beliefs.md: LLM marks each as [ACCEPT] or [REJECT]
expert-build accept-beliefs

# Run the full pipeline end-to-end
expert-build pipeline --url https://docs.example.com --parallel 4

Commands

Command Description
init Bootstrap a new expert agent repo
fetch-docs Fetch documentation from URLs
chunk-pdf Split PDFs into section-based entries
chunk-docs Split large .md/.py/.txt files by structural boundaries
summarize Generate entries from source documents via LLM
propose-beliefs Extract candidate beliefs from entries via LLM
accept-beliefs Import accepted beliefs into reasons.db
cert-coverage Map certification objectives to beliefs
exam Run practice questions, discover knowledge gaps
pipeline Run end-to-end EEM construction (9 stages)
derive-review-repair Run derive/review/repair loop on existing beliefs
index-sources Build FTS5 chunks database for RAG search
status Show pipeline progress

Pipeline Stages

1. Ingest (fetch-docs / chunk-pdf)
2. Summarize (LLM summaries of source documents)
3. Extract (propose-beliefs + accept-beliefs)
4-7. Derive → Review → Repair → Deduplicate (convergence loop)
8. Export (network.json + README card)
9. Index (FTS5 search database)
# Full pipeline with parallel LLM calls and recursive source discovery
expert-build pipeline --url https://docs.example.com --parallel 4 --recursive

# Resume after a crash
expert-build pipeline --resume

# Run just the knowledge refinement loop
expert-build derive-review-repair --rounds 5

Working with Large Repos

# Summarize a repo with nested directories
expert-build summarize --input-dir ~/git/my-project --recursive --parallel 4

# Chunk large files before summarizing
expert-build chunk-docs --input-dir ~/git/my-project --recursive

# Build search index
expert-build index-sources --input-dir ~/git/my-project --recursive
expert-build index-sources --input-dir entries/ --recursive --type summary

# Query with reasons
reasons search-sources "kubernetes scheduling" --db rag_fts.db
reasons ask "How does pod scheduling work?" --full-sources rag_fts.db

Features

  • Parallel LLM calls--parallel N on summarize, propose-beliefs, and pipeline
  • Recursive file discovery--recursive for nested directory structures
  • Cost tracking — token counts and costs printed after every command
  • Crash resilience — incremental writes, pipeline state file with --resume
  • JSON pseudo-tool-calling — structured LLM output with retry for all parsing stages
  • Source provenance — every entry tracks its source file, URL, and document ID
  • FTS5 indexing — build search indexes compatible with reasons search-sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftl_expert_build-0.2.0.tar.gz (910.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ftl_expert_build-0.2.0-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file ftl_expert_build-0.2.0.tar.gz.

File metadata

  • Download URL: ftl_expert_build-0.2.0.tar.gz
  • Upload date:
  • Size: 910.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for ftl_expert_build-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6bcdfbb63430eeb0b9691a6499ca90f2cba3250b8ba010a612d22e7d585529bc
MD5 e9be56aa567128dca90a11f830d4ec0f
BLAKE2b-256 7c94e770ab339aad192f87744c4edf0c03d336f7e62ba815a201bed75751cd5c

See more details on using hashes here.

File details

Details for the file ftl_expert_build-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ftl_expert_build-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22ccc23ee7d8059a3fe39e6e310672aae8ddd26de977b1c1420cac0f1990b653
MD5 eb7496824ceac4ca65fa3c0ad8988897
BLAKE2b-256 e1cea815e147417fcfb4a009e88bd49ba976ffd7d3b24c92d5cdcb4d13aca930

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page