Tools
Clawtis
Qutis AI (Personalized Dermatology i.e skin and product review analysis) plugin for your personal Openclaw assistant
Install
npm install
npm
Configuration Example
"apiKey": "your_generated_hex_or_secret"
README
# Clawtis

OpenClaw **tool plugin** for the [Qutis Agent API](https://github.com/codeordie-prog/Nova): enqueue dermatology orchestrator turns on `channel=web` and poll assistant replies.
MIT licensed. HTTP only — no Qutis AI backend code in this repository.
## Qutis AI source code
**Clawtis** is the OpenClaw tool plugin only (HTTP client + tools). The **Qutis AI** stack — Agent API, workers, dermatology orchestrator, billing, and OpenAPI contract — is maintained in the **Nova** monorepo:
**[https://github.com/codeordie-prog/Nova](https://github.com/codeordie-prog/Nova)**
Use Nova when you need to run or develop the Qutis backend locally, read `openapi/qutis-agent.yaml`, or deploy your own API instance. Point this plugin’s `apiUrl` at that server (or at the hosted staging URL below).
## Tools
| Tool | API |
|------|-----|
| `qutis_health` | `GET /health` |
| `qutis_send_message` | `POST /v1/agents/turns` — text and/or `image_path` / `image_base64` |
| `qutis_get_turn` | One-shot `GET /v1/agents/turns/{request_id}` |
| `qutis_wait_for_turn` | Polls that URL every `poll_interval_seconds` until done or timeout |
### Images
Pass **`image_path`** (absolute path to the user’s attachment on the gateway machine) or **`image_base64`**. JPEG/PNG/GIF/WebP, max 5 MiB (Nova limit). Caption optional in **`text`**.
### Polling (async turns)
OpenClaw has no push channel from Qutis. Use either pattern:
1. **Blocking (default):** `qutis_send_message` with `wait_for_reply: true` — the tool polls internally every `poll_interval_seconds` (default 2).
2. **Agent-driven async:** `wait_for_reply: false` → returns `request_id` and `next_action` → agent calls **`qutis_wait_for_turn`** with the same `request_id` and your chosen interval.
`qutis_get_turn` is a single snapshot; use `qutis_wait_for_turn` for repeated polls every N seconds.
Contract reference: Nova `openapi/qutis-agent.yaml`.
## Authentication (Agent API token)
Clawtis always talks to a **Qutis HTTP API** (`apiUrl`). You cannot use the plugin without *some* backend URL (your machine, VPS, or hosted Nova).
### Hosted (recommended for OpenClaw without local Nova)
| | |
|--|--|
| **API base** | `https://dermascan-api-staging-plivf742uq-ew.a.run.app` |
| **Health** | `GET /health` |
| **Turns** | `POST /v1/agents/turns`, `GET /v1/agents/turns/{request_id}` |
Set `apiUrl` to that URL (no trailing slash). You still need **`QUTIS_AGENT_API_KEY`** on the hosted API and the same Bearer token in OpenClaw when auth is enabled.
**Bearer token (`apiKey`) is optional on the client** when the server has **not** set `QUTIS_AGENT_API_KEY`. In that mode Nova accepts `/v1/agents/*` with no `Authorization` header (intended for **local dev only**).
**Production:** set the same secret on the **server** and on the **OpenClaw gateway** (plugin config or env).
| Side | Variable / config | Role |
|------|-------------------|------|
| **Nova (API)** | `QUTIS_AGENT_API_KEY` in `.env` | If non-empty, every `POST/GET /v1/agents/*` must send `Authorization: Bearer <token>`. |
| **OpenClaw (plugin)** | `plugins.entries.clawtis.config.apiKey` | Sent as Bearer on agent turns. |
| **OpenClaw (env)** | `QUTIS_AGENT_API_KEY` on the **gateway process** | Used when `apiKey` is omitted in JSON config (recommended so tokens stay out of git). |
Generate a token (example):
```bash
openssl rand -hex 32
```
Put the value in Nova `.env`:
```ini
QUTIS_AGENT_API_KEY=your_generated_hex_or_secret
```
On the gateway host (PowerShell session or service env):
```powershell
$env:QUTIS_AGENT_API_KEY = "your_generated_hex_or_secret"
```
Or in `~/.openclaw/openclaw.json` (only on trusted machines; prefer env/SecretRef):
```json
"apiKey": "your_generated_hex_or_secret"
```
**Do not commit real tokens** to this repo, ClawHub, or public READMEs—use placeholders in docs and keep secrets in env.
If the server requires a key and the plugin omits it, calls return **401** (`missing Bearer token` / `invalid agent API key`).
Billing: turns use `channel=web` and a `client_id` (e.g. `openclaw:local`); credits must exist for that client even when auth succeeds. See Nova `dermascan/billing/billing.md`.
## Requirements
- Node 20+ (OpenClaw docs recommend 24+ for the gateway).
- Running Qutis API + workers + Redis.
- Matching `QUTIS_AGENT_API_KEY` when the API has auth enabled (see above).
## Configuration
Plugin config (OpenClaw gateway) or environment:
| Key / env | Purpose |
|-----------|---------|
| `apiUrl` / `QUTIS_API_URL` | Base URL — **hosted:** `https://dermascan-api-staging-plivf742uq-ew.a.run.app` (no trailing slash); **local dev:** `http://127.0.0.1:8000` |
| `apiKey` / `QUTIS_AGENT_API_KEY` | Bearer token (optional when server auth is off) |
| `defaultClientId` | Default `client_id`, e.g. `openclaw:my-gateway` |
| `defaultPollIntervalSeconds` | Default poll spacing when waiting (1–60, default 2) |
Pass `client_id` per message when multiple humans share one gateway.
## Install from ClawHub (after publish)
```bash
openclaw plugins install clawhub:@codeordie-prog/clawtis@latest
openclaw gateway restart
```
Your ClawHub **owner handle** must match the `@codeordie-prog` scope (or rename the package scope to your ClawHub account).
## Install in OpenClaw (local path)
From this directory:
```bash
npm install
npm run build
```
Link or install the package, then register the extension path in your OpenClaw config (see [OpenClaw tool plugins](https://docs.openclaw.ai/plugins/tool-plugins)):
```bash
openclaw plugins build --entry ./dist/index.js
openclaw plugins validate --entry ./dist/index.js
```
Example plugin config snippet:
```json
{
"plugins": {
"entries": {
"clawtis": {
"enabled": true,
"config": {
"apiUrl": "https://dermascan-api-staging-plivf742uq-ew.a.run.app",
"apiKey": "<your QUTIS_AGENT_API_KEY>",
"defaultClientId": "openclaw:local"
}
}
}
}
}
```
## Develop
```bash
npm test
npm run plugin:validate
```
## Local smoke
1. Start Nova: `uvicorn dermascan.backend.app.main:app` + `do_work.py`.
2. Enable the plugin with your `.env` key.
3. In OpenClaw, ask the agent to call `qutis_health`, then `qutis_send_message` with a short greeting.
tools
Comments
Sign in to leave a comment