> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ameo.agiwithai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution & Quote Telemetry Integration

> How AMEO performs real on-chain settlement and integrates external quote telemetry surfaces without letting them touch execution.

AMEO's primary execution path is a direct, policy-gated web3 adapter (`MantleDexAdapter`) that signs and broadcasts real transactions to the FusionX V2 router on Mantle Sepolia using the configured agent EOA. When Sepolia liquidity is thin, execution degrades to `treasury_ping` and is labeled honestly in the UI.

For observability and future agentic skills platforms, the worker also invokes `mantle.swap.v1` (via quote telemetry when present, or HTTP quote fallback) **in the planning/quote phase only**. This produces structured telemetry but does **not** perform the actual settlement. The real trade always goes through the audited direct adapter.

Every cycle that reaches execution still emits:

```
[INFO] quote_telemetry skill=mantle.swap.v1 ...
```

for tracing, and the replay UI labels the step accurately as "Mantle DEX Execution".

The `/v1/skills` endpoint continues to advertise registered capabilities for SDK/MCP consumers. The quote surface remains non-settling by design.

## Per-cycle flow

1. Observation and LLM planning produce an `ActionPlan`.
2. The policy engine validates drawdown, asset whitelist, trade size, and gas guards.
3. On approval, `MantleDexAdapter` logs the quote telemetry event and signs the transaction.
4. A `DecisionLogged` event is written under the ERC-8004 identity contract.

Primary implementation: `apps/worker/ameo_worker/adapters/mantle_dex.py`.

Configuration: `EXECUTION_ADAPTER=fusionx_v2` with FusionX router addresses on Mantle Sepolia.

## Register a new skill (forward-looking)

Third-party agents can add a skill descriptor to `/v1/skills` and implement a matching adapter module that honors the same quote → sign → broadcast interface. AMEO routes execution through the adapter registry in the worker `act` node; policy checks always run upstream, so a new skill cannot bypass guardrails.

To integrate:

1. Define a skill id (for example `mantle.lend.v1`) and executor label.
2. Implement quote/execute methods compatible with `MantleDexAdapter`.
3. Register the skill in the worker skills list and document it in the execution telemetry guide.

## Verify settlement

After execution, cross-check:

* Mantlescan transaction receipt for the cycle hash
* `DecisionLogged` event on the agent identity contract
* Optional: `/v1/verify/{txHash}` for a single JSON proof object

See [REST API v1](/api/v1) and [Run locally](/guides/run-locally) for router addresses.
