Jonathan Boniface d8a4b6b3c1
Some checks failed
quality-gates / verify (push) Failing after 7s
fix: files manually
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00
2026-09-01 17:21:58 +01:00

KAB Content Ingestion Agent

Contract-first, multi-tenant ingestion for GitHub REST and Microsoft Graph SharePoint into a governed KAB-compatible knowledge store.

The package is dependency-light, utilizing hexagonal architecture ports (HTTP, SecretStore, Publisher) for deterministic testing and zero-token leakage.


Architecture & Codebase Alignment

The codebase is organized into two primary layers with a unified domain alignment:

                            +-----------------------------------+
                            |              app/                 |
                            |  (Starlette/FastAPI Web Layer &   |
                            |  LangGraph Execution Workflows)   |
                            +-----------------+-----------------+
                                              |
                                    Imports & Delegates
                                              v
                            +-----------------------------------+
                            |          kab_ingestion/           |
                            |  (Core Domain Models, Connectors, |
                            |    Orchestrator & Governance)     |
                            +-----------------------------------+

1. Core Ingestion Domain Layer (kab_ingestion/)

2. Application & Workflow Layer (app/)

3. Package Re-export Alignment (app/kab_ingestion)

  • app/kab_ingestion: Operates as a lightweight re-export alignment layer. All domain models, connectors, and ports re-export directly from the canonical kab_ingestion root package, guaranteeing full backward compatibility and preventing duplicate definitions.

LangGraph 4-Phase Execution Contract

Every ingestion workflow implements the platform's 4-phase execution contract:

  1. Discovery (app/nodes/discovery_node.py): Non-blocking check for existing resources and connector availability.
  2. Validation (app/nodes/validation_node.py): Validates IngestionRequest format and allowed sources; fails fast on error (has_errors: TrueEND).
  3. Generation (app/nodes/generation_node.py): Connects to GitHub/SharePoint source connectors and fetches normalized documents into fetched_documents.
  4. Deployment (app/nodes/deployment_node.py): Enforces governance approval and tenant ACL isolation, publishing approved documents to target storage.

Security & Tenant Isolation

  • Secret References (secret_ref): Tokens are referenced by secret name (e.g. secrets/github-read), never stored in configuration files or logs.
  • Tenant Isolation & ACLs: Every document carries tenant_id and ACL {principals, groups, visibility}. Tenant mismatch results in automatic publish rejection.

Quick Start & Testing

Running Tests

python -m pytest -q

Compiling Packages

python -m compileall kab_ingestion app

Documentation References

Description
Generated deliverable: content-ingestion-agent
Readme 127 KiB
Languages
Python 98%
Dockerfile 2%