Agentt + Verifiable DAGs - A Vision for Transparent Software Creation đ
· Categories: agentt, ai, provenance, computation, devops, vision
Here at agentt, weâve been pushing the boundaries of AI-assisted development. Watching an AI collaborator refactor code based on NHI framework guidelines or spin up infrastructure using a Reflex is pretty magical. But even magic needs scrutiny. We started asking ourselves: how could we prove, beyond doubt, exactly what happened? How could we guarantee that a complex, automated, AI-driven workflow is not just correct, but also entirely transparent and reproducible?
Weâve made great strides with agentt in structuring AI collaboration using the NHI framework (our MUST/SHOULD guidelines) and encapsulating capabilities within Reflexes. These bring order to the often chaotic world of development automation. Yet, we felt a deeper level of trust was needed, especially as AI takes on more critical tasks. What if the very fabric of our execution engine could guarantee transparency and reproducibility?
This quest led us down a fascinating path, towards a foundational shift in how we think about computation itself. Weâre moving beyond merely structured processes towards provably verifiable computation. The core ideas? Content-Addressing and Verifiable Directed Acyclic Graphs (DAGs). Buckle up. đ
Foundational Shift: Embracing Content-Addressable Computation
Think Git Blobs, but for Every Computational Artifact and Step.
The first pillar of this vision is content-addressing. Instead of identifying data by a filename or a database ID, we identify it by a cryptographic hash of its actual content â its unique, immutable fingerprint. Change a single byte, and the fingerprint changes completely.
This isnât just a storage trick. When every piece of data, every code snippet, every configuration file, every input, and every output is represented as a âContent-Addressable Artifactâ, it gains a verifiable identity. You donât need to trust that config.yaml wasnât tampered with; you can simply verify its fingerprint matches the expected one. Immutability isnât an add-on; itâs inherent.
This forms the bedrock. In this world, history isnât something you meticulously record; itâs something that automatically emerges from the verifiable identities of the artifacts themselves.
The Architecture of Trust: Verifiable DAGs and Isolated Contexts
Okay, so data has fingerprints. How does computation fit in?
Imagine computation less like a linear script and more like a Blockchain ledger, but for general-purpose tasks (without necessarily the distributed consensus burden, but retaining the verifiable chain-of-events).
âVerifiable Computational Stepsâ are deterministic transformations that take specific, content-addressed artifacts as input and produce new content-addressed artifacts as output. Because both inputs and outputs have unique fingerprints, the step itself becomes verifiable and reproducible. Run the same step with the same input artifacts (verified by their fingerprints), and you must get the same output artifacts (with their corresponding fingerprints).
These steps naturally link together based on their inputs and outputs, forming a Verifiable Directed Acyclic Graph (DAG). Each node represents an artifact (data/code), and each edge represents a verifiable computational step. The entire graph tells an immutable story of how a final result was derived.
To make this work robustly, each computational step operates within an âIsolated Computational Contextâ (or a âVerifiable State Snapshotâ). This context precisely defines the exact, fingerprinted versions of all inputs needed for that step. No ambiguity, no reliance on external state â just the verifiable artifacts required to produce the next verifiable artifact(s).
The emergent properties here are powerful:
- Automatic Lineage: The DAG is the lineage. Tracing how any artifact was created is a matter of walking the graph.
- Guaranteed Idempotency: Running the same computational step (or entire graph) with the same fingerprinted inputs always yields the same fingerprinted outputs.
- Maximally Effective Caching: If an artifact with a specific fingerprint already exists anywhere in the system (memory, disk, remote store), thereâs no need to recompute it. The DAG structure makes finding reusable results trivial.
- Inherent Auditability: The entire process is transparent and mathematically verifiable. âTrust meâ is replaced by âVerify the graph.â
agentt Reimagined: Running on Verifiable Rails â¨
So, how does this radical foundation connect back to agentt? Imagine agentt Reflexes evolving from simple commands or scripts into immutable entries within this verifiable computational ledger.
The mapping is surprisingly elegant:
- Reflexes: Trigger specific verifiable computational steps or entire sub-graphs within the DAG. Running a Reflex doesnât just do something; it provably adds to the computational history.
- NHI Framework: Rules (MUST/SHOULD) become provable constraints checked during DAG execution. A step might require input artifacts that satisfy certain schema constraints (verified via their content hash) or might only be allowed if a preceding âlintingâ step produced a specific âsuccessâ artifact.
- AI Interactions: This is where it gets really exciting. Prompts sent to an LLM? They become content-addressed artifacts. The LLMâs response? Another content-addressed artifact. The parameters used (temperature, model ID)? Also artifacts. The entire interaction is captured as immutable, linked nodes within the DAG. You can cryptographically verify exactly what question was asked and what answer was given.
Letâs revisit generating a blog post:
agentttriggers the âGenerate Postâ Reflex (a verifiable procedure).- The procedure fetches recent git commits. These commits, identified by their SHAs (already content-addressed!), form input artifacts.
- It constructs a prompt using a template and the commit data. This prompt becomes a new artifact with its own fingerprint.
- It calls an LLM interaction step, passing the prompt artifactâs fingerprint and model parameters (also artifacts).
- The LLM response is captured as another artifact.
- A formatting step takes the LLM response artifact and produces the final Markdown artifact.
The result isnât just the blog post; itâs the entire, verifiable DAG documenting its creation, including the precise data fetched and the exact AI interaction.
A Glimpse of Whatâs Coming⌠đ
This isnât just a theoretical exercise; this fusion of structured AI interaction and verifiable computation represents the direction weâre actively building, the next evolution for agentt.
Why go to all this trouble? Because the potential applications are vast and transformative:
- Radically Transparent CI/CD: Imagine builds where every dependency, compiler flag, and test result is a verifiable artifact in a DAG. Build provenance is guaranteed.
- Reproducible ML & Science: Track datasets, model training parameters, and results with cryptographic certainty. Share not just results, but the verifiable process that generated them.
- Auditable Data Pipelines: Know exactly how your data was transformed at every stage, with verifiable proof.
- Trustworthy AI Systems: Move beyond hoping AI follows instructions to verifying its inputs, outputs, and parameters within a larger computational context.
- Secure Software Supply Chains: Verifiably trace the origin and processing of every component.
Weâre moving from opaque automation, even sophisticated AI-driven automation, towards glass-box, verifiable computational processes. Itâs a complex undertaking, but we believe itâs essential for building truly trustworthy automated systems.
Stay tuned as we continue laying this foundation, one content-addressed block at a time. The future of development is verifiable. đ
This article was originally created in commit 7e36a6433e516a9b7c4a2dcbab86e4b86b0d86ee, prompted by commit 7e36a6433e516a9b7c4a2dcbab86e4b86b0d86ee.