# SSS Agent Kit Quickstart for OpenClaw-style Agents

This quickstart shows the safest V1.2 path: use a dedicated Agent Principal, keep only the intended trading balance there, preview first, then submit swaps only for that Principal's own SSS internal balance.

## 1. Account model

Recommended setup:

```text
Main wallet / operator identity
  - long-term funds
  - manual deposits / withdrawals
  - admin or human operations

Dedicated Agent Principal
  - small trading balance only
  - used by OpenClaw / external agent
  - no withdrawal authority through Agent Kit V1.2
```

Never give an agent your main wallet PEM. Do not store LLM keys or PEM files inside SSS. The user or integrator runs OpenClaw and pays any LLM/API cost.

## 2. Required SSS endpoints

Core canister:

```text
dlhkk-raaaa-aaaak-qyl5a-cai
```

Candid interface:

```text
https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=dlhkk-raaaa-aaaak-qyl5a-cai
```

Agent-readable files:

```text
https://docs.sssdefi.ai/agent-manifest.json
https://docs.sssdefi.ai/llms.txt
https://docs.sssdefi.ai/llms-full.txt
https://docs.sssdefi.ai/ai/openclaw-skill/SSS_SKILL.md
```

## 3. Safe workflow

1. Call `agent_get_supported_actions_v1`.
2. Call `agent_get_market_context_v1`.
3. Call `agent_get_my_portfolio_v1`.
4. Convert the user intent into structured parameters.
5. Call `agent_preview_swap_v1`.
6. Explain pool, token in/out, amount, estimated output, fee, min-out and warnings.
7. Submit only if the user confirmed, or if the user explicitly configured autonomous mode.
8. Call `agent_get_action_status_v1` with the same `client_tx_id`.
9. Use `agent_list_my_actions_v1` to synchronize recent swap history.

## 4. Minimal dfx smoke test

From the SSS repo root, use:

```bash
cd /home/dj/bots_v2/sss_stableswap_v3

bash scripts/ops/agent_kit/smoke_agent_kit_v1_2.sh
```

By default the smoke test is read/preview only. To execute a tiny real swap, set `LIVE_SWAP=1` and use a dedicated Agent Principal with a small SSS internal balance:

```bash
cd /home/dj/bots_v2/sss_stableswap_v3

LIVE_SWAP=1 \
AGENT_CLIENT_TX_ID="agent-live-tiny-swap-$(date +%Y%m%d%H%M%S)" \
bash scripts/ops/agent_kit/smoke_agent_kit_v1_2.sh
```

## 5. V1.2 limits

Agent Kit V1.2 does not support:

- withdrawals;
- delegated trading;
- main-account proxy trading;
- limit-order submit;
- SSS-hosted AI inference;
- SSS-hosted LLM keys.

These limits are intentional. V1.2 is designed to prove the low-cost and low-risk agent execution path first.
