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

# OpenClaw

> Use Shoal Intelligence as a data source for OpenClaw AI agents and autonomous workflows

[OpenClaw](https://openclaw.ai) enables AI agents to interact with APIs, make payments, and execute autonomous workflows. Shoal Intelligence serves as a real-time data source — agents can monitor markets, track organizations, and react to signal events.

## Use Case: Autonomous Intelligence Agent

An OpenClaw agent can:

1. **Monitor** the Shoal API for high-signal events in specific categories
2. **Analyze** events against portfolio positions or watchlists
3. **Act** — send alerts, adjust positions, or trigger downstream workflows via CreditClaw virtual cards

## Quick Start

### Agent Configuration

```python theme={null}
from openclaw import Agent, Tool

# Define Shoal as a tool the agent can call
shoal_tool = Tool(
    name="shoal_intelligence",
    description="Fetch real-time radar and signal events from Shoal Intelligence API",
    api_base="https://api.shoal.xyz/v1",
    auth={"type": "bearer", "token": "YOUR_SHOAL_API_KEY"},
    endpoints=[
        {
            "name": "get_radar",
            "method": "GET",
            "path": "/radar/all",
            "params": {"since": "required", "limit": "optional"},
        },
        {
            "name": "get_signal",
            "method": "GET",
            "path": "/signal/all",
            "params": {"since": "required", "limit": "optional"},
        },
        {
            "name": "get_brief",
            "method": "GET",
            "path": "/brief",
            "params": {"id": "required", "since": "required"},
        },
    ],
)

agent = Agent(
    name="ShoalWatcher",
    tools=[shoal_tool],
    instructions="""
    Monitor Shoal Intelligence for high-signal events (signal > 5.0).
    Focus on security_incident, partnership, and investment categories.
    When a high-signal event is detected, summarize it and flag for review.
    """,
)

agent.run()
```

### JavaScript SDK

```javascript theme={null}
import { OpenClaw } from "openclaw";

const agent = new OpenClaw({
  tools: [{
    name: "shoal",
    baseUrl: "https://api.shoal.xyz/v1",
    headers: { Authorization: "Bearer YOUR_SHOAL_API_KEY" },
  }],
});

// Agent monitors for high-signal events
const result = await agent.execute({
  task: "Check Shoal signal events from the last hour. Flag any with signal > 5.0.",
  actions: [
    {
      tool: "shoal",
      endpoint: "/signal/all",
      params: {
        since: new Date(Date.now() - 3600_000).toISOString(),
        limit: 20,
      },
    },
  ],
});
```

## Example: OpenClaw + Shoal Pipeline

Combined with Shoal, an OpenClaw agent can:

1. **Detect** a partnership event via `/v1/radar/byCategory?category=partnership`
2. **Evaluate** the opportunity using the brief endpoint
3. **Act** on the intelligence in downstream workflows

```
┌──────────────┐   poll/webhook    ┌──────────────┐
│ OpenClaw     │ ◄───────────────► │  Shoal API   │
│ Agent        │                   │ api.shoal.xyz│
└──────────────┘                   └──────────────┘
```

## Recommended Endpoints

| Endpoint                               | Agent Use Case                                        |
| -------------------------------------- | ----------------------------------------------------- |
| `/v1/signal/all`                       | Real-time monitoring for high-signal events           |
| `/v1/radar/byCategory`                 | Category-specific watchlists (security, partnerships) |
| `/v1/brief?compact=true`               | Lightweight org summaries for agent context           |
| `/v1/brief/batch`                      | Batch portfolio monitoring (up to 25 orgs)            |
| `/v1/organizations/byOrganizationName` | Entity resolution — map names to Shoal org IDs        |

## Rate Limits

OpenClaw agents should respect Shoal's rate limits:

* **100 requests per 60 seconds** per API key
* Use `cursor` pagination for deep scans instead of high-offset queries
* Monitor `X-RateLimit-Remaining` header to throttle proactively
* For high-frequency agents, use [webhooks](/guides/webhooks) instead of polling
