<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Santhosh Reddy]]></title><description><![CDATA[Let's talk about tech, AI and building systems. Agents as a service, Governed intelligence and everything in between.]]></description><link>https://blog.omlabs.co</link><image><url>https://cdn.hashnode.com/uploads/logos/61f11c69e247b2151e620d41/2fdc9643-3bf2-418d-a020-09c26ed1525f.jpg</url><title>Santhosh Reddy</title><link>https://blog.omlabs.co</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 18:13:44 GMT</lastBuildDate><atom:link href="https://blog.omlabs.co/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Quantum Kernels: What They Actually Do]]></title><description><![CDATA[It's late, I've had three tabs of Qiskit docs open all evening, and I just spent an hour convincing myself I finally understood quantum kernels — only to realize halfway through writing this that one ]]></description><link>https://blog.omlabs.co/quantum-kernels-what-they-actually-do</link><guid isPermaLink="true">https://blog.omlabs.co/quantum-kernels-what-they-actually-do</guid><category><![CDATA[Quantum]]></category><category><![CDATA[quantum computing]]></category><category><![CDATA[Kernel]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Wed, 05 Aug 2026 12:08:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/a622e1d3-b028-46d6-bdf9-8ab163f09d45.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It's late, I've had three tabs of Qiskit docs open all evening, and I just spent an hour convincing myself I finally understood quantum kernels — only to realize halfway through writing this that one part of my mental model was slightly off. I'm writing it down anyway, because getting it wrong out loud is the fastest way I know to actually fix it.</p>
<p>Here's the thing that pulled me in: classical machine learning is, underneath almost everything, kernels wearing different costumes. And once you see that, quantum kernels stop looking like magic and start looking like a very specific, very narrow bet.</p>
<h2>Classical ML never really left the dot product</h2>
<p>Start simple. A dot product between two vectors tells you how aligned they are — that's the oldest similarity measure there is. SVMs took that idea and got smarter: instead of comparing raw vectors, they compare vectors after mapping them into some richer, higher-dimensional space, using what's called the kernel trick. You never actually build that high-dimensional space — you just compute a kernel function <code>k(x, z)</code> that behaves like a dot product inside it. That's the whole trick.</p>
<p>Then transformers came along, and I think people miss that attention is doing the same thing, just learned instead of hand-picked. A query vector and a key vector get dot-producted, softmaxed, and used to weight values — that's a kernel computation repeated at every layer, over every token, with the feature map (the Q/K projection matrices) trained instead of fixed like an RBF kernel would be. GPT and Claude aren't a departure from kernel methods. They're kernel methods stacked twenty layers deep with the similarity function learned end to end.</p>
<h2>So where does quantum come in</h2>
<p>A quantum kernel does the exact same job — measure similarity — but the "richer space" is a quantum Hilbert space instead of a hand-designed feature space. You take a classical feature vector, run it through a parameterized quantum circuit (the feature map), and it lands as a quantum state. Similarity between two data points becomes the overlap between their two quantum states, and you get that overlap by literally preparing one state, un-preparing it with the inverse of the other circuit, and checking how often you land back at all-zeros. Do that a few thousand times (shots), count how often you hit zero, and that frequency is your kernel value. Qiskit's <code>Sampler</code> primitive is what actually gives you those raw measurement outcomes — this is a sampling problem, not an expectation-value problem, which took me a minute to get straight since Qiskit also has an <code>Estimator</code> for a different class of question entirely.</p>
<h2>Correcting myself: it's not "better data," it's a smarter similarity matrix</h2>
<p>Going into this, I'd have told you quantum kernels feed "better data" into a classical model. That's not quite right, and saying it out loud made me catch it. What the classical model actually receives is a precomputed kernel matrix — a grid of pairwise similarity scores — and it trains an ordinary SVM on top of that matrix exactly like it would on an RBF kernel matrix. The quantum part never touches the model's weights or its optimizer. It only changes what "similar" means before the classical machinery ever starts.</p>
<h2>The honest state of the science</h2>
<p>IBM's 2021 Nature Physics result, from Yunchao Liu, Srinivasan Arunachalam, and Kristan Temme, is the real anchor here: they built a classification problem based on the discrete logarithm problem and proved no classical algorithm can beat random guessing on it in polynomial time, while a quantum kernel solves it cleanly. That's a genuine, rigorous, end-to-end result — not a toy. But it's also the exception that proves the rule. A widely cited 2026 quantum-industry outlook flatly calls quantum ML "one of the most hyped quantum applications of the 2018–2022 era" and "one of the most thoroughly deflated," pointing to a string of dequantization results where classical algorithms caught up to supposed quantum speedups once someone looked closely enough.</p>
<p>I'm not deep enough into the encoding schemes yet to have opinions worth defending on which feature maps are worth building. That's next. But I no longer think of quantum kernels as a better ML model — I think of them as a different lens for measuring similarity, one that's provably powerful on a handful of exotic, structured problems and unproven everywhere else.</p>
<hr />
<p>That's the part worth remembering: quantum kernels don't replace your model, they replace your notion of "similar." Whether that new notion is worth the qubits is still, mostly, an open question — and that's exactly why it's worth prototyping instead of just reading about.</p>
]]></content:encoded></item><item><title><![CDATA[I Recreated IBM, ORNL, and Cleveland Clinic's Quantum Chemistry Paper on Fusion Fuel — Down to a Real IBM Hardware Job]]></title><description><![CDATA[On July 6, 2026, IBM, Oak Ridge National Laboratory, and Cleveland Clinic announced something that had never been done before: the first known quantum computer simulation of the chemistry inside a fus]]></description><link>https://blog.omlabs.co/i-recreated-ibm-ornl-and-cleveland-clinic-s-quantum-chemistry-paper-on-fusion-fuel-down-to-a-real-ibm-hardware-job</link><guid isPermaLink="true">https://blog.omlabs.co/i-recreated-ibm-ornl-and-cleveland-clinic-s-quantum-chemistry-paper-on-fusion-fuel-down-to-a-real-ibm-hardware-job</guid><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Thu, 30 Jul 2026 11:44:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/23fddab1-f2b6-4f1f-8ee9-4ff534c4d47f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>On July 6, 2026, IBM, Oak Ridge National Laboratory, and Cleveland Clinic announced something that had never been done before: the first known quantum computer simulation of the chemistry inside a fusion reactor's fuel-breeding blanket. Not a full reactor. Not a full plasma. Nine molecular snapshots of a molten salt called FLiBe, run through a quantum-centric pipeline to figure out how tightly a rare hydrogen isotope — tritium — sticks to it.</p>
<p>I rebuilt the entire pipeline from scratch, on my own proxy clusters, ending on a real IBM quantum chip. Full interactive breakdown, every phase, every equation, every job ID, is here: <a href="https://artifacts.omlabs.co/s/flibe-fusion-blanket-chemistry-ornl-cleveland-clinic-ibm-quantum-recreation-1785410017498"><strong>FLiBe Fusion Blanket Chemistry — full interactive lab notebook</strong></a>. This post is the narrative version of that notebook.</p>
<h2>Why fusion energy has a tritium problem</h2>
<p>Fusion reactors that use the deuterium-tritium reaction need a steady supply of tritium to keep running. The problem is that tritium barely exists in nature — most of what's on Earth was made artificially, and a working fusion plant has to breed its own. The proposed solution is a "blanket" of molten salt, FLiBe (a mixture of lithium fluoride and beryllium fluoride), wrapped around the plasma. Neutrons thrown off by the fusion reaction hit lithium-6 atoms in the salt and split them into helium and tritium. That much is settled chemistry.</p>
<p>What's not settled is the second half: getting the tritium back out. Whether tritium stays chemically locked inside the salt or is recoverable depends on subtle electron-level binding chemistry — and that chemistry involves tightly correlated electrons in a hot, ionic, constantly shifting liquid, which is exactly the kind of system classical density functional theory struggles to get right. This is a real bottleneck standing between where fusion energy is today and a commercially viable reactor, and it's explicitly named as a target of the U.S. Department of Energy's Genesis Mission, which is trying to unify supercomputing, AI, and quantum computing across DOE's 17 national labs to speed up exactly this kind of materials discovery.</p>
<h2>What the original team actually computed</h2>
<p>It's worth being precise here, because it's easy to over-read a headline like "quantum computer models fusion fuel." The ORNL/Cleveland Clinic/IBM team did not simulate a reactor. They took nine frozen molecular snapshots of small FLiBe clusters — a technique called quantum-centric supercomputing, the same general family of methods IBM and Cleveland Clinic have used to model 12,635-atom proteins — and computed the electronic energy of each cluster twice: once with a tritium atom attached, once without. The difference between those two numbers is the binding energy, and its sign and size tell you whether tritium wants to stay in the salt or leave it.</p>
<p>Cleveland Clinic's presence on a fusion-energy paper looks strange at first glance, until you know their quantum computing partnership with IBM already exists for large-scale biomedical simulation — the same wave function embedding and sample-based quantum diagonalization techniques transfer directly from protein chemistry to molten salt chemistry. It's a methods collaboration, not a fusion lab pivoting into medicine.</p>
<h2>Rebuilding it: nine salt clusters, twenty-seven structures</h2>
<p>I couldn't use the original team's exact AIMD-generated geometries, so I built chemically faithful proxy clusters instead: nine FLiBe conformations, 21–23 atoms each, in three versions per conformation — the bare anion, the anion with tritium attached, and a check structure — giving 27 total structures. Everything downstream traces back to one equation:</p>
<pre><code class="language-plaintext">E_bind = E(FLiBeT⁻) − E(FLiBeF⁻)
</code></pre>
<p>Tritium is defined as leaving the salt as a bare T⁺ ion with zero electronic energy, matching the paper's convention. A strongly negative <code>E_bind</code> means tritium is energetically comfortable staying put; understanding exactly how negative, and why, is the whole point of the calculation.</p>
<h2>The physics underneath: from Schrödinger's equation to qubits</h2>
<p>Electrons aren't little balls sitting at fixed points — they're wave-like probability distributions, and the rulebook governing how they behave is the Schrödinger equation, <code>Hψ = Eψ</code>. Solving it exactly for anything bigger than a hydrogen atom is intractable, because electrons don't just respond to the nuclei around them, they also actively avoid each other — a subtle effect called electron correlation that mean-field methods systematically underestimate. FLiBe is an unpleasant test case for this: polarizable fluoride ions, strongly ionic Be–F bonds, and mixed ionic-covalent character all at once.</p>
<p>To make this computable at all, chemists use second quantization: instead of tracking exact electron positions, you track which orbital "seats" are occupied, using creation and annihilation operators. The Hamiltonian becomes a sum of one-electron terms (kinetic energy plus nuclear attraction) and two-electron terms (electron-electron repulsion), both computed directly from the molecule's geometry using a program called PySCF. Map each spatial orbital to two qubits — one for spin-up, one for spin-down — via the Jordan-Wigner transformation, and you've turned a chemistry problem into something a quantum computer can, in principle, represent. The paper's largest single fragment needed 33 orbitals, which is 66 qubits.</p>
<p>I ran RHF (restricted Hartree-Fock) mean-field calculations on all 27 clusters, in the same 6-31+G(d) basis set the original paper used — a dictionary of Gaussian orbital shapes, with extra "diffuse" functions (the <code>+</code>) that matter specifically because fluoride ions are soft and spread out, and polarization functions (the <code>d</code>) that let orbitals distort away from perfect spherical symmetry. All 27 converged cleanly.</p>
<h2>Cutting the molecule without losing the chemistry</h2>
<p>Here's the part that makes this tractable at all: you never try to solve the whole 21-23 atom cluster as one giant quantum problem. You cut it into fragments, one per atom, using a technique called Embedded Wave Function theory (EWF). Each atom gets localized orbitals via intrinsic atomic orbitals (IAO), a "bath" of neighboring orbital character via a DMET Schmidt decomposition, and then an MP2-based bath expansion that pulls in just enough extra orbital space to keep the fragment chemically accurate. The output is a small, self-contained Hamiltonian per fragment, sized by its active space, M.</p>
<p>Not every fragment is the same size. Lithium and beryllium fragments stayed small, M≈8-15. Fluoride-centered fragments, because fluorine's lone pairs are so polarizable and mix heavily with beryllium's orbitals, ballooned to M≈27-33. This is where a simple rule decides the whole pipeline's shape: fragments with M &lt; 13 get solved exactly, classically, with full configuration interaction (FCI) — the gold-standard, no-compromises answer. Fragments with M ≥ 13 are too large for classical exact diagonalization to handle cheaply, so they go to the quantum path instead.</p>
<h2>Where quantum actually enters: LUCJ and sample-based quantum diagonalization</h2>
<p>The quantum method here is not VQE, and that distinction matters. Instead, each large fragment gets a Local Unitary Cluster Jastrow (LUCJ) circuit — a fixed-structure ansatz, seeded directly from a classical CCSD calculation's T1 and T2 amplitudes, run at circuit depth <code>n_reps=1</code>. That circuit is sampled thousands of times, either on a noiseless Aer simulator or on real IBM hardware, producing a long list of measured electron-configuration bitstrings.</p>
<p>From there, sample-based quantum diagonalization (SQD) takes over, entirely classically: it recovers the physically valid electron configurations from the noisy sample, builds a compact configuration-interaction Hamiltonian restricted to just those configurations, and diagonalizes it on a normal computer. The "ext" in ext-SQD means the subspace gets extended afterward with single excitations and rediagonalized, squeezing out a bit more accuracy. The quantum processor's only job is generating a good list of candidate configurations to search over — the actual energy comes from classical linear algebra. I solved 108 fragments this way across the full 27-structure set.</p>
<h2>The finding that actually matters</h2>
<p>Here's the headline result, and it's a slightly uncomfortable one if you were hoping quantum hardware would be the star: comparing ext-SQD against exact classical FCI on the fragments small enough to check both ways, the two methods agreed to within roughly 0.7 kcal/mol, and to about 0.3 kcal/mol mean absolute deviation on conformational energy differences specifically. That's excellent agreement — the quantum-assisted solver is doing its job correctly.</p>
<p>But compare the embedded-fragment approach as a whole against uncut, full-molecule reference methods, and the gap jumps to around 110 kcal/mol on binding energy. The bottleneck isn't the quantum computer. It's how you slice the molecule into fragments in the first place. I found the same qualitative pattern in my own recreation, and it's worth sitting with: the most expensive, most hyped part of this pipeline — the quantum circuit — was never the weak link. The unglamorous classical embedding step was.</p>
<h2>My numbers against the published band</h2>
<table>
<thead>
<tr>
<th>Metric</th>
<th>My recreation</th>
<th>Paper's reported band</th>
</tr>
</thead>
<tbody><tr>
<td>Mean E_bind (9 pairs)</td>
<td>−286 kcal/mol</td>
<td>≈ −134 to −380 kcal/mol</td>
</tr>
<tr>
<td>Direction</td>
<td>Strongly bound tritium</td>
<td>Strongly bound tritium</td>
</tr>
<tr>
<td>ext-SQD vs FCI (solver error)</td>
<td>≤ 0.7 kcal/mol</td>
<td>Comparable order</td>
</tr>
<tr>
<td>Embedding bias vs full-molecule</td>
<td>~110 kcal/mol</td>
<td>Dominant error source</td>
</tr>
<tr>
<td>SQD fragments solved</td>
<td>108</td>
<td>All M ≥ 13</td>
</tr>
</tbody></table>
<p>The mean landed inside the published range and the direction matched exactly, which is the qualitative result that actually matters. It is not a quantitative table match — my proxy geometries weren't the paper's exact AIMD-sampled structures, so the specific numbers were never going to line up atom-for-atom.</p>
<h2>Real IBM hardware, twice</h2>
<p>Everything above can run on a simulator. I wanted the real thing too, and it took two attempts.</p>
<p>The first job went to <code>ibm_marrakesh</code> — job <code>d9kuplqbr2fc73e7u0g0</code> — and sat in queue for about 30 minutes before hitting my own 1,800-second queue ceiling and getting cancelled. Zero actual QPU time was burned; it never got past waiting in line. The lesson was blunt: the backend with the least-pending queue beats the backend with the biggest marketing qubit count, every time.</p>
<p>The second attempt went to <code>ibm_fez</code> instead. A 26-qubit LUCJ circuit (the M=13 fragment), transpiled to a depth of 752 with 1,170 two-qubit gates, 4,096 shots, submitted through Qiskit Runtime's SamplerV2. Total wall time 64.3 seconds, with 38.2 seconds actually in the RUNNING state — well inside my 120-second budget, kill switch never triggered. The fragment energy came back at −52.126 Hartree on hardware versus −52.117 Hartree in noiseless simulation, a difference of about 5.6 kcal/mol. That's real hardware noise, and it's a small, honest gap — nowhere near enough to change the qualitative conclusion, but a useful reminder that noiseless simulation and a real chip are not interchangeable numbers.</p>
<h2>The honest scoreboard</h2>
<table>
<thead>
<tr>
<th>Claim</th>
<th>Status</th>
</tr>
</thead>
<tbody><tr>
<td>Same chemistry (FLiBe / tritium / anion stoichiometry)</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Same method family (EWF + LUCJ + SQD)</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Same basis set (6-31+G(d))</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Same fragment split rule (FCI &lt; 13, SQD ≥ 13)</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Qualitative "tritium strongly bound" direction</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Real IBM Sampler hardware path</td>
<td>✅ Yes</td>
</tr>
<tr>
<td>Exact paper AIMD cluster geometries</td>
<td>❌ No — proxy structures</td>
</tr>
<tr>
<td>Full M≈33 / 66-qubit fragment coverage</td>
<td>❌ No — largest fragments skipped</td>
</tr>
<tr>
<td>Paper's full shot campaign (10⁵–10⁶ shots)</td>
<td>❌ No — 4,096 shots, one job</td>
</tr>
<tr>
<td>Complete EWF binding-energy reconstruction tables</td>
<td>~ Partial — RHF-level binding only</td>
</tr>
</tbody></table>
<h2>What this actually teaches</h2>
<p>I didn't discover new fusion chemistry, and I didn't run the paper's full computational campaign — nobody should read a solo recreation as replacing peer-reviewed national-lab work. What I did confirm, end to end, on my own infrastructure, is that this exact pipeline — Hartree-Fock, embedded wave function fragmentation, a classical FCI/CCSD ladder, LUCJ circuits, sample-based quantum diagonalization, and a real IBM chip at the end — runs correctly and reproduces the paper's central, slightly humbling lesson: in quantum-centric chemistry, right now, the embedding decision matters more than the qubit count. Getting the cut right is the hard part. The quantum computer is just very good at the part that's left over once you've cut correctly.</p>
<p>Every phase, every fragment Hamiltonian, every job ID, and the seven-episode "Salt Keepers" learning story I wrote alongside it are in the full notebook: <a href="https://artifacts.omlabs.co/s/flibe-fusion-blanket-chemistry-ornl-cleveland-clinic-ibm-quantum-recreation-1785410017498"><strong>FLiBe Fusion Blanket Chemistry — full interactive lab notebook</strong></a>.</p>
]]></content:encoded></item><item><title><![CDATA[Quantum and AI Are a Two-Way Street]]></title><description><![CDATA[Quantum computing and AI are usually described as two separate races. They're not. Once you see both directions at once, the whole conversation about "when will quantum matter" changes shape.
Directio]]></description><link>https://blog.omlabs.co/quantum-and-ai-are-a-two-way-street</link><guid isPermaLink="true">https://blog.omlabs.co/quantum-and-ai-are-a-two-way-street</guid><category><![CDATA[AI]]></category><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[quantum computing]]></category><category><![CDATA[Quantum]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 18 Jul 2026 05:40:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/9cb1670d-3922-4f83-91e2-c9cc22a5039c.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Quantum computing and AI are usually described as two separate races. They're not. Once you see both directions at once, the whole conversation about "when will quantum matter" changes shape.</p>
<h2>Direction one: AI is what's actually keeping quantum hardware alive</h2>
<p>This is the direction people expect, but the mechanism isn't what most assume. AI isn't making quantum computers faster in the way a better GPU makes a model faster. It's making them survive long enough to finish a calculation at all.</p>
<p>Qubits decohere — they lose their information to noise almost as fast as you create it — which is why error correction is the whole ballgame right now, not a side detail. Google Quantum AI recently published a machine-learning approach, led by researcher Volodymyr Sivak, that continuously recalibrates a quantum processor mid-computation instead of pausing to do it.</p>
<p>IBM has gone a step further and used LLMs, through a workflow called OpenEvolve, to search through thousands of candidate error-correction code designs and surface ones humans hadn't tried — including one requiring far fewer physical qubits than the previous best in its class. Neither of these is AI helping quantum compute faster. It's AI helping quantum computers stay coherent long enough to compute at all.</p>
<h2>Direction two: what quantum actually gives AI, and it's not speed</h2>
<p>Here's where the expected story breaks down. The obvious assumption is that quantum hardware will someday train AI models faster or run inference better. That's not the real mechanism, and I think it's worth being precise about why.</p>
<p>Start with what AI is actually doing when it does scientific work. When a model predicts how a material behaves, how a protein folds, or how a climate system evolves, it isn't solving the underlying physics from scratch — it's acting as a surrogate.</p>
<p>A stand-in that imitates a full simulation, at a fraction of the cost, because it's learned the mapping between a system's structure and its behavior from examples it's already seen. That's why these models are so fast: they replace a simulation that would take days with a prediction that takes minutes, across materials discovery, drug design, climate modeling.</p>
<p>But a model built this way is only as good as what it learned from. And in the hardest cases — strongly correlated systems, the ones where electron interactions genuinely matter — the training data itself usually comes from classical approximations that are incomplete by construction. The model faithfully learns the approximation. It also faithfully inherits its blind spots.</p>
<p>This is where quantum enters, and I want to flag this as a forecast, not a settled result. Chi Chen of IonQ and Matthias Troyer of Microsoft have proposed, in an IEEE Spectrum essay, that a quantum computer's most valuable near-term job may not be answering scientific questions directly.</p>
<p>It may be generating small amounts of extremely accurate ground-truth data — data that's prohibitively expensive to compute classically — specifically in the regimes where the classical approximation fails. Train the classical AI model on that quantum-generated data, and in their framing, you get the accuracy quantum can deliver, at the speed AI can deliver it.</p>
<p>Troyer has described the near-term goal elsewhere as "teaching quantum physics to AI" — using quantum hardware to refine models that are already pretrained classically, rather than replacing classical computation outright.</p>
<h2>The two directions converge on the same target</h2>
<p>Both fields are ultimately aimed at the same thing: describing nature accurately enough to act on it. They're just approaching from opposite ends. AI learns the patterns. Quantum supplies the ground truth those patterns are learned from.</p>
<p>The likely endpoint isn't "quantum or AI." It's quantum teaching AI — one supplying the accuracy, the other supplying the reach and the speed. Where exactly the line falls between what AI can already approximate well enough, and what genuinely needs quantum-grade data, is still being drawn in real time. I don't think anyone — including the people proposing this — knows precisely where that line sits yet.</p>
<p>That's not a hedge. It's the actual research frontier right now, and it's a more interesting place to be building than either "quantum is everything" or "quantum is nothing" gives it credit for.</p>
]]></content:encoded></item><item><title><![CDATA[What Enterprises Actually Do With Quantum Computers Today]]></title><description><![CDATA[Let me start by clearing up something that confuses almost everyone the first time they look into this: no company is running its supply chain on a quantum computer. Nobody's pricing derivatives on on]]></description><link>https://blog.omlabs.co/what-enterprises-actually-do-with-quantum-computers-today</link><guid isPermaLink="true">https://blog.omlabs.co/what-enterprises-actually-do-with-quantum-computers-today</guid><category><![CDATA[quantum computing]]></category><category><![CDATA[Quantum]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 18 Jul 2026 05:31:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/5a64722d-d26b-440c-958a-91e3a979afb0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let me start by clearing up something that confuses almost everyone the first time they look into this: no company is running its supply chain on a quantum computer. Nobody's pricing derivatives on one in production. If a vendor tells you otherwise, ask them what "production" means to them, because I guarantee the answer involves an asterisk.</p>
<p>What's actually happening is more interesting than either the hype or the dismissal gives it credit for. So let's walk through it — not "quantum will change everything," and not "quantum is a decade-away curiosity," but what teams are literally doing on Monday mornings right now.</p>
<h2>The workflow nobody talks about: building the team before the machine is ready</h2>
<p>JPMorgan Chase runs the largest quantum effort of any US bank through a unit called FLARE — the Future Lab for Applied Research and Engineering. What's notable isn't the qubit count. It's the sequencing.</p>
<p>Marco Pistoia, who leads the group, has said the point of investing now is becoming "quantum-ready," not quantum-productive. That's a real distinction, and it's the first thing I want to sit with: in this field, the workflow often precedes the payoff by years.</p>
<p>JPMorgan has poured $100 million into Quantinuum, built an internal bench of over fifty physicists and mathematicians, and published peer-reviewed work on portfolio optimization and Monte Carlo acceleration — all while publicly acknowledging that an internal study found limited practical advantage so far.</p>
<p>That combination — real budget, real publications, honest limits — is what a mature enterprise program looks like. Compare that to Goldman Sachs, which has taken a visibly smaller, slower path on the same technology. Two banks, same tools available, very different bets on timing.</p>
<p>The actual day-to-day work in these teams looks like: pick a narrow, well-defined subproblem (constrained portfolio optimization, say), formulate it as a quantum circuit using a toolkit like Qiskit, run it on rented time on a trapped-ion machine — JPMorgan has used Quantinuum's H1 and H2 systems — and compare the output against a classical baseline. Most weeks, classical wins. The team publishes anyway, because the point is building institutional muscle memory for the day the comparison flips.</p>
<h2>The workflow in pharma: quantum as one stage in a much longer pipeline</h2>
<p>Drug discovery gives you a cleaner picture of the actual research process. IBM and Cleveland Clinic recently ran a variational quantum eigensolver — a hybrid algorithm that splits work between a quantum processor and classical density functional theory — on a 303-atom mini-protein, using IBM's 156-qubit Heron chip. That's a genuinely new capability: the first protein-scale quantum chemistry simulation of its kind.</p>
<p>The workflow there is: classical methods handle the bulk of the molecule, and the quantum processor gets called in specifically for the electron interactions that classical approximations handle badly. Boehringer Ingelheim runs a similar partnership with Google Quantum AI.</p>
<p>AstraZeneca has reported a 20x speedup on a specific drug-discovery workflow segment using IonQ hardware through AWS — not an end-to-end simulation, but one stage of a much longer pipeline getting meaningfully faster.</p>
<h2>What I actually tell you to take away</h2>
<p>If there's one pattern across finance, pharma, logistics, and materials science, it's this: nobody is replacing their classical stack. They're identifying the one subroutine in an existing workflow where classical methods hit a wall — a combinatorial explosion, an electron correlation problem, a search space too large to brute-force — and inserting a quantum step there, then handing the result back to classical infrastructure. Hybrid isn't a compromise; right now, it's the entire architecture.</p>
<p>I'll admit I used to find this unsatisfying — I wanted the clean story where quantum computers just start winning outright. It took me longer than I'd like to accept that the actual value right now is optionality: teams that built this muscle in 2023 and 2024 are the ones positioned to move fast whenever the hardware crosses the threshold. The teams that waited for proof before starting are, by definition, starting later. In a field where the talent takes years to build and the useful hardware window is still genuinely uncertain, being early and wrong for a while is cheaper than being right but late.</p>
]]></content:encoded></item><item><title><![CDATA[We've Always Lived in Loops. AI Agents Are Just Catching Up.]]></title><description><![CDATA[Look at your day honestly and it's not a list of tasks. It's a loop. Wake up, check phone, assess what changed overnight, act, wait, check again. Open Slack, scan for anything that needs you, respond,]]></description><link>https://blog.omlabs.co/we-ve-always-lived-in-loops-ai-agents-are-just-catching-up</link><guid isPermaLink="true">https://blog.omlabs.co/we-ve-always-lived-in-loops-ai-agents-are-just-catching-up</guid><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 04 Jul 2026 05:32:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/2a5b1d62-41ee-476d-b85e-9d6b8afba20a.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Look at your day honestly and it's not a list of tasks. It's a loop. Wake up, check phone, assess what changed overnight, act, wait, check again. Open Slack, scan for anything that needs you, respond, close it, come back in twenty minutes. Even the "deep work" hours are a loop: write, run it, see what broke, fix it, run it again. We don't experience life as a sequence with a start and an end. We experience it as a cycle we keep re-entering, each time with slightly more context than the last.</p>
<p>Professional work is even more obviously this. A support engineer's whole job is watch-the-queue, triage, resolve, watch again. A trader's whole job is watch-the-price, evaluate against a thesis, act or wait, watch again. A sales rep's pipeline is a loop with a memory — you don't cold-call the same lead the same way twice, because the last call changed what you know. None of this is new. What's new is that we finally have a name for building the same pattern into software, and for a few years, most of us building AI agents didn't have it.</p>
<h2>The loop I built before it had a name</h2>
<p>A while back I was building an agentic system for analysis and trading in capital markets — something that could read a thesis, watch a name, and act on it without me babysitting every tick. The naive version was obvious and useless: poll the price every few minutes and ask a model "anything interesting here?" That burns tokens and produces noise, not judgment.</p>
<p>What actually worked was inverting it. Instead of the agent watching the market, I had the system set a price alert <em>with the reasoning attached</em> — not just "notify me at $142," but the actual context: why that level mattered, what thesis it would confirm or break, what to check when it fired. The alert sat dormant, cheap, doing nothing. When price crossed the line, that stored context triggered the agent, and the agent woke up already knowing why it was awake. It didn't have to re-derive the situation from scratch — it picked up the loop mid-cycle, with memory.</p>
<p>At the time there was no term for this. I wasn't "designing a loop," I was just trying to stop paying for an agent to stare at a chart. A decent amount of the actual work was mechanical — weighting which price zones mattered more than others, deciding what counted as a "trigger" worth waking the agent for versus noise to ignore, a fair bit of scoring logic sitting quietly behind what looked like a simple alert.</p>
<h2>Then, this June, it got a name</h2>
<p>On June 7, 2026, Peter Steinberger — the developer behind OpenClaw — posted that developers should stop prompting coding agents by hand and instead design the loops that prompt those agents, a post that reportedly hit around 6.5 million views within days. Boris Cherny, who leads Claude Code at Anthropic, had already been saying something similar on stage, describing his own job as writing loops that prompt Claude rather than prompting it directly. Days later, Google's Addy Osmani turned the idea into something teachable, and the term "loop engineering" stuck.</p>
<p>The definition that emerged matches what I'd stumbled into without knowing it: a loop is an agent that acts, observes what actually happened — a test result, an error, a market move — and adjusts, repeating until the work is accepted or blocked, rather than a human re-prompting it at every step. The best writeups converge on the same non-negotiables: a specific goal with a testable stopping condition, tools the agent can actually use, context management so it doesn't drown in its own history, and explicit exits so it doesn't run forever. My price-alert-with-context setup was, unknowingly, a crude version of exactly that: goal (react to this level), trigger (price crosses it), memory (the thesis attached to the alert), stop condition (the trade decision itself).</p>
<h2>Why this is the real unlock for autonomy</h2>
<p>Prompting is you doing the thinking, one exchange at a time. A loop is you doing the thinking <em>once</em>, well, and then trusting the system to re-apply it every time the world changes. That's a small mechanical shift with a large consequence — it's the difference between an assistant you operate and a system that operates itself inside boundaries you set. Every genuinely autonomous agent I've seen actually hold up under real conditions was a loop with good judgment baked into its stopping conditions, not a bigger model with a longer prompt.</p>
<p>The dream isn't agents that respond faster. It's systems that keep watching, keep deciding, keep remembering why — long after you've stopped thinking about the problem yourself.</p>
]]></content:encoded></item><item><title><![CDATA[What Makes an AI Agent Actually Think — Not Just Reason]]></title><description><![CDATA[I've been sitting with this for a while. We talk a lot about agents that reason, agents that plan, agents that learn. But the architecture underneath most of what gets shipped is glorified document lo]]></description><link>https://blog.omlabs.co/what-makes-an-ai-agent-actually-think-not-just-reason</link><guid isPermaLink="true">https://blog.omlabs.co/what-makes-an-ai-agent-actually-think-not-just-reason</guid><category><![CDATA[AI]]></category><category><![CDATA[ai agents]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 27 Jun 2026 05:30:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/1fb451a6-14d9-40ab-a253-ff85b5cc4dd7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been sitting with this for a while. We talk a lot about agents that reason, agents that plan, agents that learn. But the architecture underneath most of what gets shipped is glorified document lookup with a language model slapped on top. RAG pipelines. Markdown files. Vector embeddings over a flat corpus. These aren't bad tools — they're just nowhere near enough to produce what most people actually want: an agent that forms genuine insight, surfaces non-obvious connections, and improves on its own.</p>
<p>Real creativity — in humans and, increasingly, in agents — comes from two things: pattern recognition across well-structured memory, and metacognition that continuously refines how the system thinks. Neither is easy to engineer. But both are buildable.</p>
<hr />
<h2>Memory Architecture Is the Foundation for Pattern Recognition</h2>
<p>The first mistake I made when building agentic systems was treating memory as a retrieval problem. Something happens, you store it. Something gets asked, you retrieve the closest match. The problem is that flat retrieval doesn't produce insight. It produces recall.</p>
<p>The research is catching up to this intuition. Graph-based memory has emerged as the real frontier in 2025–2026, and the reason is structural: it encodes relationships between memory elements, not just the elements themselves. You can traverse from a concept to a causal chain to a historical analogy, following edges rather than scanning similarity scores. That traversal is what produces the kind of thinking humans associate with depth.</p>
<p>What this looks like in practice: instead of storing "Agent flagged anomaly on trade X," you store that event as a node connected to the market condition that preceded it, the decision the agent made, the outcome that followed, and every similar event in the past. Now when a pattern emerges, the agent isn't searching for the closest document — it's walking a graph to find structural recurrence.</p>
<p>Frameworks like Mem0 (which released graph memory support and a dual-store architecture combining vector and knowledge graph in late 2025) and Zep (temporal knowledge graph for agent memory) are building exactly this. The multi-hop reasoning gains are measurable. When tested on temporal queries and multi-hop reasoning tasks, graph-based retrieval showed improvements of 20+ points over flat retrieval in recent benchmarks.</p>
<p>The implication for how you build: your memory design should be the first architecture decision, not the last. If you're starting with a vector store and asking "what should we index?" you're already behind. The questions are: what entities matter, what relationships connect them, and what traversal logic lets the agent discover what it doesn't know to look for?</p>
<hr />
<h2>Metacognition: The Loop That Doesn't Stop at Execution</h2>
<p>The second piece is trickier, and I'm more uncertain about it than the memory stuff — so take this as a working model rather than settled engineering.</p>
<p>Metacognition in AI agents is essentially loop engineering. It's not enough to have the agent act and then evaluate. The really interesting systems run a second loop that observes the first one — watching how the agent used tools, what chains of reasoning it followed, where it got confused or inefficient — and then uses that observation to update behavior.</p>
<p>The closest real-world analog is dreaming. Humans consolidate learning, process failures, and form generalizations during sleep. In agentic AI, this has moved from metaphor to actual feature. Anthropic launched Dreaming for Claude Managed Agents in May 2026 — agents review their own past sessions during idle time, extract patterns from what worked and what didn't, and write memory notes that improve future performance without retraining. Harvey, the legal AI platform, reported a 6x improvement in task completion after enabling it. OpenAI followed with Dreaming V3 for ChatGPT on June 4, 2026, framing it as autonomous memory synthesis that replaces static saved memories with a self-updating model of the user.</p>
<p>The research mirrors this. The MARS framework (Metacognitive Agent Reflective Self-improvement) shows how agents can improve by abstracting normative rules from failures and deriving step-by-step strategies from successes — then synthesizing those into updated instructions. The key insight is that this loop doesn't require continuous online feedback or human intervention for every update. It can run asynchronously, batch-observing many sessions before surfacing a refinement. Human-in-the-loop approval gates can be added for higher-risk instruction changes.</p>
<p>What this means architecturally: build execution loops and observation loops as separate systems. The execution loop handles tasks. The observation loop watches the execution loop, classifies behavior patterns, and queues instruction updates for review. You're not building one agent — you're building an agent and the thing that watches and improves the agent.</p>
<hr />
<h2>The Models That Can Actually Do This</h2>
<p>None of this works without a model that can reason deeply across multiple steps. Pattern recognition in a graph requires following chains that aren't obvious at retrieval time. Metacognitive loops require the model to produce reliable self-assessments, not hallucinated ones.</p>
<p>The landscape for this is better than it's ever been, and more competitive than most people realize. Claude (Sonnet and Opus) still leads on long-horizon reliability and nuanced instruction following. But the open-weight frontier has compressed dramatically. In June 2026, GLM 5.2 from Zhipu AI tops the Intelligence Index at 51 among open-weight models; Kimi K2.7 Code from Moonshot leads on agentic MCP tool-use in long-horizon tasks; DeepSeek V4 Pro leads on raw SWE benchmarks and has reset the cost floor. The point isn't which model to pick — it's that the base reasoning capability to run genuine metacognitive loops is now available at price points that weren't viable a year ago.</p>
<hr />
<h2>What This Doesn't Mean</h2>
<p>I want to be honest about where this trajectory ends. Agents with structured graph memory and real metacognitive loops will outperform humans at well-defined, knowledge-intensive tasks. They already do in narrow domains. But the particular kind of creativity that produces genuinely new insight — a leap across domains that no training distribution would suggest, or a re-framing so unexpected it changes what questions are even worth asking — that's still rare in AI systems. And I'm not sure how close we are to it.</p>
<p>The architecture I've described makes agents smarter within the space of what they've experienced and observed. Real human creativity often starts outside that space entirely. That gap is worth respecting — both because it's honest, and because it points to where the interesting hard problems are.</p>
<p>The agents worth building right now are the ones that think well, not just the ones that respond quickly. Memory that's connected, not indexed. Loops that observe and improve, not just execute and stop.</p>
<p>The ceiling is higher than most current systems suggest. Build toward it.</p>
]]></content:encoded></item><item><title><![CDATA[Memory Is Half the Job of Building an Intelligent AI Agent]]></title><description><![CDATA[Human intelligence runs on two core systems: memory and creativity.
Everything else — reasoning, judgment, instinct — is built on top of those two. AI agents are no different. We talk endlessly about ]]></description><link>https://blog.omlabs.co/memory-is-half-the-job-of-building-an-intelligent-ai-agent</link><guid isPermaLink="true">https://blog.omlabs.co/memory-is-half-the-job-of-building-an-intelligent-ai-agent</guid><category><![CDATA[AI]]></category><category><![CDATA[agentic AI]]></category><category><![CDATA[ai memory]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 20 Jun 2026 02:51:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/5597bdfb-70de-4eb8-ab68-8b55ec31c8da.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Human intelligence runs on two core systems: memory and creativity.</p>
<p>Everything else — reasoning, judgment, instinct — is built on top of those two. AI agents are no different. We talk endlessly about the creativity side: better prompts, better reasoning chains, better tool use. Memory gets treated like plumbing. It isn't. It's half the job.</p>
<p>An agent without memory isn't an agent. It's a very articulate autocomplete that forgets you exist the moment the session ends. Real agentic behavior — the kind that gets better over time, that remembers what worked last quarter — needs memory architecture, not just a longer context window. Picking the wrong one is one of the most expensive mistakes you can make early, because it's painful to rip out later.</p>
<p>There isn't one right answer. There are four real patterns, each the right call for a different shape of problem.</p>
<h2>Chat History and Agent State</h2>
<p>This is the baseline — short-term working memory. The running conversation, current task state, maybe a scratchpad the agent writes to mid-execution. Cheap, fast, and what every agent has by default whether you designed for it or not.</p>
<p>Use it for: single-session tasks where continuity beyond "right now" doesn't matter. A coding agent mid-task, a support bot resolving one ticket.</p>
<p>Don't use it for: anything that needs to persist. The moment the agent needs to remember a preference from three weeks ago, working memory falls apart. Long-context models with large windows at flat pricing have made "just stuff more into context" cheaper than people assume for smaller agents — but that's a patch, not an architecture. It still resets.</p>
<h2>RAG and Vector Stores</h2>
<p>This is the default most teams reach for, and for good reason — embed your documents, retrieve by semantic similarity, stuff the top results into context. It's mature, well-tooled, and good at one thing in particular: surfacing the most <em>similar</em> piece of information to a query.</p>
<p>Use it for: large, relatively flat document corpora where similarity search is genuinely what you need — FAQ retrieval, support docs, anything where "find me the chunk that sounds like this question" is the actual task.</p>
<p>Don't use it for: anything requiring multi-hop reasoning or relationship-tracing. A vector store hands back a ranked list of similar chunks. It can't tell you that customer X uses product Y, which had an incident last month similar to a case from a different customer entirely. That's a structural limitation — flat similarity search can't traverse relationships it was never asked to encode.</p>
<h2>Knowledge Graphs (Neo4j and friends)</h2>
<p>This is the architecture for when relationships <em>are</em> the data. Entities, edges, multi-hop traversal — an agent can walk from a fact to a related fact, which a vector store fundamentally cannot do. The more advanced versions now treat time as a first-class dimension — facts get versioned, and the agent can reason about what <em>was</em> true versus what's true <em>now</em>.</p>
<p>Use it for: domains that are genuinely relational — fraud detection, compliance webs, anything where the value is in the connections between entities, not just the entities themselves.</p>
<p>Don't use it for: everything, which is the trap I almost fell into. Knowledge graphs are powerful and also heavy — schema design, entity extraction, ongoing graph maintenance. If your problem doesn't actually need multi-hop relational reasoning, you're paying graph-database tax for vector-store value.</p>
<h2>Wiki-Style Document Memory</h2>
<p>This is the one I don't see written about enough, probably because it's less novel than a graph and less default than RAG — but it's been the right answer for a system I recently built.</p>
<p>I was building a financial research and analysis system where the agent's memory is, functionally, a wiki: structured notes, reports, and insights, each its own document. The pattern is two-stage retrieval. First, the agent uses indexing and metadata filters to retrieve a <em>list</em> of candidate notes — titles, tags, summaries — without pulling full content. Then, based on that list, it retrieves the <em>full content</em> of only the notes actually relevant to the task.</p>
<p>I almost built this as a knowledge graph first. It felt like the "correct" engineering answer. It took me longer than I'd like to admit to realize research and analysis isn't fundamentally about traversing relationships between entities — it's about retrieving the right <em>documents</em> and reasoning over them as wholes. A graph would've fragmented exactly what made the notes useful: the analyst's full reasoning, written in one place.</p>
<p>The magic :</p>
<p>The real magic happened when i added neo4j style edges / connections between wiki style documents. The agents have become smarter with the ability to traverse through notes &amp; documents connected with relationships and relationship strengths.</p>
<p>Use it for: structured analytical work where documents are the natural unit of knowledge — research notes, investment theses, audit reports, anything a human analyst would also want to read whole, not as a fragmented graph node. It's also the most enterprise-friendly of the four: a wiki of notes is something a finance or research team can browse and manage directly, outside the agent entirely. That matters — memory only an engineer can inspect is memory the rest of the org doesn't trust.</p>
<p>Don't use it for: high-volume, low-structure data where indexing every chunk as a discrete "note" creates more overhead than value, or for problems that are genuinely relational rather than document-centric.</p>
<hr />
<p>Choosing the memory architecture that fits your agent's actual reasoning pattern — not the one that sounds most sophisticated on a slide — is, in my estimate, fully half the job of building an intelligent agent. The other half is creativity: reasoning, prompting, judgment under ambiguity. I'll get into that next week.</p>
<p>Get memory wrong and no amount of prompt engineering saves you. Get it right and the agent starts looking less like a clever autocomplete and more like something that's actually been paying attention.</p>
]]></content:encoded></item><item><title><![CDATA[Building effective and cost-efficient AI agents]]></title><description><![CDATA[There's a moment every builder hits — you've got access to powerful LLMs, a shiny new agentic framework, and the energy to automate everything. So you start building. Agents everywhere. Tools calling ]]></description><link>https://blog.omlabs.co/building-effective-and-cost-efficient-ai-agents</link><guid isPermaLink="true">https://blog.omlabs.co/building-effective-and-cost-efficient-ai-agents</guid><category><![CDATA[AI]]></category><category><![CDATA[agentic AI]]></category><category><![CDATA[llm]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Sat, 13 Jun 2026 06:21:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/61f11c69e247b2151e620d41/7204094a-e832-48b0-9ef6-b3f754ce6e30.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There's a moment every builder hits — you've got access to powerful LLMs, a shiny new agentic framework, and the energy to automate everything. So you start building. Agents everywhere. Tools calling tools. Memory layers on memory layers.</p>
<p>And then your cloud bill shows up.</p>
<p>I've been there. And honestly, watching companies like Microsoft and Uber publicly wrestle with runaway AI infrastructure costs was a wake-up call for me too. These aren't small teams fumbling around — these are organizations with some of the best AI engineers on the planet. And they're still figuring out how to make agentic systems not just <em>work</em>, but work <em>efficiently</em>.</p>
<p>So here's what I've personally been learning and unlearning.</p>
<hr />
<h2>1. Match the Model to the Job</h2>
<p>This one took me longer to internalize than I'd like to admit: you don't need Claude or GPT-4 for every single step in your pipeline.</p>
<p>A well-prompted DeepSeek or a capable flash-class model can get you 99% of the way there on tasks like classification, extraction, structured formatting, or simple reasoning — at a fraction of the cost. The moment I stopped treating LLM selection as a one-size-fits-all decision and started matching model capability to task complexity, costs dropped noticeably.</p>
<p>And here's the thing — as models have gotten better, I think many of us have quietly let our prompt engineering get lazier. That's a mistake. Strong prompting still matters enormously, especially when you're trying to squeeze real performance out of a lighter model. Don't outsource your thinking to the most expensive model available when a well-crafted prompt to a cheaper one does the job.</p>
<hr />
<h2>2. Context Engineering is Everything</h2>
<p>I've seen agents fail not because of bad models or broken logic — but because they were drowning in noise.</p>
<p>Dumping your entire knowledge base into context is not engineering, it's hoping. What you actually want is a clean, well-structured knowledge layer where the agent can <em>ask</em> for exactly what it needs — and receive back only what it needs, nothing more.</p>
<p>This applies to tools too. Every tool in your agentic system should be designed with surgical precision: clear inputs, scoped outputs, no data dumps. When an agent calls a tool and gets back a wall of loosely structured JSON, it has to spend tokens just making sense of it. That's waste you're paying for.</p>
<p>Good context engineering is the difference between an agent that reasons cleanly and one that hallucinates under the weight of its own context window.</p>
<hr />
<h2>3. Not Everything Needs an Agent</h2>
<p>This one is hard to say out loud in certain circles, but: <strong>most workflows don't need a full agent</strong>.</p>
<p>Agents are expensive by design. They carry instructions to handle many scenarios, they manage tools, they maintain memory, they loop until they reach a goal. All of that burns tokens — on every single run.</p>
<p>Before reaching for an agent, ask yourself: <em>can I solve this with a deterministic workflow, a few LLM calls with structured output, and some conditional logic?</em> More often than not, the answer is yes. A clean workflow with targeted LLM calls — one to extract, one to transform, one to summarize — is faster, cheaper, more debuggable, and honestly, easier to trust in production.</p>
<p>Build agents where genuine autonomy and adaptive reasoning are <em>required</em>. Not because it sounds impressive on a slide.</p>
<hr />
<h2>4. LLMs Are a Tool, Not the Default</h2>
<p>This is the underlying principle behind all of the above.</p>
<p>Just because a language model is accessible doesn't mean it's always the right tool. Regex handles pattern matching better than an LLM. A database query retrieves structured data more reliably than prompting a model to "find" something. Deterministic logic is more trustworthy for branching decisions than an LLM-reasoned if/else.</p>
<p>The best AI systems I've seen aren't the ones that use AI the most — they're the ones that use AI <em>precisely</em>, reserving it for the steps where natural language understanding, generation, or fuzzy reasoning actually adds something that code alone can't.</p>
<hr />
<h2>5. Build Small, Focused Sub-Agents — Then Orchestrate Them Well</h2>
<p>Here's something I've started doing that changed how my systems perform and what they cost: instead of building one big general-purpose agent with a massive system prompt, a long list of tools, and instructions to handle everything — I build small, purpose-built sub-agents, each designed for one specific outcome.</p>
<p>Each sub-agent gets its own tightly engineered prompt, only the tools it actually needs, and clear input/output contracts. A research sub-agent that only knows how to search and summarize. A data extraction sub-agent that only reads and structures. An action sub-agent that only writes or calls APIs. Focused. Contained. Predictable.</p>
<p>Then you build a clean orchestration layer that routes work to the right sub-agent based on what's needed at each step. This is where the real gains come from — the orchestrator doesn't need to be expensive either, it just needs to be smart about routing. Fewer tokens wasted on irrelevant instructions, fewer hallucinations from overloaded context, better debuggability because each unit has a single responsibility.</p>
<p>For production-grade systems, I've been using <a href="https://mastra.ai">Mastra</a> — an open-source TypeScript framework that makes this pattern genuinely easy to build. It handles agent orchestration, tool definitions, memory, and step-based workflows with a clean developer experience that doesn't get in your way. It's solid, it scales, and it's built for the real world — not just demos.</p>
<p>The mental model shift is simple: stop thinking "one smart agent that handles everything" and start thinking "a well-designed team of focused agents, coordinated by a clear orchestration layer." That's how you build systems that are both powerful and efficient.</p>
<hr />
<h2>The Real Goal</h2>
<p>We're not here to build AI agents. We're here to build systems that create real value by automating real problems.</p>
<p>Sometimes that's a fully autonomous multi-agent system. Often, it's a workflow with two LLM calls and a well-placed conditional. The measure of good engineering isn't how much AI you used — it's how much value you delivered, at what cost, with how much reliability.</p>
<p>That's the shift I keep coming back to. Build for outcomes, not optics.</p>
]]></content:encoded></item><item><title><![CDATA[NFT.JS - A Javascript library to implement NFTs]]></title><description><![CDATA[👋 Hello world ! This is Santhosh Reddy, a web3 developer and the solo developer of NFTJS. What's NFT.JS ? Today I'm launching NFT.JS to the world of web3 developers. Now let's talk what, why and how about NFT.JS
Intro... 🙋‍♂️
Remember that, this is...]]></description><link>https://blog.omlabs.co/nftjs-a-javascript-library-to-implement-nfts</link><guid isPermaLink="true">https://blog.omlabs.co/nftjs-a-javascript-library-to-implement-nfts</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[Web3]]></category><category><![CDATA[Solidity]]></category><category><![CDATA[NFT]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Santhosh Reddy]]></dc:creator><pubDate>Tue, 05 Apr 2022 08:17:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1653371424020/nm9G4bnc1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>👋 Hello world ! This is Santhosh Reddy, a web3 developer and the solo developer of NFTJS. What's NFT.JS ? Today I'm launching NFT.JS to the world of web3 developers. Now let's talk what, why and how about NFT.JS</p>
<h2 id="heading-intro">Intro... 🙋‍♂️</h2>
<p>Remember that, this is about the initial version of NFT.JS and to use NFT.JS you need to use the NFT.JS 2.0. You can checkout it <a target="_blank" href="https://santhoshreddy.hashnode.dev/launching-nftjs-2-the-next-level">here</a></p>
<p>If you're a web3 developer, you will definitely know what NFTs are and might have also implemented them somewhere in your previous projects or Dapps right?</p>
<p>Usually, implementing NFTs in the Dapps includes the work of creating an ERC721 contract using solidity, testing them and deploying to the network using Truffle &amp; Ganache or Remix IDE and then interacting with the contract from the Dapps using web3js.</p>
<p>Not done yet! You need to use IPFS to store metadata as well as files in the metadata like images, videos or other media content.</p>
<p>Have you ever thought of using a single library that can perform all these tasks! NFT.JS has taken birth here :)</p>
<p>Let's move on to the detailed talk on NFT.JS</p>
<p>Before moving on, I have a small request. If you found NFT.JS interesting and useful please consider upvoting it on <a target="_blank" href="https://www.producthunt.com/posts/nftjs-2-0">Product Hunt</a></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1649042962638/S2IyR4dXO.png" alt="20220404_085105_0000.png" /></p>
<p>Visit : <a target="_blank" href="https://nft-js.web.app/">NFT.JS</a></p>
<h2 id="heading-whats-nftjs">What's NFT.JS... ‼️</h2>
<p>Long story short, NFT.JS is a Javascript library that does all the above discussed tasks to implement NFTs in the Dapps.</p>
<p>Building a NFT marketplace ? Developing a Decentralized social platform or any other Dapps that needs to implement NFTs ? If "yes", using NFT.JS is a cool thing that you can do.</p>
<p>Using NFT.JS, you can deploy a ERC721 contract that can perform all the required functions without writing a single line of Solidity. You can easily interact with the contract by calling the functions and sending transactions to the contract with just 1-2 lines of NFT.JS and it also removes the usage of IPFS.</p>
<p>You can simply provide the input file into the metadata object and NFT.JS uploads all the files provided in the metadata to IPFS and lastly uploads the metadata.json file to IPFS and mints the NFT.</p>
<p>Have you heard of lazyMinting ? NFT.JS also provides that cool feature. In lazyMinting, the user can mint a NFT where the token data is stored off-chain(ipfs) to avoid gas fee and in future, if a buyer is ready to buy that NFT, the data moves on-chain by minting the NFT to the buyer. Here the user can get rid of gas-fee which is a big entry barrier.</p>
<p>Planning to build your Opensea ? Don't reinvent the wheel and consider using NFT.JS.</p>
<h2 id="heading-tech-stack-used">Tech Stack used... 👨‍💻</h2>
<ol>
<li><p>Javascript (programming language of the library)</p>
</li>
<li><p>Solidity (to create a ERC721 contract)</p>
</li>
<li><p>Web3.JS (to deploy and interact with the contract)</p>
</li>
<li><p>Moralis (for RPC nodes and IPFS gateway)</p>
</li>
</ol>
<p>The technologies mentioned above are used to develop NFT.JS</p>
<h2 id="heading-why-use-nftjs">Why use NFT.JS... ❓</h2>
<p>The 3 main benefits that you can enjoy using NFT.JS are...</p>
<h4 id="heading-1-low-code-development">1. Low code development</h4>
<p>NFT.JS completely diminishes the usage of Solidity to create smart contracts.</p>
<p>Not only that, using web3.js to interact with a contract also requires 4-5 lines of code right? NFT.JS does that same thing in just 1-2 lines of code.</p>
<h4 id="heading-2-integrated-ipfs">2. Integrated IPFS</h4>
<p>Need to use a 3rd party IPFS node and gateways like Infura, Alchemy? No need, Moralis IPFS gateway is integrated to NFT.JS and doesn't even need to code to use IPFS.</p>
<p>Using Moralis IPFS that is integrated to NFT.JS gives you a cool experience and can handle files that are as large as 1GB and that's the maximum limit.</p>
<h4 id="heading-3-implement-lazyminting">3. Implement lazyMinting</h4>
<p>LazyMinting is a cool experience that you can give your Dapp users. NFT.JS also provides the feature of implementing lazyMinting.</p>
<p>Not only that, getting started with NFT.JS is very simple and implementation &amp; usage is super easy.</p>
<p>Isn't it cool...?</p>
<h2 id="heading-how-to-nftjs">How to NFT.JS ⚙</h2>
<p>(deprecated. see NFTJS 2.0 <a target="_blank" href="https://santhoshreddy.hashnode.dev/launching-nftjs-2-the-next-level">here</a>) </p>
<p>Now let's jump into a deep talk on how to use NFT.JS by exploring its usage and implementations.</p>
<h4 id="heading-install-nftjs">Install NFT.JS</h4>
<p>The first thing you need to do to get started with NFT.JS is to install it by adding a simple script tag in the <code>&lt;head&gt;</code> section of your index.html file.</p>
<pre><code><span class="hljs-operator">&lt;</span>script src<span class="hljs-operator">=</span><span class="hljs-string">"https://nftjs.netlify.app/nft.js"</span> <span class="hljs-keyword">type</span><span class="hljs-operator">=</span><span class="hljs-string">"text/javascript"</span> <span class="hljs-operator">/</span><span class="hljs-operator">&gt;</span>`
</code></pre><h4 id="heading-initialize-it">Initialize it...</h4>
<p>After installing NFT.JS you need to initialize the NFT.JS by providing the ethereum network (mainnet/rinkeby/ropsten...) and the user's wallet address as strings in the following way.</p>
<pre><code>NFTJS.start(<span class="hljs-string">"rinkeby"</span>, accounts[<span class="hljs-number">0</span>])
</code></pre><p>If you want to change the network or user's wallet address in any instance, you can easily do it by calling the same function again with different parameters.</p>
<pre><code>NFTJS.start(<span class="hljs-string">"ropsten"</span>, accounts[<span class="hljs-number">1</span>])
</code></pre><h4 id="heading-deploying-a-collection-contract">Deploying a collection contract</h4>
<p>The ERC721 contract is created using Solidity with all the required 
functions and compiled already. By calling the <code>createCollection</code> function, you can deploy it to the network that you have set in <code>NFTJS.start()</code>.</p>
<p>The required parameters are <code>name</code> of the collections as a string, <code>SYMBOL</code> of the collection as a string, <code>publicMintable</code> as string ("true"/"false") and <code>maxSupply</code> as an integer.</p>
<p>publicMintable is a parameter that defines if you would like to allow others (other than owner) to mint NFTs in the collection and Default value is false and it's always false unless you give "true" as the parameter value.</p>
<pre><code>await NFTJS.createCollection(
<span class="hljs-string">"Nftify"</span>,
<span class="hljs-string">"NFY"</span>,
<span class="hljs-string">"true"</span>,
<span class="hljs-number">10000</span>
)
</code></pre><p>After the transaction receipt gives the deployed contractAddress, you can get it by calling a simple function like this.</p>
<pre><code><span class="hljs-keyword">var</span> <span class="hljs-keyword">address</span> <span class="hljs-operator">=</span> NFTJS.deployed()
</code></pre><p>This only gives the address of the collection that is most recently deployed in that web session. If either the page is reloaded or a new contract is deployed, the address of the past contract is gone.</p>
<h4 id="heading-initiating-a-collection">Initiating a collection</h4>
<p>Initiating a collection requires the address of that contract and must be deployed to the network that you have provided in the <code>NFTJS.start()</code></p>
<pre><code><span class="hljs-keyword">var</span> collection <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> NFTJS.collection(<span class="hljs-keyword">address</span>)
</code></pre><h4 id="heading-functions-of-a-collection">Functions of a collection</h4>
<p>Now let's see how to interact with a smart contract by sending and calling the data.</p>
<p><strong>1. mintNFT : </strong>Minting an NFT requires the metadata object which contains the items like name, description, image and others.</p>
<p>Let's discuss the role of IPFS here. The first thing that the <code>minNFT</code> function does is, it checks if an item in the level 1 items of the object is a file. It uploads all the files to the IPFS and replaces the file values with the file URL. It will take some to complete the whole process.</p>
<p>Note that, if a file input's value is given in metadata and the user doesn't upload a file, the function fails.</p>
<p>After uploading the files in metadata, it uploads the final metadata object to the IPFS and then sends the transaction to the metamask wallet.</p>
<pre><code><span class="hljs-selector-tag">await</span> <span class="hljs-selector-tag">collection</span><span class="hljs-selector-class">.mintNFT</span>({
  <span class="hljs-attribute">name </span>: <span class="hljs-string">"king"</span>,
  description :  <span class="hljs-string">"king of the kingdom"</span>,
  image : inputElement.files[<span class="hljs-number">0</span>]
})
</code></pre><p><strong>2. lazyMintAndTransfer : </strong> This is a function which is similar to mintNFT but is needed if you want to provide your users a gas free minting experience.</p>
<p>The required parameters are minter, price and metadata. Here, the buyer of the NFT is the user who is calling the function and the minter is the one who minted the NFT off-chain. The price is the amount of ETH the buyer needs to pay the minter.</p>
<p>The metadata of the NFT stored off-chain while minting 
should be given as the parameter. Dealing with metadata and IPFS is the same as in the mintNFT function.</p>
<p>As soon as the transaction is completed, the NFT data moves on-chain by directly minting it to the buyer and the ETH gets transferred to the minter address.</p>
<pre><code>await collection.lazyMintAndTransfer(
  nft.minter, 
  nft.price,
  nft.metadataObj
)
</code></pre><p><strong>3. updateNFT : </strong>This is a crucial function to update the NFT's metadata. This function requires the ID of the NFT that needs to be updated and the new metadata that needs to replace the old one.</p>
<p>Here, the user must be the owner of the NFT.</p>
<p>Dealing with metadata and IPFS is the same as in the mintNFT function.</p>
<pre><code><span class="hljs-selector-tag">await</span> <span class="hljs-selector-tag">collection</span><span class="hljs-selector-class">.updateNFT</span>(<span class="hljs-selector-tag">id</span>, {
  <span class="hljs-attribute">name </span>: <span class="hljs-string">"king1"</span>,
  description :  <span class="hljs-string">"king1 of the kingdom1"</span>,
  image : inputElement.files[<span class="hljs-number">0</span>]
})
</code></pre><p><strong>4. burnNFT : </strong>This function is used to burn or delete the NFT. This function requires the ID of the NFT that has to be minted and the user must be the owner of the NFT.</p>
<pre><code>await collection.burnNFT(id)
</code></pre><p><strong>5. approve : </strong> This function is used to give the transfer approval to the collection contract. This function requires the ID of the NFT that has to be approved and the user must be the owner of the NFT.</p>
<pre><code>await collection.approve(id)
</code></pre><p><strong>6. setApproveAll : </strong> This function allows the user to give or revoke approval on all his NFTs to the collection contract. The parameter that you need to give is a string form of the boolean ("true"/"false"). </p>
<p>The default value is "true" and is always the same unless you give a parameter like "false".</p>
<pre><code>await collection.setApprovalForAll(<span class="hljs-keyword">bool</span>)
</code></pre><p><strong>7. transfer : </strong> This function is used when a user wants to transfer his/her NFT to anyone he/she wishes. The required parameters are "to" which is an address to which he/she wants to transfer and the ID of the NFT.</p>
<pre><code>await collection.<span class="hljs-built_in">transfer</span>(to, id)
</code></pre><p><strong>8. transferFrom : </strong> This function is basically a buy function. The required parameters are from, to, price and id. As this transfer is made by the collection contract, the from/owner must give the approval to the contract before calling this function.</p>
<p>Usually, this function should be called by the "to". This function transfers the NFT of the given ID from "from" to the "to" and transfers the ETH of "price" from "to" to the "from". As said, it's a biy function and <code>msg.value</code> must be &gt; 0.</p>
<pre><code>await collection.transferFrom(<span class="hljs-keyword">from</span>, to, price, id)
</code></pre><p><strong>9. details : </strong>This function returns the object that includes the details of the collection like, name, symbol, owner, maxSupply, publucMintable and totalSupply. Here, totalSupply also includes the burned NFTs.</p>
<pre><code><span class="hljs-keyword">var</span> details <span class="hljs-operator">=</span> await collection.details()
</code></pre><p><strong>10. getApproved : </strong> This function takes the ID of a NFT and returns the address to which the owner has given approval of that NFT id. </p>
<p>Usually, it returns the address(0) if not approved and returns the address of the collection if approved.</p>
<pre><code><span class="hljs-keyword">var</span> <span class="hljs-keyword">address</span> <span class="hljs-operator">=</span> await collection.getApproved(id)
</code></pre><p><strong>11. isApprovedForAll : </strong> This function returns the boolean value. This boolean is equal to the value given in the setApproveAll function. Its default value is false.</p>
<pre><code><span class="hljs-keyword">var</span> <span class="hljs-keyword">bool</span> <span class="hljs-operator">=</span> await collection.isApprovedForAll()
</code></pre><p><strong>12. ownerOf : </strong> This function returns the owner's address of the given NFT id.</p>
<pre><code><span class="hljs-keyword">var</span> owner <span class="hljs-operator">=</span> await collection.ownerOf(id)
</code></pre><p><strong>13. balanceOf : </strong> This function returns the no.of NFTs holding of the given user's address.</p>
<pre><code><span class="hljs-keyword">var</span> balance <span class="hljs-operator">=</span> await collection.balanceOf(<span class="hljs-keyword">address</span>)
</code></pre><p>Hope you understand how to use NFT.JS to implement NFTs in your projects in a low-code way and save your valuable time &amp; energy.</p>
<p>If you have any doubts, found any bugs or want to give a suggestion or feedback on NFT.JS you can comment down below or can reach out to me on <a target="_blank" href="https://twitter.com/santhosh6404">twitter</a></p>
<h2 id="heading-limitations">Limitations... ⛔</h2>
<p>The only 2 limitations of NFT.JS are...</p>
<ol>
<li><p>It only supports Ethereum, not other networks like Polygon and BSC and only the ERC721 standard, not ERC1155.</p>
</li>
<li><p>While implementing lazyMinting, you need to store the token data off-chain right ? Unfortunately, NFT.JS doesn't provide the option to store the off-chain data and you need to set up your own space for that.</p>
</li>
</ol>
<h2 id="heading-future-plans">Future plans... 🔮</h2>
<p>As a developer and a problem-solver, the only future plan for NFT.JS is to break the above limitations...</p>
<p>I think it would be great if NFT.JS also supports ERC1155 as well as other networks like Polygon and BSC. Using Polygon or BSC is a great thing to reduce the gas fee. </p>
<p>I also feel that, ETH2.0 can also replace the positions of Solana, Polygon and BSC coz, ETH2.0 is an upgraded version of ETH and uses proof-of-stake which may result in a much lower gas fee than Polygon and BSC.</p>
<h2 id="heading-final-thoughts">Final Thoughts... 🙂</h2>
<p>I'm so excited and happy that I also completed developing something that can help my fellow devs.</p>
<p>Uhhh.....</p>
<p>Finally, if you are to build something that requires implementation of NFTs please consider using NFT.JS...</p>
<p><strong>Taking a leave for now...👋Bye!</strong></p>
]]></content:encoded></item></channel></rss>