1. Your APIs
MyCoinDex exposes standard HTTP endpoints. Aomi does not modify them.2. APIs Become AI Tools
Aomi wraps each endpoint as a tool, a typed function the LLM can invoke. Each tool has a name, description, and typed parameters. When a user asks “What’s ETH trading at?”, the model callsGetTokenPrice with { symbol: "ETH" }. The tool hits /prices/eth, returns the result, and the model composes a response. Tools can execute concurrently.
3. Configuring the Assistant
Preamble
The system prompt that shapes personality and rules:Model Selection
Models can be changed at runtime. No redeployment needed.
RAG Document Store (Optional)
If MyCoinDex has documentation, FAQs, or knowledge base articles, Aomi ingests them into a vector store for the assistant to search.4. Deployed as an App
5. API Key and Authentication
MyCoinDex receives an API key scoped to their app:6. The Request Flow
Step by Step
- User sends a message via the widget or headless integration.
- Frontend sends HTTP POST to
/api/chat?app=mycoindexwith the API key. - Backend validates the API key and loads the session.
- Backend sends message + history + tools to the selected LLM.
- LLM decides to call tools and requests
GetPortfolioandGetTokenPrice. - Backend executes tool calls against MyCoinDex’s APIs.
- Tool results go back to the LLM for interpretation.
- LLM streams its response, and each text chunk forwards as an SSE event.
- Frontend renders incrementally.
- Complete event signals the response is finished.
SSE Stream Format
7. When a Tool Produces a Transaction
The flow above reads data. A write follows the same path until the tool builds a transaction. Then the safety steps take over. A tool never holds a key and never signs. It returns a transaction for the Runtime to simulate and the user’s wallet to sign.- The model calls a write tool, for example
ExecuteTrade. - The tool builds the transaction parameters and returns them. It does not sign.
- The Runtime simulates the transaction on a fork of the live network.
- The user sees the exact token changes, gas, and contract calls. This is the simulate step.
- If the user approves, the wallet signs locally and the transaction is submitted. If the user rejects, nothing is sent.
What You Get
Next Steps
- Reference / Apps & Auth: how API keys, apps, and sessions fit together.
- API Reference: full HTTP endpoint documentation.
- Sessions: how chat sessions are created and managed.