Skip to main content
Verified against published aomi-sdk 5.1.1 at commit 2ef3e04 on 2026-09-22.
An Aomi App combines a role, a focused set of tools, and the workflow that tells the model how to use them. You author those pieces as a Rust plugin. Once deployed, that plugin becomes the user-selectable App shown by the CLI and Developer Platform. This page covers the design and organization of that plugin. For exact Rust trait signatures and helper APIs, use the Rust SDK reference.

What belongs in an App

Every App has three layers: Keep these layers separate. The preamble should explain when to use a tool. The tool should perform one stable operation. Packaging files should describe how the plugin is built and shipped, not how the model should behave.
Start from sdk/examples/app-template-http in the Aomi SDK repository. The template already follows this split.

1. Define the App’s behavior

The preamble is the App-specific system prompt. It should tell the model what the App does, where its authority ends, and which workflow to follow. A useful preamble covers four things:
1

State the role and boundary

Say what the App is for and what it must not do. A data App can state that it is read-only and never stages transactions.
2

Map capabilities to tools

Name the exact tool for each job so the model can choose deliberately.
3

Define identifiers and conventions

Document formats such as chain names, asset IDs, protocol slugs, and time units that tool calls must use.
4

Describe common workflows

Explain the order in which tools should run for multi-step requests.
Write instructions about decisions and sequencing here. Keep API URLs, headers, and response decoding in client.rs.

2. Design a focused tool surface

Tools are the App’s vocabulary. Prefer a few intent-shaped operations over one tool per upstream endpoint.
  • Use names such as search_*, get_*, build_*, and submit_*.
  • Give every tool one clear purpose.
  • Use typed arguments and concrete field descriptions.
  • Return stable JSON rather than raw upstream responses.
  • Normalize errors into short messages that tell the model what to change.
  • Separate reads from actions that stage or submit transactions.
Three to eight tools is a useful target for most Apps. A smaller surface makes selection more reliable and gives your preamble fewer branches to explain. For the implementation contract, see DynAomiTool. The Rust SDK reference also covers routed and multistep tools.

3. Register the plugin

Keep src/lib.rs short. Declare the modules, define the preamble, and register the App once:
The registration connects the App type, preamble, tool list, required secrets, and host namespaces. Treat it as the plugin’s public inventory. Do not put business logic in the registration file. Use namespaces = [] for an App that only calls an external HTTP API. Declare a host namespace only when the App needs the corresponding chain or wallet capabilities. The Rust SDK reference documents the field values and defaults.

4. Package the plugin

The plugin must compile as a cdylib. Pin aomi-sdk to the exact version your publishing platform requires.
Confirm the required version in the publishing platform’s platform.json. Pin that value exactly. A version mismatch prevents the plugin from loading.

Contributor App manifest

If the plugin lives in a community or partner source repository, add an aomi.toml. Official plugins in the Aomi SDK repository use its release process and do not need this file.
Never put a literal access token in aomi.toml. Use an environment-variable reference such as access_token = "$MY_GH_TOKEN", or omit the field for a public repository.

Authoring checklist

  • The preamble states the role, boundaries, tool mapping, and workflow.
  • The tool set represents user intents rather than raw API endpoints.
  • Every argument has a concrete description and example format.
  • Tools return stable JSON and actionable errors.
  • src/lib.rs contains registration, not business logic.
  • Cargo.toml builds a cdylib and pins the required SDK version exactly.
  • Contributor Apps have an aomi.toml with no literal credentials.

Next steps

Rust SDK

Implement tools, secrets, async work, namespaces, and tests with the public Rust APIs.

CLI toolchain

Compile, test, deploy, and activate the plugin.

Transaction pipeline

Follow a transaction after the runtime loads your App.
Last modified on August 17, 2026