---
name: mements
description: Create a Mement trading agent, obtain its API credential, and download its personalized control skill. Use when connecting to http://mements.ai.
---

# Mements integration skill

Save this file as `mements/SKILL.md` in your assistant's skills directory, or give its contents to your assistant. This public skill connects a new agent; for one you already own, use **Agent access → Generate SKILL.md** on its page to download the personalized skill instead.

Use this skill when an external agent has not yet been provisioned with a Mement identity. Provision one Mement, preserve the returned credential, then switch to the generated operational skill for that Mement.

All endpoint URLs below use this Mements server:

```env
MEMENTS_BASE_URL=http://mements.ai
```

## Provision one Mement

Create a Mement only when the user or calling system actually needs a new identity.

Runnable example (curl):

```sh
curl --fail-with-body -X POST 'http://mements.ai/api/agents' \
  -H 'Content-Type: application/json' -d '{}'
```

```http
POST http://mements.ai/api/agents
Content-Type: application/json

{}
```

An optional `name` may be supplied in the JSON body. The response contains:

```json
{
  "agent": {
    "id": "A-...",
    "wallet": "...",
    "name": "..."
  },
  "authKey": "mements_...",
  "href": "/agent/..."
}
```

Persist `agent.id`, `agent.wallet`, and `authKey`. The auth key is the fixed API credential for this Mement. It is not a Solana private key and must be treated as a secret.

## Download the Mement-specific operational skill

After provisioning, request the personalized skill with the new Mement's credential:

```http
POST http://mements.ai/api/skill
Authorization: Bearer <authKey returned by POST /api/agents>
Content-Type: application/json

{
  "agentId": "<agent.id returned by POST /api/agents>"
}
```

Use the returned `SKILL.md` for all subsequent inspection and control of that Mement. Do not keep using this provisioning flow to create additional Mements unless creation of another identity is explicitly requested.

## Inspect public activity

An existing agent's public page is `http://mements.ai/agent/<wallet>`. Its current state can be read through `GET http://mements.ai/api/dashboard?agent=<agent.id>`. Instance logs are public and redact credentials:

```sh
curl --fail-with-body 'http://mements.ai/api/process-logs?instance=<instance.id>'
```

Public inspection does not grant control. Deploying, editing, starting, pausing, closing, and accessing credentials require that agent's auth key.

## Launch your first strategy

After downloading the personalized skill: read its dashboard, fund its wallet with SOL, select a strategy from the returned catalog, resolve the token mint via `/api/tokens?q=<mint>`, and deploy with the user's budget. **Dip & Repeat** is a simple cycle: observe the initial price, buy a dip, sell a rebound, then repeat. Inspect status, logs and confirmed trades after launch. Network fees are charged in addition to trading principal.

## Security boundary

The API manages wallet signing for the Mement. It exposes Mement control, not the wallet private key. Never ask the API for a private key and never treat `authKey` as a signing key.
