← Back to Plugins
Tools

Agent Models

sinkers By sinkers 👁 60 views ▲ 0 votes

OpenClaw plugin: exposes GET /v1/models for agent discovery (OpenAI-compatible)

GitHub

Configuration Example

{
  "object": "list",
  "data": [
    { "id": "openclaw:main", "object": "model", "created": 1234567890, "owned_by": "openclaw" },
    { "id": "openclaw:elysse", "object": "model", "created": 1234567890, "owned_by": "openclaw" }
  ]
}

README

# openclaw-agent-models

An OpenClaw plugin that exposes `GET /v1/models` on the OpenClaw gateway, returning all configured agents in OpenAI-compatible format.

This enables OpenAI-compatible clients (like [ClawTalk](https://github.com/sinkers/voiceapp)) to automatically discover available agents without manual configuration.

## Response format

```json
{
  "object": "list",
  "data": [
    { "id": "openclaw:main", "object": "model", "created": 1234567890, "owned_by": "openclaw" },
    { "id": "openclaw:elysse", "object": "model", "created": 1234567890, "owned_by": "openclaw" }
  ]
}
```

## Installation

```bash
# 1. Clone or copy plugin files
mkdir -p ~/.openclaw/extensions/agent-models
cp index.ts ~/.openclaw/extensions/agent-models/
cp openclaw.plugin.json ~/.openclaw/extensions/agent-models/
```

Add to your `openclaw.json`:

```json
"plugins": {
  "allow": ["agent-models"],
  "entries": { "agent-models": { "enabled": true } }
}
```

Restart OpenClaw, then test:

```bash
curl http://localhost:18789/v1/models \
  -H "Authorization: Bearer <your-token>"
```

## Requirements

- OpenClaw with gateway HTTP endpoints enabled
- `gateway.http.endpoints.chatCompletions.enabled: true` in `openclaw.json`
tools

Comments

Sign in to leave a comment

Loading comments...