Own the Loop — Part I: The Architecture of Organizational Intelligence
20 July, 2026
Introduction
When organizations deploy AI agents at scale, the decision to use them is usually the obvious one. What they rarely anticipate is what those agents leave behind. Every action an agent takes is also a trace: what it saw, what it chose, what context it worked from, and what happened next. That record accumulates in the background whether you planned for it or not. Most organizations treat it as operational exhaust. This series makes the case that it is something more useful, a measurable record of how your organization actually thinks.
This is the first of four articles in Own the Loop. Over the course of this research, we asked whether a company can own the mechanistic interpretability of its own AI, whether it is possible not just to deploy agents but to genuinely understand how those agents make decisions, in terms that are specific to the organization they work for. The answer required moving through four phases in sequence. Before you can understand what, an AI judges with, you need a record of its judgments. Before you can distill that record into something inspectable, you need to understand what a language model does with it at the level of its internal representations. And before you can open a model and read its internals, you need a model you own. This article covers the first phase: building the record and reading its shape.
Ours lives in a system called Engram, CodeNinja's sovereign organizational memory store, a shared Postgres-backed database where every agent writes its decisions, evaluations, corrections, and observations at runtime as structured JSON. After a few months of continuous operation across our own commercial work, including prospecting, coaching, and evaluation, that store held 6,573 live rows across 142 collections spread across eight team member namespaces. We had never designed this as a dataset. The agents wrote it as a by-product of doing work. The question was what it could tell us about how the organization operates.
The answer was: quite a lot, and not primarily about content.
The experiment and the stack
The analysis had two constraints from the start. Nothing could leave our own hardware, both for confidentiality and because the exercise would lose its point if an external system touched our decision history. And we would not build infrastructure for a problem that did not require it. 6,573 rows at 384 embedding dimensions is approximately 10 megabytes of vectors. That fits in RAM thousands of times over on a laptop. A vector database earns its complexity when you are serving approximate nearest-neighbor queries at production scale. For a single analytical pass, NumPy is the vector database.
The stack ran entirely local: sentence-transformers using BAAI/bge-small-en-v1.5 (a 384-dimensional retrieval-optimized embedding model running on Apple MPS) for embedding; umap-learn for dimensionality reduction to a 2D projection with n_neighbors set to 30, min_dist to 0.08, and cosine metric for visualization; and scikit-learn's HDBSCAN for clustering on the full 384-dimensional vectors. Model download to final map took approximately 15 minutes, nothing leaving the machine.
The non-obvious work was serialization, deciding how to turn each JSON row from Engram into a string the embedding model could process meaningfully. Each row was flattened to key/value fragments two levels deep; HTML was stripped (several agents had persisted entire rendered dashboards into their memory, and embedding markup corrupts the semantic signal); documents were capped at 1,200 characters; and every document was prefixed with [person / collection].
That last decision is a real methodological trade-off and should be named as one. Including the namespace and collection prefix means cluster assignments partially reflect metadata rather than pure semantic content, which inflates how cleanly clusters separate by person. We accepted it because collection names carry genuine signal about workflow identity. But it means the two readouts answer different questions: cluster membership tells you about workflow structure; cosine distances between mean namespace vectors tell you about content similarity. Both are informative but they should not be conflated.
Two practical complications in the export itself are worth noting for anyone running a similar analysis. The SQL endpoint on the store silently capped results at 1,000 rows per query regardless of the requested limit, a behavior that would have produced a quietly truncated dataset without any error. The fix was to aggregate each namespace server-side using jsonb_agg before returning it, which brought the full payload through in one call. The second was soft deletes: filtering for deleted_at IS NULL reduced the dataset by 37 rows from the raw count, and that filtered number is the honest denominator for any analysis meant to reflect the live operational state of the organization's memory.
What the geometry showed
UMAP plus HDBSCAN on the 6,573 points produced 10 dense clusters, with 3,767 points classified as noise, roughly 57 percent of the total. That fraction is normal for heterogeneous text at this cluster size threshold. The named clusters are dense, coherent cores; they are not a partition of the whole dataset.
The largest non-synthetic cluster contained 504 points, and 497 of them came from a single namespace: the founder's, where an evaluator agent scores the entire team's decisions on a daily basis. The second largest captured one team member's outbound prospecting engine. Three more clusters mapped to another member's government-sector pursuit workflow. The pattern was consistent: clusters were not just person-associated but person-pure, even accounting for the metadata prefix effect. People's agent fleets do genuinely different work, and the geometry of their decision traces recovers the organization's operating structure without being told what that structure is.
For any organization running agents, the immediate implication is this: the map you did not design is already being built. If your agents are doing differentiated work, their decision traces will separate in latent space. If they are not, the map will show that too. The geometry of agent memory is a structural audit of how the organization actually operates, distinct from what the org chart or deployment documentation says.
There was a second result that deserves more attention than interpretability literature typically gives it. 841 rows had been generated by an agent running self-play, synthetic practice decisions written by the model for training purposes rather than decisions made in live commercial work. These rows received no special treatment in the embedding; the only difference was their textual content. They formed their own cluster, entirely separate from real decision traces. The geometry detected synthetic origin without any label flagging it. For any team mixing synthetic and real data in training pipelines or evaluation sets, this is both a warning and a useful property: contamination is detectable geometrically and does not require manual audits to surface.
The third result came from computing a mean embedding vector for each person's namespace and measuring pairwise cosine distances. The two people in the organization whose agent fleets were closest semantically, at a cosine distance of 0.032 versus 0.04 to 0.07 for the rest of the core team, were the founder and the team member whose fleet the founder most directly shaped through co-developed prompts and decision vocabulary over time. Influence of that kind shows up in the embeddings. It is not a coincidence or an artifact. It is a measurement of shared decision policy, made legible by the geometry of the memory store.
The outlier was equally informative. One team member sat 0.19 to 0.38 cosine distance from everyone else. Two reasons compounded: only two rows of footprint in the store, and work focused on US partnerships rather than the Pakistan and KSA prospecting that dominated the rest of the organization's commercial operations. The second of those facts is the real finding. The most geographically distinct part of the commercial organization was also the least instrumented by agents. A gap in the map is not an absence of activity. It is an absence of instrumentation, which is itself a governance observation: the organization was not recording one of its most active functions.
One summary statement covers the whole picture. The organization shares a dialect while individuals own territories. All core team centroids sat within 0.03 to 0.07 cosine distance of each other, reflecting the shared prompt templates and decision vocabulary every agent fleet inherited. Yet the cluster structure split cleanly by person. The healthy version of agent governance has both properties: a shared vocabulary that keeps agent behavior coherent across the organization, and distinct workflow territories that confirm agents are doing differentiated work rather than duplicating effort. The geometry makes both visible.
What this means for the work ahead
We tend to think about AI governance as a question of policy, approval workflows, and escalation paths. Those are necessary. But the more foundational governance question is whether the organization can see what its agents are doing in aggregate, in terms specific enough to act on. A monthly activity summary is not governance. A measurable map showing which workflows agents instrument, whose decisions they encode, where the gaps are, and how decision vocabulary propagates across the organization is considerably closer to it.
Embeddings are a starting point, not an endpoint. They tell you what the data looks like in latent space; they do not model the reasoning behind individual decisions. The question this series was building toward was whether a language model reading these decision traces builds internal representations of organizational judgment, and whether those representations can be found, named, and potentially influenced. The map built here is the answer key every subsequent experiment needs to validate against. The shape of how you work is the baseline. What a model does with that shape is the next question.
Umar Bilal, Co-Founder, CodeNinja
The pipeline described here is two Python scripts. The agents wrote more memory overnight.
When we tried to grab the concept and steer it, a random vector beat our carefully derived direction at every amplitude we tested.
