Back to the red bull cans

Built at TermiX, on the open-source ElizaOS

DeFAI Protocol on ElizaOS

An AI agent that turns plain-English DeFi requests into actions code can run

ShelvedJan–Feb 2025

Video in the works

DeFAI Protocol on ElizaOS

A plain-English DeFi request turned into a JSON action.

About the project

An agent on ElizaOS, the open-source agent framework, that reads a DeFi request in plain English, such as "swap my USDT to BNB" or "create a token on DODO", and answers with a structured action that other code can check and run.

In early 2025 TermiX wanted its chat to do DeFi for people, not just talk about it. I set up an ElizaOS agent called DeFAI Protocol for that: a character that replies only in JSON, backed by a knowledge file that describes every action it can take.

The knowledge file covers 13 actions: transfers, token swaps, bridging, creating a token on DODO, lending (deposit, borrow, repay, withdraw) and staking. Each one has its parameters and dozens of trigger phrases, mostly around Aave, DODO, 1inch, Uniswap and PancakeSwap.

How it works

  1. Ask in plain English

    For example "swap 0.1 BNB to USDT" or "deploy a token on DODO with a 1% fee".

  2. Find the action

    The agent matches the request to one of 13 actions in its knowledge file.

  3. Answer in JSON

    It replies with the action and its parameters, never free text, so code can read it.

Under the hood

Agent
A TermiX fork of ElizaOS (open source), running on OpenRouter models through Eliza's API client.
Character
DeFAI Protocol: automated, precise and JSON-only, focused on DeFi topics.
Knowledge
A 478 KB file of 13 DeFi actions with their parameters and trigger phrases.

What I did

  • Set up TermiX's ElizaOS fork for the agent and ran it on OpenRouter models
  • Wrote the DeFAI Protocol character, which answers only in JSON
  • Built its knowledge file: 13 DeFi actions (transfer, swap, bridge, create a token on DODO, lending and staking), each with parameters and trigger phrases
  • Turned that knowledge into the character with ElizaOS's characterfile tools

What was new

  • ElizaOS, then the most-used open-source framework for crypto AI agents
  • Getting a chat model to answer in strict JSON so code can act on every reply

Screenshots

Screenshots in the works

Real screens from DeFAI Protocol on ElizaOS go here.

To be clear

ElizaOS is open source; I built the DeFAI character and its knowledge on top of it. The code lived in TermiX's repos, which no longer exist, so there is no link.