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

# OpenClaw Plugin

> Integrate agntdata as a native tool in your OpenClaw agent.

## Overview

The agntdata OpenClaw plugin registers social media data tools directly in your agent's tool registry. Your agent can then access LinkedIn, YouTube, X, and other platform data as native capabilities.

## Installation

Install the plugin using the OpenClaw CLI:

```bash theme={null}
openclaw plugins install @agntdata/openclaw-agnt-data
```

## Configuration

Add your API key to your `openclaw.json` configuration:

```json theme={null}
{
  "plugins": {
    "entries": {
      "agnt-data": {
        "enabled": true,
        "config": {
          "apiKey": "${AGNTDATA_API_KEY}"
        }
      }
    }
  }
}
```

<Note>
  The `${AGNTDATA_API_KEY}` syntax references an environment variable. Set it in your environment or `.env` file.
</Note>

## Environment Setup

Set your API key as an environment variable:

```bash theme={null}
export AGNTDATA_API_KEY=agnt_live_your_key_here
```

Or add it to your `.env` file:

```bash theme={null}
AGNTDATA_API_KEY=agnt_live_your_key_here
```

## Available Tools

Once installed, your agent has access to tools for all supported platforms. Tools follow the naming pattern `agntdata_{platform}_{operation}`.

### Supported Platforms

* LinkedIn
* YouTube
* X (Twitter)
* TikTok
* Instagram
* Reddit
* Facebook

Each platform provides tools for common operations like fetching profiles, posts, and search.

## Usage Example

Once configured, your agent can use the tools naturally:

**User prompt:**

> "What can you tell me about Microsoft's LinkedIn presence?"

**Agent response:**

> I'll look up Microsoft's LinkedIn profile.
>
> *\[Uses agntdata\_linkedin\_get\_company with username: "microsoft"]*
>
> Microsoft has 22 million followers on LinkedIn. They're headquartered in Redmond, WA and have approximately 228,000 employees. Their recent posts focus on AI and cloud computing announcements.

## Tool Schema

Each tool follows a consistent schema:

```typescript theme={null}
{
  name: "agntdata_linkedin_get_company",
  description: "Get detailed information about a company on LinkedIn",
  parameters: {
    type: "object",
    properties: {
      username: {
        type: "string",
        description: "The company's LinkedIn username or URL"
      }
    },
    required: ["username"]
  }
}
```

## Error Handling

The plugin handles errors gracefully and returns structured error messages:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Company not found with username: nonexistent"
  }
}
```

Your agent can interpret these errors and respond appropriately.

## Credit Usage

Each tool call consumes credits from your agntdata balance. The plugin includes credit information in responses:

```json theme={null}
{
  "success": true,
  "data": { ... },
  "meta": {
    "costCents": 1,
    "purchasedBalanceCents": 949,
    "subscriptionRemainingCents": 500,
    "cached": false,
    "latencyMs": 245
  }
}
```

## Updating the Plugin

To update to the latest version:

```bash theme={null}
openclaw plugins update @agntdata/openclaw-agnt-data
```

## Uninstalling

To remove the plugin:

```bash theme={null}
openclaw plugins uninstall @agntdata/openclaw-agnt-data
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Plugin not found">
    Ensure you've installed the plugin and restarted OpenClaw:

    ```bash theme={null}
    openclaw plugins list
    ```
  </Accordion>

  <Accordion title="Authentication errors">
    Verify your API key is set correctly:

    ```bash theme={null}
    echo $AGNTDATA_API_KEY
    ```
  </Accordion>

  <Accordion title="Tools not appearing">
    Check that the plugin is enabled in `openclaw.json` and restart OpenClaw.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="OpenClaw Skill" icon="graduation-cap" href="/sdks/openclaw-skill">
    Alternative: Use a ClawHub skill instead.
  </Card>

  <Card title="API Reference" icon="code" href="/apis/overview">
    Browse all available endpoints.
  </Card>
</CardGroup>
