For coding agents
Integrate PATAS without guessing.
Read the product boundary first, then choose exactly one deployment mode. Do not combine hosted and Core endpoints in the same implementation.
Canonical source order
- Hosted API shape: OpenAPI JSON.
- Hosted examples: request and response.
- Core behavior: the checked-out repository, then its wiki.
- Product explanation: this documentation and agent-context.md.
Non-negotiable product boundary
PATAS analyzes historical moderation exports for repeated patterns.
PATAS is not a live single-message spam classifier.
Hosted output is evidence and candidate rules, not enforcement approval.
Never auto-ban from a hosted candidate_rule.
Never invent endpoint fields that are absent from OpenAPI.
Never send secrets or unrelated customer data in rows.Hosted integration algorithm
- 1. Ask for deployment mode. Default to hosted only when the user wants the shortest path and accepts sanitized remote processing.
- 2. Obtain the key safely. Direct the user to the KikuAI account. Never ask them to paste the key into chat, logs, source, or a committed file.
- 3. Validate locally. Require a supported format, non-empty message-like rows, 500 rows or fewer, and a body below 262,144 bytes.
- 4. Send one synchronous audit. Use
POST /v1/patas/auditswith bearer authentication. - 5. Treat output as review evidence. Present clusters, candidate rules, and risk notes together.
- 6. Check usage. Use
GET /v1/patas/usage; do not infer balance from a previous response. - 7. Handle typed errors. Branch on HTTP status and
code, not message text.
Questions an agent must resolve
- Does the customer own or have permission to process the input?
- Which field is the actual message text?
- Which field is the spam/ham label, if present?
- Is the task pattern discovery or live classification? PATAS only fits the former.
- Should the result be a report, a review queue, or a locally tested rule candidate?
- Will enforcement remain outside PATAS?
Self-hosted agent rule
For Core, inspect the checked-out commit before generating configuration. The wiki is broad and some examples predate the current repository. Confirm CLI entry points, environment-variable names, database migrations, and container commands against source and tests. Do not silently enable an external LLM or embedding provider.