Inspiration
In 2026, AI agents don't just answer questions. They approve insurance claims, initiate payments, and make clinical calls without a human in the loop. But when something goes wrong, nobody can trace the decision. There's no receipt, no proof, and no one to hold accountable. I kept reading the same headlines. A medical chatbot misdiagnoses a patient. A trading algorithm moves money without authorization. A health tool recommends something dangerous. Every time, the answer was the same: we don't know why it did that. I wanted to build the opposite of that. A system where an AI cannot act unless its decision is already proven, recorded, and financially accountable. That became AegisMorpheme-X.
What it does The name "Morpheme" comes from linguistics. A morpheme is the smallest unit of meaning in a language. AMX applies that idea to AI decisions: every action an agent takes gets compressed into the smallest provable unit of intent, a signed record that contains exactly what was decided and why, before anything executes. When an agent makes a decision, AMX wraps it into an Executable Morpheme-X unit. That unit holds the agent's intent as a hash, the model version that made the call, the input context (risk score, patient data fingerprint), and a trigger that defines what happens next: payout, block, or alert. The unit gets submitted to Hedera's Consensus Service. Once the network confirms it, roughly 3 seconds, the trigger fires automatically. No human needed, no back door. A Meta-Sentinel watches every agent in real time. It uses rolling 2-sigma anomaly detection, so if a diagnosis agent says "No risk" when the acoustic risk score is 0.9, the Sentinel catches it, blocks the action, logs the event to Hedera, and slashes 10% of that agent's staked tokens on-chain. It then flags the failed example for retraining. The agent gets worse outcomes until it gets better. The insurance engine is adaptive. It pulls in One Health data, weather conditions, livestock disease reports, poverty index, and adjusts payout thresholds dynamically. In a high-outbreak environment like Dhaka, a moderate cough can trigger an automatic micro-payout. In a stable environment like Singapore, the bar is higher. The thresholds shift based on real conditions, not hardcoded rules. Agents can also hire other agents from a decentralized registry, paying them micro-amounts of HBAR per task. This turns AMX into a marketplace of verifiable intelligence rather than a closed system.
How I built it
The stack is three layers working together: an AI decision engine, a public ledger for verification, and an economic penalty mechanism that punishes bad behavior automatically. The backend runs on FastAPI with LangGraph orchestrating six agents: Triage, Diagnosis, Finance, Epidemiology, Morpheme-X, and Sentinel. Each agent is a Python node with deterministic logic so its outputs are predictable and auditable. For Hedera, I used the Python SDK directly. HCS topics store Morpheme-X messages and Sentinel events. An HTS token called AMXSTAKE handles agent staking and slashing. I built both a live testnet mode and a simulation fallback so the demo never breaks during judging. The frontend is React 18 with WebSockets for real-time agent output and Chart.js for anomaly visualization, showing a rolling window with the mean and 2-sigma bands. Every Morpheme-X transaction links to a clickable HashScan page so judges can verify on-chain themselves. The backend is on Render and the frontend on Vercel. I wrote 19 pytest cases covering the sentinel, finance, API, graph, and Hedera layers, plus React Testing Library tests on the frontend. GitHub Actions runs the full suite on every push.
Challenges I ran into
The cough-to-risk model is a documented simulation built on synthetic MFCC data. I made a deliberate call to focus the real engineering on the governance layer rather than pretend the TinyML accuracy was production-ready. That's documented clearly throughout the codebase. Getting the 2-sigma anomaly detection loop stable took multiple rounds. The edge cases were the hard part: window sizes under 3, zero standard deviation causing division-by-zero, baseline poisoning when new values were added before validation, and cascading false positives after history resets. Each one had to be fixed individually without breaking LangGraph's state machine. Hedera's testnet was occasionally unpredictable. Transaction fees, topic creation, and token transfers sometimes failed with cryptic errors. Building a stable simulation fallback was the right call for demo reliability. WebSocket state synchronization was messier than expected. Broadcasting agent decisions from the backend to the React dashboard in real time while keeping the event log clean required a dedicated ConnectionManager class. There is also what I call the "executable trust gap." Judges will reasonably ask: who actually fires the trigger? The orchestrator only acts after Hedera consensus confirms the Morpheme-X unit. That makes it a constrained executor, not a trusted authority acting on its own judgment. Getting that distinction documented clearly in both code and docs took real effort.
Accomplishments I'm proud of
The live Hedera transaction in the demo is the one I'm most proud of. It's not a mock. Judges can click the HashScan link and see the Morpheme-X message sealed on-chain themselves. That one verifiable moment is worth more than any slide. The Meta-Sentinel actually blocks unsafe actions, slashes agent stakes, and schedules retraining in a single automated loop. I haven't seen that combination in another AI governance project. The adaptive insurance threshold moves based on real OpenWeatherMap data and outbreak risk, not hardcoded values. The test suite is complete: 19 backend tests, frontend component tests, an end-to-end script, and CI/CD on every push. Testing caught a missing environment variable and a broken WebSocket reconnect right before the demo recording. The entire system runs on free tiers. No credit card, no billing account.
What I learned
Governance is not something you add at the end. By the time a model is deployed and causing harm, it's too late to retrofit accountability into it. This project showed me that verifiability has to be built into the protocol from the start, not bolted on afterward. Hedera turned out to be a genuinely good fit for agentic systems. Sub-3-second finality, fixed low fees, and carbon-negative operations make it practical for real-time healthcare decisions where you can't wait 30 seconds for a block confirmation. Being upfront about what's real versus simulated is always the right call. It builds trust and it lets you focus on where the actual innovation is. One concrete thing judges can verify themselves is worth more than ten slides of architecture depth.
What's next for Aegis Morpheme X
The code is on GitHub under the MIT license. I'm working on a technical whitepaper and an open contributor call. On the real-world side, I'm in early conversations with a Dhaka-based community health organization about deploying a simplified AMX version for respiratory disease monitoring in low-resource settings. On the technical side: replacing the synthetic cough model with a real TensorFlow Lite model that runs entirely on-device, moving agent-to-agent commerce from simulation to a live HCS-10 OpenConvAI registry, and expanding the same governance layer into supply chain AI and financial compliance.
Built With
- fastapi
- hedera
- langgraph
- leaflet.js
- openweathermap
- python
- react
- tailwind
- uvicorn


Log in or sign up for Devpost to join the conversation.