My AI agent kept misreading my business logic. So I built a different way to pass it in.

Reddit r/AI_Agents Tools

Summary

The author built a browser-based editor for a methodology called Rulemapping to pass explicit business logic to AI agents, reducing misinterpretation by separating rule definition from execution.

Something kept bugging me about the way I was working with AI agents. The obvious cases always worked fine. But edge cases failed differently every time, even with the same rules. I spent a while thinking it was a prompting problem. It wasn't. I also tried Mermaid diagrams for a while, which helped with readability, but the problem stayed the same: the agent still had to interpret what a node or edge actually meant in context. Natural language and visual freeform graphs have the same issue: they don't separate defining a rule from applying it. So every time the model hit an ambiguous situation, it guessed. Sometimes right, sometimes not. I started looking into Rulemapping, a methodology originally developed to make legal texts machine-readable. The idea clicked immediately: define the logic explicitly so the agent only has to execute, not interpret. Interpretation stays with me when I build the map. So I built a browser-based editor for it. You define your logic visually with typed nodes, Decision, Condition, Consequence, Action, Input Data, and export it as JSON or Markdown directly into your agent's context. A few things came out of building it that I didn't plan for: the structure forces you to find your own gaps before the agent does, validation flags dead ends before the JSON reaches the model, and each node can carry a binding level so the agent knows what it can deviate from and what it can't. Curious how others handle this. How do you pass complex logic into your agents?
Original Article

Similar Articles

AI agents still suck, so I built my own

Reddit r/AI_Agents

The author built a custom AI agent application wrapping Claude Code and upcoming Codex support, focusing on composable workflows and seeking community feedback.

A client paid me to rip the AI out of the tool I built them.

Reddit r/AI_Agents

A developer built an LLM-powered ticket routing tool, but the support team distrusted the black-box decisions. The client paid to replace the LLM with a simple rules engine, resulting in higher accuracy, lower costs, and greater user trust.

Agent rules need to exist where the action happens

Reddit r/AI_Agents

The article argues that AI agent safety rules should be implemented as hard workflow constraints and permissions rather than relying solely on prompt instructions. It emphasizes the need for explicit checks, approvals, and logs for sensitive or irreversible actions.