Verified against published
aomi-sdk 5.1.1 at commit 2ef3e04 on 2026-09-22.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.
Recommended project layout
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.
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_*, andsubmit_*. - 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.
DynAomiTool. The Rust SDK
reference also covers routed and multistep tools.
3. Register the plugin
Keepsrc/lib.rs short. Declare the modules, define the preamble, and register
the App once:
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 acdylib. Pin aomi-sdk to the exact version your
publishing platform requires.
Contributor App manifest
If the plugin lives in a community or partner source repository, add anaomi.toml. Official plugins in the Aomi SDK repository use its release
process and do not need this file.
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.rscontains registration, not business logic.Cargo.tomlbuilds acdyliband pins the required SDK version exactly.- Contributor Apps have an
aomi.tomlwith 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.