From 5c17387772f203b5c64ecbc1ae07bb23f8ce077a Mon Sep 17 00:00:00 2001 From: sidPhoenix17 Date: Mon, 10 Aug 2026 13:26:04 -0700 Subject: [PATCH 1/2] docs: add Agent Guide tab, Why Open Index page, video + star CTA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New "Agent Guide" tab: a vendor-neutral autonomous-agent development guide grounded in Open Index features — foundations (building agents, what they are, the harness), context engineering (context poisoning, search accuracy, conflicts & staleness, provenance), and autonomy (human steering, determinism, self-learning loops). - Add "Why Open Index" manifesto page to the Documentation tab. - Embed intro video and a Star-on-GitHub CTA on the landing page; make the navbar button "Star on GitHub". Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/docs.json | 102 +++++++++++++------- docs/guide/conflicts-and-staleness.mdx | 85 +++++++++++++++++ docs/guide/context-poisoning.mdx | 90 ++++++++++++++++++ docs/guide/context-search-accuracy.mdx | 86 +++++++++++++++++ docs/guide/determinism.mdx | 71 ++++++++++++++ docs/guide/human-steering.mdx | 70 ++++++++++++++ docs/guide/index.mdx | 70 ++++++++++++++ docs/guide/provenance.mdx | 69 ++++++++++++++ docs/guide/self-learning-loops.mdx | 77 +++++++++++++++ docs/guide/the-harness.mdx | 93 ++++++++++++++++++ docs/guide/what-are-autonomous-agents.mdx | 64 +++++++++++++ docs/index.mdx | 15 +++ docs/why-open-index.mdx | 110 ++++++++++++++++++++++ 13 files changed, 969 insertions(+), 33 deletions(-) create mode 100644 docs/guide/conflicts-and-staleness.mdx create mode 100644 docs/guide/context-poisoning.mdx create mode 100644 docs/guide/context-search-accuracy.mdx create mode 100644 docs/guide/determinism.mdx create mode 100644 docs/guide/human-steering.mdx create mode 100644 docs/guide/index.mdx create mode 100644 docs/guide/provenance.mdx create mode 100644 docs/guide/self-learning-loops.mdx create mode 100644 docs/guide/the-harness.mdx create mode 100644 docs/guide/what-are-autonomous-agents.mdx create mode 100644 docs/why-open-index.mdx diff --git a/docs/docs.json b/docs/docs.json index 046e417..d44be4d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -9,42 +9,78 @@ }, "favicon": "/favicon.svg", "navigation": { - "groups": [ + "tabs": [ { - "group": "Get Started", - "pages": [ - "index", - "quickstart", - "concepts", - "use-cases" + "tab": "Documentation", + "groups": [ + { + "group": "Get Started", + "pages": [ + "index", + "why-open-index", + "quickstart", + "concepts", + "use-cases" + ] + }, + { + "group": "Build a Brain", + "pages": [ + "guides/creating-a-brain", + "guides/populating-entities", + "guides/entity-management", + "guides/search-configuration" + ] + }, + { + "group": "Agents & Connectors", + "pages": [ + "agents/mcp", + "agents/connectors" + ] + }, + { + "group": "Deploy", + "pages": [ + "deployment" + ] + }, + { + "group": "Reference", + "pages": [ + "reference/cli" + ] + } ] }, { - "group": "Build a Brain", - "pages": [ - "guides/creating-a-brain", - "guides/populating-entities", - "guides/entity-management", - "guides/search-configuration" - ] - }, - { - "group": "Agents & Connectors", - "pages": [ - "agents/mcp", - "agents/connectors" - ] - }, - { - "group": "Deploy", - "pages": [ - "deployment" - ] - }, - { - "group": "Reference", - "pages": [ - "reference/cli" + "tab": "Agent Guide", + "groups": [ + { + "group": "Foundations", + "pages": [ + "guide/index", + "guide/what-are-autonomous-agents", + "guide/the-harness" + ] + }, + { + "group": "Context Engineering", + "pages": [ + "guide/context-poisoning", + "guide/context-search-accuracy", + "guide/conflicts-and-staleness", + "guide/provenance" + ] + }, + { + "group": "Autonomy", + "pages": [ + "guide/human-steering", + "guide/determinism", + "guide/self-learning-loops" + ] + } ] } ] @@ -62,7 +98,7 @@ ], "primary": { "type": "button", - "label": "GitHub", + "label": "Star on GitHub", "href": "https://github.com/DrDroidLab/open-index" } }, diff --git a/docs/guide/conflicts-and-staleness.mdx b/docs/guide/conflicts-and-staleness.mdx new file mode 100644 index 0000000..1e4c2f5 --- /dev/null +++ b/docs/guide/conflicts-and-staleness.mdx @@ -0,0 +1,85 @@ +--- +title: How to avoid staleness and conflicts in your knowledge window +description: Why distributed markdown knowledge self-contradicts over time, and how per-concept structured updates and time-decay keep a knowledge base correct. +--- + +A knowledge base is only useful while it's *correct*. The failure mode that erodes +trust fastest isn't missing information — it's **stale or conflicting** information +the agent treats as current. Two documents disagree; the agent picks one; the user +can't tell it was wrong until it's too late. + +## Why files rot + +When context is spread across many markdown files, updates are non-trivial: + +- **Related context is duplicated across documents.** The same fact — an owner, a + policy, a threshold — appears in several files. Update one, miss the others, and now + your knowledge base disagrees with itself. +- **There's no deterministic link between related facts.** Nothing says "these three + paragraphs describe the same thing," so there's no reliable way to find everything + that must change together. +- **Nothing expires.** Old notes sit forever with the same weight as fresh ones. The + agent has no signal that a two-year-old runbook is stale. + +The result is a knowledge base that gets *less* trustworthy as it grows — the opposite +of what you want. + +## Structure updates around concepts, not documents + +The fix is to make the **concept** the unit of truth, not the document: + + + + Each entity has a stable id (`service:checkout`). A fact about checkout lives in + *one* place and is updated in one place — no hunting through documents for + duplicated copies. → [entities](/concepts) + + + Update or delete a single record without touching a monolithic context document. + Writes are validated against the schema, so an update can't silently break shape. → + [put_entity](/agents/mcp) + + + Related facts connect through typed `related_to` edges. When something changes, you + can traverse the edges to find exactly what else is affected — deterministically, + not by full-text guessing. → [related_to](/concepts) + + + +## Handle temporal data with decay, not deletion + +Some knowledge is inherently time-bound — alerts, deployments, incidents. Keeping it +forever is noise; deleting it loses signal. The right pattern is **exponential decay +with time**: recent records dominate retrieval, old ones fade, and flushing the tail +doesn't hurt quality. + + +Model high-volume temporal data as **index-owned** (generated, DB-resident) rather +than git-tracked files, so it doesn't churn your repo — and let it decay. Curated, +long-lived knowledge stays **file-backed** and reviewable. Matching the storage policy +to the data's lifespan is half the battle. → [storage: file vs index](/guides/search-configuration) + + +## Choose the right write cadence + +Staleness is often *self-inflicted* by creating entities too fast: + +- Track things that change at a **human pace** (a service, a policy, an account), not + ephemeral ones (a pod, a single request). An entity per ephemeral object is pure + churn. +- Over-population creates two costs: **noise** in retrieval and **maintenance + overhead** removing stale records later. + +See [Entity management](/guides/entity-management) for the full cadence guidance. + +## Checklist + +- [ ] Each fact lives in exactly one addressable record — no duplication across docs. +- [ ] Updates and deletes are per-concept and schema-validated. +- [ ] Related facts link through typed edges, so change impact is traceable. +- [ ] Temporal data decays with time instead of accumulating. +- [ ] Write cadence matches how fast the underlying thing actually changes. + + + Making every fact traceable to its source. + diff --git a/docs/guide/context-poisoning.mdx b/docs/guide/context-poisoning.mdx new file mode 100644 index 0000000..143effe --- /dev/null +++ b/docs/guide/context-poisoning.mdx @@ -0,0 +1,90 @@ +--- +title: How to reduce context poisoning in your agents +description: Why markdown/file-based context makes agents drift, and how a structured, discoverable context model contains the blast radius. +--- + +**Context poisoning** is when irrelevant or unintended context leaks into the agent's +working set and pulls it off task — a stray instruction in a document, a +tangentially-related file, an old note that contradicts a new one. The agent picks it +up, treats it as relevant, and drifts. + +It's the single most common reason "autonomous" agents need a human watching them. + +## Why it happens with files + +Teams usually start with markdown files, organized by folder. It works at 5 files. At +50+, it doesn't — and adding structure the *file* way makes it worse: + +- **Co-location leaks.** Two unrelated instructions in the same document both enter + context together. The folder boundary doesn't help once a file is open. +- **Navigation invites wandering.** Build an Obsidian-style web of interlinks and the + agent follows links into documents it didn't need, accumulating unrelated + instructions on the way. +- **Prose hides intent.** Markdown is written for humans. An agent can't cheaply tell + which paragraph is a hard rule, which is background, and which is stale. + + +The instinct to fix poisoning with *more structure in the same medium* — more folders, +more interlinks, more navigational paths — usually increases surface area for drift. +The medium is the problem, not the organization. + + +## The fix: structure the model, shrink the surface + +Three shifts move context poisoning from "constant" to "rare": + + + + Store context as **JSON / structured records** with named fields, not markdown. + Agents navigate structured data far more reliably — it looks like code, and the + boundaries between facts are explicit. → [doc_types & schemas](/concepts) + + + Instead of loading files, the agent **searches** for exactly the records it needs + and gets those back — nothing co-located, nothing adjacent. A search that returns + three entities can't poison the way a folder of thirty documents can. → + [Context search accuracy](/guide/context-search-accuracy) + + + Related facts link through **declared edges** (a target plus a stated meaning), + not through "these files are near each other." The agent traverses a relationship + on purpose, not by proximity. → [related_to edges](/concepts) + + + +## What this looks like in practice + +Instead of a `payments/` folder the agent browses, each service is a record it +retrieves by name, with typed edges to exactly the things it relates to: + +```json +{ + "doc_type": "service", + "id": "service:checkout", + "name": "Checkout", + "owner": "payments-team", + "related_to": [ + { "target": "runbook:checkout-oncall", "relationship_edge_meaning": "has runbook" } + ] +} +``` + +When the agent needs the checkout runbook, it follows *that edge* — it never has to +open a folder where an unrelated "always escalate to legal" note happens to live. + + +This is one of the three moves behind [Open Index](/why-open-index): structured +entities, agentic search instead of pre-injection, and per-concept updates. Each +independently reduces the poisoning surface. + + +## Checklist + +- [ ] Context lives in structured records, not free-form markdown. +- [ ] The agent retrieves narrow result sets by search, not whole files/folders. +- [ ] Relationships are explicit, typed edges — not folder co-location. +- [ ] Instructions and reference data are separated, so reference can't read as a command. + + + Making the agent's own retrieval reliable. + diff --git a/docs/guide/context-search-accuracy.mdx b/docs/guide/context-search-accuracy.mdx new file mode 100644 index 0000000..311169c --- /dev/null +++ b/docs/guide/context-search-accuracy.mdx @@ -0,0 +1,86 @@ +--- +title: How to improve context search accuracy +description: Why agentic search with navigation beats pre-injected RAG, and how field boosts, hybrid ranking, and schemas make retrieval precise. +--- + +An agent is only as good as the context it retrieves. If search returns +plausible-but-wrong records, the agent reasons confidently over the wrong facts — and +no amount of prompting fixes bad retrieval. This page is about making the agent's own +search accurate enough to trust. + +## Stop pre-injecting. Let the agent search. + +The common pattern is: your system runs RAG or prompt expansion, picks some chunks, +and injects them into the prompt. This has three problems: + +- **You guess wrong.** Your retrieval heuristic decides what's relevant *before* the + agent knows what it needs for this specific step. +- **It poisons.** Injected chunks the agent didn't ask for are exactly the surface for + [context poisoning](/guide/context-poisoning). +- **It's opaque.** Neither you nor the user can tell what actually drove the answer. + +The better model: **give the agent a search tool plus navigational meta-information**, +and make discovery its responsibility. It searches, reads what it got, decides whether +to search again or drill into a relationship — the same way a good analyst works. + + +This is agentic search over *all* your structured content, not a bolt-on RAG index. +In [Open Index](/agents/mcp) the agent gets `navigation_guidelines()` (what doc_types, +fields, and relationships exist), `search_brain()`, and `get_entity()` — enough to +navigate a domain it's never seen. + + +## Give the agent a map before the first query + +Retrieval accuracy jumps when the agent knows the *shape* of what it's searching. +Before its first query, hand it navigational context: + +- Which **doc_types** exist (`service`, `runbook`, `incident`…) and what each means. +- Which **fields** each carries, and which are searchable. +- Which **relationships** connect them, so it can traverse on purpose. + +With that map, the agent scopes searches (`search only incidents`), follows edges +deliberately, and stops guessing. Without it, every query is a blind shot. + +## Tune ranking so the right record wins + +Precision is also a ranking problem. Two levers matter most: + + + + Weight a match in `name` far above a match in a long `description`. A genuine + multiplier — a hit in a `boost: 6` title outranks a `boost: 1` body hit + 6-to-1 — so the record whose *identity* matches the query surfaces first. → + [Search configuration](/guides/search-configuration) + + + Keyword search nails exact names and identifiers; semantic search rescues queries + that describe a thing in different words than the record uses ("checkout is slow" + → "latency spike at payment"). Blend them — keyword-dominant by default, with a + semantic weight you raise when users describe rather than name. + + + +## Design schemas for retrieval + +Search accuracy starts at the schema, not the query: + +- Mark identity fields (`name`, `owner`, `status`) **syntactic** — exact/prefix + matching, high boost. +- Mark prose fields (`description`, `summary`) **semantic** — matched by meaning. +- Mark opaque blobs and internal ids **`none`** — stored but never searched, so they + can't add noise to results. + +A field that shouldn't influence ranking simply isn't indexed. That's the cheapest +precision win there is. + +## Checklist + +- [ ] The agent searches; you don't pre-inject a guessed context blob. +- [ ] It gets navigational meta-info (doc_types, fields, relationships) up front. +- [ ] Identity fields are boosted; noise fields are `search: none`. +- [ ] Ranking blends keyword + semantic to match both names and descriptions. + + + Keeping retrieved context correct as it grows. + diff --git a/docs/guide/determinism.mdx b/docs/guide/determinism.mdx new file mode 100644 index 0000000..69129fb --- /dev/null +++ b/docs/guide/determinism.mdx @@ -0,0 +1,71 @@ +--- +title: How to increase determinism in your AI agents +description: You can't make an LLM deterministic, but you can push variance out of everything around it — retrieval, control flow, and grounding — so behavior becomes repeatable. +--- + +**Determinism** is: same input, same output. LLMs are probabilistic, so you'll never +get bit-for-bit determinism from the model itself — and that's fine. The goal isn't a +deterministic *model*, it's a **repeatable system**: given the same situation, the +agent reliably does the same reasonable thing. Most of the variance you actually feel +comes from *around* the model, and that part you can control. + +## Where non-determinism actually comes from + + + + If the agent sees different context on different runs, it behaves differently — + even at temperature 0. Fuzzy, wide, or ranked-by-vibes retrieval is the largest + source of "why did it do something different this time?" + + + When the harness lets the model decide *everything* — including steps that should + be fixed — you get a different path each run. Some decisions belong in code, not + in the prompt. + + + Ungrounded reasoning fills gaps by guessing, and guesses vary. Grounded reasoning + over retrieved facts converges. + + + Temperature and sampling. Real, but usually the *smallest* contributor — and the + one people reach for first while ignoring the larger three. + + + +## Push variance out of the loop + + + + Deterministic ranking (explicit [field boosts](/guides/search-configuration), not + opaque relevance), narrow result sets, and addressed records mean the agent tends + to see the *same* context for the same query. Stable inputs → stable behavior. → + [Context search accuracy](/guide/context-search-accuracy) + + + Encode the parts of the workflow that are genuinely fixed as **control flow**, and + let the model decide only the genuinely open parts. Determinism where you can + afford it buys you reliability where you can't. → [The harness](/guide/the-harness) + + + An agent reasoning over specific, cited entities converges far more than one + improvising from a vague prompt. Grounding is a determinism lever, not just an + accuracy one. → [Provenance](/guide/provenance) + + + A critic sub-agent that rejects outputs unsupported by context collapses the tail + of weird one-off behaviors into a consistent "checked" band. + + + +## A useful reframing + +> You don't make the model deterministic. You shrink the space it's allowed to be +> non-deterministic in — by stabilizing its inputs (retrieval), fixing its scaffolding +> (harness), and grounding its reasoning (context). + +The more of the surrounding system is structured and repeatable, the more the model's +residual randomness stops mattering. + + + Agents that improve with use without drifting. + diff --git a/docs/guide/human-steering.mdx b/docs/guide/human-steering.mdx new file mode 100644 index 0000000..24308d1 --- /dev/null +++ b/docs/guide/human-steering.mdx @@ -0,0 +1,70 @@ +--- +title: What is human steering, and how to reduce it +description: Human steering is the hidden tax on agent autonomy. What causes it, why it caps value, and the context and harness changes that reduce it. +--- + +**Human steering** is every moment a person has to step in mid-task to redirect an +agent — clarifying an ambiguous instruction, pointing it at the right document, +approving a step it should have taken itself, or nudging it past a point where it +stalled. A little is fine. A lot is the difference between an agent that saves time +and one that just relocates the work. + +## Why steering is the real bottleneck + +When human steering is required for a task, it caps the **autonomy, speed, and value** +the agent delivers inside the workflow the human was trying to hand off. You wanted to +delegate the task; instead you're babysitting it. Three costs stack up: + +- **Throughput** — the agent runs only as fast as a human can attend to it. +- **Scale** — one operator can supervise a handful of agents, not hundreds. +- **Trust** — a system that needs constant correction never earns the autonomy to run + unattended, so it stays stuck at "supervised." + +The value of agents shows up specifically when you cross from *steered* to +*autonomous*. See the [autonomy spectrum](/guide/what-are-autonomous-agents). + +## Where steering comes from + +Most steering traces back to a handful of root causes — and notably, most are +**context and harness** problems, not model problems: + +| The human steps in because… | Root cause | Fix | +|---|---|---| +| "That's the wrong document / not what I meant" | Bad retrieval; guessed context | [Context search accuracy](/guide/context-search-accuracy) | +| The agent drifted onto an unrelated instruction | [Context poisoning](/guide/context-poisoning) | Structured, narrow retrieval | +| It stalled on a fuzzy multi-step decision | Weak harness; no drill-down | [The harness](/guide/the-harness) | +| "I don't trust this — show me why" | No [provenance](/guide/provenance) | Per-fact attribution | +| It acted on stale/contradictory info | [Conflicts & staleness](/guide/conflicts-and-staleness) | Per-concept updates + decay | + +## How to reduce it + + + + The most common steering — "you're looking at the wrong thing" — disappears when + the agent searches structured context itself instead of relying on a human (or a + guessed pre-injection) to hand it the right document. + + + Structured records and typed edges stop the agent wandering into unrelated + instructions, which removes a whole class of "why did it do that?" interventions. + + + Soft gates keep it from exiting early on fuzzy tasks; critic sub-agents catch bad + reasoning before a human has to. The agent recovers on its own instead of waiting + for a nudge. + + + Provenance lets the human verify *after* the fact instead of supervising *during* + it — moving them from the inner loop to the outer loop. + + + + +Reducing steering isn't about a smarter model. It's about removing the reasons a human +*has* to intervene — most of which live in the context layer and the harness around +the model. + + + + Making the agent's behavior repeatable enough to trust unattended. + diff --git a/docs/guide/index.mdx b/docs/guide/index.mdx new file mode 100644 index 0000000..e8c3032 --- /dev/null +++ b/docs/guide/index.mdx @@ -0,0 +1,70 @@ +--- +title: Building autonomous agents +description: A practical guide to the failure modes of autonomous agents and the context-engineering practices that fix them. +--- + +Most agent demos work. Most agents in production stall — they drift off task, need a +human to steer them past the hard step, or confidently act on stale context nobody +can trace. This guide is about the gap between the two, and specifically about the +**context layer**, which is where most of that gap lives. + + +This guide is vendor-neutral on the harness but grounded in a real system. Where a +practice maps onto a concrete capability, we point at how [Open Index](/why-open-index) +implements it — Open Index is the open-source context engine we extracted from doing +this work at scale. + + +## The two halves of an agent + +An autonomous agent is a loop over two things: + +1. **A harness** — the control flow, gates, retries, sub-agents, and evals that keep + the loop honest. See [The harness](/guide/the-harness). +2. **A context layer** — how the agent finds the right knowledge, keeps it current, + and cites it. This is where the rest of this guide focuses. + +Get the harness right and a wrong context layer still produces confident nonsense. +Get the context layer right and a thin harness suddenly goes a lot further without a +human in the loop. + +## What breaks, and where it's covered + + + + The agent picks up unrelated instructions and drifts. Fix it at the data model, + not with more folders. + + + Retrieval that returns plausible-but-wrong context. Make discovery the agent's + job, with navigation. + + + Knowledge that self-contradicts as it grows. Structure updates per concept. + + + Users can't trust what they can't trace. Attach a source to every fact. + + + The autonomy tax. What steering is, why it happens, and how to reduce it. + + + Same input, different output. Where to push variance out of the loop. + + + Agents that get better with use by writing back what they learn. + + + Soft gates, critic sub-agents, and in-session evals around the context layer. + + + +## The one idea underneath all of it + +If there's a single thread through this guide, it's this: + +> **Don't feed your agent context. Give it structured, searchable, attributable +> context and make discovery its job.** + +Everything else — less poisoning, less steering, more determinism, real provenance — +follows from that shift. The next pages break it down failure mode by failure mode. diff --git a/docs/guide/provenance.mdx b/docs/guide/provenance.mdx new file mode 100644 index 0000000..b30da0b --- /dev/null +++ b/docs/guide/provenance.mdx @@ -0,0 +1,69 @@ +--- +title: How to ensure provenance in your AI agents +description: Why users can't trust context they can't trace, and how per-fact attribution and citable retrieval build a proof-of-work agents can defend. +--- + +Users don't trust an agent because it sounds confident. They trust it when they can +**see why it did what it did** — the specific piece of context behind the action. +Provenance is that trail. Without it, every answer is "trust me," and adoption stalls +exactly where the stakes are highest: legal, healthcare, finance, infrastructure. + +## The problem provenance solves + +As you collate more documents, finding *which* reference the agent used gets harder: + +- The agent read across several documents; which sentence actually drove the action? +- Was that fact current, or an old copy from a stale file? +- Who asserted it, and how confident should we be? + +When you can't answer those on demand, you can't put a **proof-of-work** in front of +the user — and without proof-of-work, they can't trust the output. That single gap +caps how much you can hand off to the agent. + +## Attribution belongs on the fact, not the document + +The fix is to attach provenance to each **fact**, so it travels with the fact into +every answer: + + + + Each entity has a stable id. An answer can cite `service:checkout` precisely — + not "somewhere in the payments folder." → [entities](/concepts) + + + Attach the source and confidence when a fact is written — a connector, an import, + an agent, a human. In [Open Index](/agents/mcp), writes carry a provenance block + (`asserted_by`, `confidence`), and bulk imports attribute a whole batch at once + (`--asserted-by import:jira`). → [populating entities](/guides/populating-entities) + + + Because the agent retrieves discrete, addressed records — not a blob of merged + text — every retrieved fact can be shown to the user with its id and source. The + proof-of-work assembles itself from what was actually fetched. → + [Context search accuracy](/guide/context-search-accuracy) + + + +## Provenance is also an audit tool for *you* + +The same trail that builds user trust lets you debug the agent. Local fetch analytics +record what context each client retrieved, how often, which queries returned nothing, +and where latency or failures cluster. When an agent acts wrong, you can see the +context it pulled — instead of reconstructing what it "must have" used. → +[MCP analytics](/agents/mcp) + + +Zero-result searches are a gift: they show precisely what your users asked for that +your knowledge base couldn't answer — i.e. what to model next. + + +## Checklist + +- [ ] Every fact is individually addressable and citable. +- [ ] Writes carry source + confidence (who asserted this, how sure). +- [ ] The agent can produce a proof-of-work listing the exact records it used. +- [ ] You can audit, after the fact, what context an action was based on. + + + Reducing the autonomy tax now that context is trustworthy. + diff --git a/docs/guide/self-learning-loops.mdx b/docs/guide/self-learning-loops.mdx new file mode 100644 index 0000000..208dce0 --- /dev/null +++ b/docs/guide/self-learning-loops.mdx @@ -0,0 +1,77 @@ +--- +title: How to build self-learning loops in your AI agents +description: Agents that get better with use by writing what they learn back into a structured, validated knowledge base — without the drift of appending to prompts or markdown. +--- + +A **self-learning loop** is an agent that gets better the more it's used — not by +retraining the model, but by **capturing what it learns and making that learning +available to its future self** (and to every other agent on the same knowledge base). +Done well, it's compounding. Done naively, it's how agents poison themselves. + +## The naive version (and why it drifts) + +The tempting approach is to append learnings to a prompt or a running markdown file: +"remember that checkout uses the new payment provider." It works for a day, then: + +- The file grows unbounded and starts [poisoning](/guide/context-poisoning) context. +- New learnings [contradict](/guide/conflicts-and-staleness) old ones with no + resolution. +- There's no [provenance](/guide/provenance) — you can't tell what the agent taught + itself versus what a human verified. + +Unstructured write-back turns your knowledge base into exactly the mess this whole +guide is about avoiding. + +## The structured version + +Close the loop through the **same structured, validated store** the agent reads from — +so learning is a first-class write, not a growing text blob: + + + + When the agent discovers something durable, it writes an **entity** (or updates + one) — validated against the schema, addressed by id, carrying provenance. Not a + line appended to a doc. → [put_entity](/agents/mcp) + + + A new fact about `service:checkout` **updates** that record. The knowledge base + stays correct instead of growing a pile of contradictory notes. → + [Conflicts & staleness](/guide/conflicts-and-staleness) + + + Wire the write-back to fire at the end of a session — e.g. a Stop hook that records + what was learned via `put_entity`. That's the "continuously improving" part: it + happens without anyone remembering to do it. → [populating entities](/guides/populating-entities) + + + Provenance (`asserted_by`, `confidence`) marks what the agent taught itself versus + what a human confirmed — so you can trust, review, or decay agent-written facts + differently. → [Provenance](/guide/provenance) + + + +## Why the store matters more than the trigger + +The trigger (a hook, a cron, an end-of-task step) is easy. What makes the loop *safe* +is that it writes into a store that **validates, addresses, and attributes** every +fact — so more usage makes the knowledge base sharper, not noisier. A learning loop +over unstructured files amplifies drift; a learning loop over a structured brain +compounds quality. + + +Because every agent on the same brain reads the same store, one agent's learning +becomes every agent's context. The loop isn't just self-improving — it's +*fleet*-improving. → [connected knowledge layer](/why-open-index) + + +## Checklist + +- [ ] Learnings are written as validated, addressed entities — not appended text. +- [ ] New facts update existing records instead of accumulating. +- [ ] Write-back is triggered automatically (hook / end-of-session). +- [ ] Agent-asserted vs human-verified facts are distinguishable via provenance. +- [ ] Agent-written facts are subject to review and/or decay. + + + See how every piece fits into building an autonomous agent. + diff --git a/docs/guide/the-harness.mdx b/docs/guide/the-harness.mdx new file mode 100644 index 0000000..f511c4b --- /dev/null +++ b/docs/guide/the-harness.mdx @@ -0,0 +1,93 @@ +--- +title: The harness for autonomous agents +description: The control-flow scaffolding around the model — soft gates, critic sub-agents, in-session evals — and where the context layer fits. +--- + +The model is the engine. The **harness** is everything around it that turns a +capable-but-erratic engine into a reliable system: the control flow, the guardrails, +the retries, the sub-agents, and the evals. A strong harness is often the difference +between an agent that demos and one that ships. + + +The [context layer](/why-open-index) is *one component* of the harness — a critical +one, but not the whole thing. This page covers the rest, and how it wraps the context +layer. + + +## Components that earn their keep + +### Soft gates against early exits + +Agents love to declare victory early — returning a partial answer, skipping a +verification step, or stopping before the task is actually done. A **soft gate** is a +checkpoint that asks "are the exit conditions genuinely met?" before the agent is +allowed to finish, and sends it back if not. + +Unlike a hard rule, a soft gate is itself a judgment step — it can reason about +whether the work is complete for *this* task, which is what makes it robust to fuzzy, +non-repeated workflows (the same ones where agents otherwise stall — see +[Drill-down limitations](/why-open-index)). + +### Critic sub-agents for in-session evals + +A second agent whose only job is to **attack the first agent's output** before it +reaches the user: does the reasoning follow from the retrieved context? Is any claim +unsupported? Did it use stale or conflicting knowledge? + +Running evals *in-session* — not just offline on a benchmark — catches failures at +the moment they happen, when they're still cheap to fix. Independent critics also +counter the single-model failure mode where the agent is confidently wrong and has no +mechanism to notice. + +### Retrieval as a tool, not a preamble + +The harness should give the agent a **search tool** and let it discover context, +rather than pre-computing context and stuffing it into the prompt. This is both a +harness decision and a context-layer decision — covered in +[Context search accuracy](/guide/context-search-accuracy). + +## How the pieces compose + +``` + ┌─────────────────────────────────────────────┐ + │ Harness │ + │ │ + │ soft gates ─┐ ┌─ critic sub-agents │ + │ ▼ ▼ │ + │ ┌────────────────┐ │ + │ task ───▶ │ agent loop │ ───▶ output │ + │ └────────────────┘ │ + │ │ ▲ │ + │ search │ │ facts + provenance │ + │ ▼ │ │ + │ ┌────────────────┐ │ + │ │ context layer │ ◀── the brain │ + │ └────────────────┘ │ + └─────────────────────────────────────────────┘ +``` + +The context layer is the agent's memory and knowledge; the harness is its judgment +and self-control. You need both — a perfect harness over a poisoned context layer +still ships confident nonsense, and a perfect context layer under a naive harness +still exits early and never checks its work. + +## Where to start + +If you're building a domain agent from scratch, the highest-leverage order is usually: + + + + Structured, searchable, attributable context removes the largest class of + failures. Start at [Why Open Index](/why-open-index). + + + One sub-agent reviewing outputs against retrieved context catches most of what + slips through. + + + Stop early exits on the fuzzy, multi-step tasks where autonomy matters most. + + + Let the agent write back what it learns. See [Self-learning loops](/guide/self-learning-loops). + + diff --git a/docs/guide/what-are-autonomous-agents.mdx b/docs/guide/what-are-autonomous-agents.mdx new file mode 100644 index 0000000..bf2105c --- /dev/null +++ b/docs/guide/what-are-autonomous-agents.mdx @@ -0,0 +1,64 @@ +--- +title: What are autonomous agents? +description: A working definition of autonomous agents, the human-in-the-loop spectrum, and what it actually takes to remove the human. +--- + +An **autonomous agent** is a system that pursues a goal by repeatedly deciding its +own next action — choosing tools, gathering information, and adapting — rather than +executing a fixed script. The word doing the work is *deciding*: a workflow follows +steps you wrote; an agent chooses steps you didn't. + +## The autonomy spectrum + +"Autonomous" is not binary. Most real systems sit somewhere on a spectrum defined by +**how often a human has to intervene**: + +| Level | The human… | Example | +|---|---|---| +| Assisted | drives; the agent suggests | Autocomplete, copilots | +| Supervised | approves each meaningful action | "Agent proposes, human clicks run" | +| Steered | is pulled in when the agent gets stuck | Most "agents" in production today | +| Autonomous | reviews outcomes, not steps | Handles the whole task, reports back | + +The jump that creates business value is **Steered → Autonomous** — and the thing +that blocks it is almost never raw model capability. It's the context layer and the +harness around the model. See [Human steering](/guide/human-steering). + +## Removing the human in the loop + +"Remove the human" is a misleading goal if it means *no human ever*. The right goal +is to **move the human from the inner loop to the outer loop** — from approving every +step to reviewing outcomes and correcting the system. + +Three things have to be true before that's safe: + + + + No pre-injection, no human deciding what to paste in. The agent searches and + discovers. See [Context search accuracy](/guide/context-search-accuracy). + + + Facts are current, non-conflicting, and carry provenance, so an outcome can be + audited without a human reconstructing what the agent "must have" used. See + [Provenance](/guide/provenance) and [Conflicts & staleness](/guide/conflicts-and-staleness). + + + Soft gates stop early exits; critic sub-agents catch bad reasoning in-session, + before it reaches the user. See [The harness](/guide/the-harness). + + + +Get those three right and the human's job shifts from *steering* to *supervising the +system* — which is where autonomy actually pays off. + +## Domain agents raise the bar + +General agents can lean on the model's world knowledge. **Domain agents** — legal, +healthcare, sales, infrastructure — can't: the knowledge they need is private, +structured, and changing. That's exactly why the context layer matters more the more +specialized the agent is, and why a [structured context engine](/why-open-index) +tends to be the highest-leverage investment for a domain agent. + + + What sits around the model to make the loop reliable. + diff --git a/docs/index.mdx b/docs/index.mdx index b948efb..aaddf0e 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -13,6 +13,21 @@ context graph of your domain. A brain is **domain-agnostic** — model a support your infrastructure (`service → runbook`), or anything else. You define the concepts; Open Index stores them, searches them, and draws the map. + + + + If this is useful, a star helps others find it — and helps us keep building in the open. + + Install, spin up the bundled example brain, and open the explorer in a few minutes. diff --git a/docs/why-open-index.mdx b/docs/why-open-index.mdx new file mode 100644 index 0000000..5ffa01c --- /dev/null +++ b/docs/why-open-index.mdx @@ -0,0 +1,110 @@ +--- +title: Why Open Index +description: Why file- and markdown-based context management breaks down for autonomous agents — and what structured context management solves. +--- + +While building domain-specific agents — legal, healthcare, sales, infrastructure — +dependency on humans to steer your agents becomes the bottleneck on autonomy and +accuracy. If you're still using a markdown / file-system context layer, or +pre-injected context, it's only a matter of time before you hit these walls. + +## The four walls of file-based context + + + + When you operate with 50+ markdown files in your context space — even neatly + distributed by folder — the agent tends to wander between documents, pick up + unrelated instructions, and drift off task. + + The obvious reaction is to build a navigational path for every use case and an + Obsidian-style document structure with interlinks and references. But unrelated + instructions sitting in the *same* document still pull the agent in a different + direction. The structure doesn't contain the blast radius. + + + When the task isn't a repeated workflow but a slightly fuzzy decision-tree + navigation that requires a chain of thought, the agent often can't navigate + past a certain point without steering. + + And once human steering is required, it caps the autonomy, speed, and value your + agent delivers inside the workflow the human was trying to hand off. + + + Finding *which* reference the agent used to take an action gets harder as you + collate more documents. When you can't show the user the specific piece of + context behind a proof-of-work, they can't trust the agent's responses. + + + When context is spread across many markdown files, updates become non-trivial: + multiple documents hold related context and there's no deterministic way to link + them or update them accurately. Knowledge goes stale and self-contradicts. + + + +## The unlock: structured context management + +If those problems sound familiar, the biggest unlock is changing how you think +about context: + + + + Context should live in **JSON / structured documents**, not markdown. Agents + navigate better when things look like code. + + + Your agent shouldn't be *fed* context. It should be given **meta-information + about the available context** and take on the responsibility of searching and + discovering the right context itself. + + + Optional connections and correlations between data points should be a + **deliberate part of your context design**, not an accident of which files sit + in the same folder. + + + +## How we got here + +We solved this at large enterprises for infrastructure debugging. Beyond the work on +the overall harness, the context handling came down to three moves — each of which +is now a primitive in Open Index: + +- **Designed entity models for the use case.** These became document schemas in an + OpenSearch-backed index. → [doc_types & schemas](/concepts) +- **Gave the agent a search tool with pre-injected navigational context** instead of + running RAG or prompt expansion ourselves and shipping the result into the prompt + (think agentic search that spans every category of content). → + [search_brain & navigation_guidelines](/agents/mcp) +- **Incremental update and deletion per doc_type** instead of stuffing context into + one document and driving updates from it. → [storage: file vs index](/guides/search-configuration) + +It took multiple iterations to find the right form factor — so we open-sourced the +standard so anyone building on similar lines doesn't have to rediscover it. + + + The open-source context engine for autonomous agents. + + + +This is **not the whole harness** — it's one piece of it. Around this context layer, +a production agent still needs work like soft gates to avoid early exits and critic +sub-agents for in-session evals. See the [Agent Guide](/guide/index) for how the +pieces fit together. + + +## Keep reading + + + + The four primitives — doc_type, doc_schema, entity, connector. + + + Build your first brain in a few minutes. + + + The structured-context playbook, in depth. + + + Where the context layer sits in a full autonomous-agent harness. + + From c3bc32502814ff7ecff976ecc86b6983606de94f Mon Sep 17 00:00:00 2001 From: sidPhoenix17 Date: Mon, 10 Aug 2026 13:30:24 -0700 Subject: [PATCH 2/2] docs: set intro video title Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.mdx b/docs/index.mdx index aaddf0e..33d4774 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -17,7 +17,7 @@ concepts; Open Index stores them, searches them, and draws the map. width="100%" height="420" src="https://www.youtube.com/embed/MMd2lcCRjzE" - title="Open Index" + title="Introducing Open Index — An Open-Source Structured Context Layer for AI Agents" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen