---
description: Official Essara Skill for OpenClaw. Provides the Agent with full access to intelligently manage, summarize, and categorize finances on behalf of the user.
author: Essara
---

# Essara OpenClaw Skill

This skill allows an OpenClaw agent to seamlessly act as a financial assistant by tracking expenses, managing subscriptions, and summarizing the budget.

## Setup Requirements

1. Instruct the user to open their Essara **Settings > Integrations**.
2. Ask the user to click **Generate Key** and paste the provided API Key (`your_api_key_here`).
3. Save this key in your agent's secure environment variables as `ESSARA_API_KEY`.

## General Guidelines

- **Base URL**: You must determine the Base URL depending on where the user is hosting Essara (e.g., `http://localhost:3000` or `https://essara-finance.com`). If unknown, ask the user.
- **Authentication**: All requests MUST include the HTTP Header:
  `Authorization: Bearer <ESSARA_API_KEY>`
- **Date Formatting**: All dates must be in ISO 8601 format (e.g., `YYYY-MM-DD`).

---

## Capabilities & Endpoints

### 1. Log a Transaction
*Use this when the user asks to log an expense or income.*

**HTTP POST** `<BASE_URL>/api/agent/transactions`

**Headers**:
- `Content-Type: application/json`
- `Authorization: Bearer <API_KEY>`

**JSON Body**:
```json
{
  "name": "Coffee at Starbucks",
  "amount": 4.50,
  "type": "expense", // 'expense' or 'income'
  "date": "2026-02-23",
  "note": "Morning coffee" // Optional
}
```

### 2. Map a Subscription
*Use this when the user mentions an ongoing recurring cost or subscription plan.*

**HTTP POST** `<BASE_URL>/api/agent/subscriptions`

**Headers**:
- `Content-Type: application/json`
- `Authorization: Bearer <API_KEY>`

**JSON Body**:
```json
{
  "name": "Netflix Premium",
  "amount": 15.99,
  "billing_cycle": "monthly", // 'monthly' or 'yearly'
  "next_billing_date": "2026-03-01"
}
```

### 3. Get Budget Summary
*Use this when the user asks about their remaining budget, total spending, or current financial status.*

**HTTP GET** `<BASE_URL>/api/agent/summary`

**Headers**:
- `Authorization: Bearer <API_KEY>`

**Response Example**:
```json
{
  "data": {
    "monthly_budget": 3000,
    "current_spending": 1450.50,
    "remaining_budget": 1549.50,
    "income_this_month": 4000,
    "current_balance": 15000,
    "currency": "USD"
  }
}
```

## Agent Directives
1. **Be Proactive**: If a user uploads an image of a receipt, parse the total and the vendor, and immediately use the *Log a Transaction* endpoint.
2. **Be Succinct**: When reporting back after logging a transaction, keep it brief: "Logged $4.50 for Coffee. You have $1549.50 remaining in your budget."
3. **Handle Rejections**: If you receive a `401 Unauthorized`, ask the user to verify their API key in Settings.
