Search across updates, events, members, and blog posts
💡 This article is for a Web3 Software Engineer Audience 💡
DeFAI the new buzzword in the block, it simply means DeFi meets AI. My goal with this article is to break the architecture design necessary to build effective DeFAI Agents.
The OSI model has been the clearest way to structure web applications since its inception.

Over the year we went from breaking monorepo into microservices, to rollback into monorepos. Microservices promised to scale better with large tech team, well tech team have been shrinking in size, so that value prop doesn't makes sense any more. I used to be a proponent of microservices and refactored several monorepo in several startups both as employee and advisor; I was wrong. Microservices are too hard to test and maintain, that's because each microservice has its own state.
Fortunately the tech industry made a U turn and move back to monorepos.
Recently Zach Warunek proposed to replace microservices with LLMs. This is a dumb take at multiple level.
Microservice are already hard to test, imagine making them "emotional" and even more unpredictable 🤮. Nope. There is a layer for determinism and a layer for intelligence. Using the OSI mode, Intelligence should seat on top of the Application Layer.
This blog post from 2018 had some interesting takes on the difference between the web and the blockchain. While the post focused on value capture, the representation of the architectures still applies.

The blockchain architecture has a large protocol layer that is a state machine in the true sense of the word. Transactions in a block change the state of the machine. The time is represented by the blocks.
The application layer on top of it, the dApps are a view on the current state and a UI to execute a new transaction. So far so good.
Same as in the web2 model, in the web3 model, Intelligence should seat on top of the Application Layer.
Recently Anthropic wrote this banger on Building Effective Agents, in which they explained a few definition of AI agents, but pointed on an important distinction between Workflows and Agents.

Workflows are in regular data pipelines and task pipelines are DAGs. Do we want to keep the workflow deterministic? Ideally yes, but it's ok to be flexible and add new children to a workflow plan, as long as it remain a DAG so that we can move back in its history.
Making the workflow as a Graph could cause infinite loops and could make it hard to replaying the history and therefore debugging what's happening.
MLOps, Data and ML engineers are very familiar with Airflow, Argo, Kubeflow, DataFlow, DataProc, Spark and other workflows orchestration platform that express them in DAG.
Some like Argo even let you add new nodes and conditional node. You'd expect an AI agent to modify its plan as it's running, for example adding new nodes to pull data from different sources, running pretty much a MCTS of actions.

Well, DeFi composability and transactions are pretty much workflows with two primitives: smart contracts and transactions. That's it. You can pretty much create a plan for a DeFi series of transaction, or represent a DeFi transaction that already happened with those.
The missing part at this point is that the user will have to sign each transactions or give a private key to the agent. ERC7715 and wallet abstractions can help. We're experimenting a few novel strategy to improve the usability on this front — we'll report back!
Web3 and DeFi are deterministic. Keeping this determinism with the agents will help create strong agentic architecture that can be create reproducible plans and can predictably execute them. So workflows are an important building block for the DeFAI agents of the first type — agents with human in the loop; we'll talk about this in part 2 👈.
Get the latest AI insights delivered to your inbox. No spam, unsubscribe anytime.
Founder, Engineer
AI Socratic
Founder of AI Socratic

This blog post was written by OpenClaw. It's a research of what OpenClaw and Moltbook are from the AI agent itself.
DeFAI = DeFi + AI. Keep Web3 deterministic: intelligence sits above the app layer. Agentic workflows (DAGs) enable reproducible, debuggable DeFi transaction plans.