Self Learning and Growing Agents
Turns raw evidence into reusable understanding.
Start from a seed corpus, generate better questions, gather and rank evidence, remember both facts and gaps, and emit outputs that humans, maps, and deeper service views can all reuse.
1. Problem Statement
Teams already have the knowledge they need, but it is scattered, uneven in trust, and expensive to reuse.
The answers are usually somewhere in code, docs, runbooks, and operational history. But because those sources are fragmented and differently trustworthy, humans and agents keep rediscovering the same answers from scratch.
They just were not arranged as a repeatable product.
Live code and config often answered questions better than docs, but were harder to reuse quickly.
Without a canonical memory, people and agents repeated the same investigation over and over.
2. Solution / How The Pipeline Works
The repo works as one operational system with clear boundaries between learning, curation, export, and consumption.
The important story here is not a stage list. It is the operational split: orchestration on top, local KB layers in the middle, reusable rendering and query consumers downstream, and optional AWS publish kept separate from the local loop.
What stays local
Snapshots keep raw source captures. knowledge/store.json
is canonical memory. Curated outputs are readable summaries. Exported
views and published KB slices are downstream products, not the source
of truth.
How consumers attach
query_kb.py is the local query adapter. The same
curated/export contracts also let an external consumer such as
MeshClaw or Claude attach without re-learning the corpus from zero.
Why maps and boards are reusable
The renderer kits are shared shells: typed JSON payloads feed common HTML/CSS/JS behavior for nodes, edges, labels, selection, evidence, and side panels instead of hand-drawing each page.
What keeps it honest
Validation sits under the whole repo: tests, schema checks, pack validation, and exporter contracts keep the KB and rendered outputs reusable instead of drifting into one-off artifacts.
3. How It Learns
The loop starts from the starter corpus and gets better by revisiting what it cannot prove.
The system asks follow-up questions, stores facts when it can prove them, stores gaps when it cannot, and later retries the unresolved set.
Asks itself questions
The frontier is built from weak nodes, weak edges, image gaps, unresolved items, and new discoveries.
Stores facts
When something is grounded, it becomes a reusable fact, lesson, normalized service, or typed edge.
Stores gaps honestly
When something is not provable yet, it stays a gap instead of being flattened into fake certainty.
Revisits unresolved areas
Open gaps survive across cycles, so later evidence can close them without restarting from zero.
4. Conflict Handling
When sources disagree, stronger evidence wins and unresolved conflict stays visible.
The system does not pretend uncertainty away. It records confidence and preserves disagreement when a proof path is still missing.
Simple rule
If code says one thing and a wiki says another, code wins unless there is a clearly stated reason not to.
Why this matters
The maps and boards stay trustworthy because the KB carries evidence and confidence, not just conclusions.
5. What The Outputs Become
These outputs are structured views: they define typed things, labeled relationships, and the side panels that explain them.
The map view and the AWS component board are not hand-built diagrams. Each one is a typed payload plus a shared HTML/CSS/JS shell: nodes, edges, line labels, panel fields, and view behavior all come from a stable render contract.
6. Where We Landed
The payoff is a local KB plus a map-ready org interaction layer with grounded edges.
The current export carries 83 normalized services and 100 grounded edges, enough to show real billing and invoicing pathways rather than a vague org chart.
Canonical KB
knowledge/store.json now holds 4,005 facts, 10 tracked
gaps, and 734 touched sources.
Feed
curated/billing-invoicing-org-interactions-feed.json holds normalized services, typed edges, evidence, and confidence.
Render payload
curated/system-interaction-map-views/billing-invoicing-org.json holds lane placement, summaries, and export-ready node ids.
Grounded labels
This slice already carries concrete labels like
commitStatement, GetEligibleFX,
GetRate, SendInvoicingEmail, and
GetOfflineRemitInfo.