# For AI agents

These docs are built to be read by coding agents and LLM tools as well as
people.

## Agent skills and the CLI

Hand your coding agent one line:

```
Add SigWise to my app: sigwise.ai/SKILL.md
```

[`/SKILL.md`](https://sigwise.ai/SKILL.md) tells the agent to install the
open-source [`sigwise` CLI](https://github.com/thesigwise/sigwise-cli), which
covers everything the API does (accounts, signals, events, objects, rules,
webhooks, API keys, billing), and the
[SigWise agent skills](https://github.com/thesigwise/agent-skills):

| Skill | What it does |
|-------|--------------|
| `sigwise` | Manage your account with the CLI. |
| `sigwise-integrate` | Add SigWise to your code with the SDKs: events, inline verdicts, webhooks. |

To install them yourself:

```bash
curl -fsSL https://raw.githubusercontent.com/thesigwise/sigwise-cli/main/scripts/install.sh | sh
sigwise login        # or: sigwise signup
sigwise init         # installs the skills into .claude/skills
```

Use `sigwise skills install --agent codex` for `.agents/skills`, or
`--global` to install them for every project. The button at the bottom right
of every page copies the prompt.

## Markdown for every page

Add `.md` to any page's URL to get it as plain Markdown, with code examples
and links to other pages' Markdown:

```
https://sigwise.ai/docs/guide/quickstart     → HTML
https://sigwise.ai/docs/guide/quickstart.md  → Markdown
```

Every HTML page also advertises its Markdown in its head:

```html
<link rel="alternate" type="text/markdown" href="/docs/guide/quickstart.md">
```

Each page has buttons to copy its Markdown or open it in Claude or ChatGPT.
The API reference has a Markdown version too,
/docs/reference.md, generated from the OpenAPI
specification.

## llms.txt

| File | Contains |
|------|----------|
| [`/llms.txt`](https://sigwise.ai/docs/llms.txt) | An index of every page, with a one-line description and its Markdown URL ([llmstxt.org](https://llmstxt.org)). Also at the domain root, `https://sigwise.ai/llms.txt`. |
| [`/llms-full.txt`](https://sigwise.ai/docs/llms-full.txt) | Every page, including the API reference, in one file. Give it to an agent as context. |

`llms.txt` starts with a short summary of the product and its pricing. The
landing page has a Markdown version too, at
https://sigwise.ai/index.md.

## The API contract

For code generation and tool calling, use the OpenAPI 3.1 specification
rather than prose: [`/docs/openapi.json`](https://sigwise.ai/docs/openapi.json) or
[`/docs/openapi.yaml`](https://sigwise.ai/docs/openapi.yaml). The API serves the one for the version
it runs at `/openapi.json`. See [OpenAPI specification](https://sigwise.ai/docs/guide/openapi.md).

## Tips for agents writing integrations

- Authentication needs a fresh HS256 JWT per request, signed with the API key's
  secret; see [Authentication](https://sigwise.ai/docs/guide/authentication.md). Prefer an
  [SDK](https://sigwise.ai/docs/sdks.md), which does this for you.
- Request bodies are decoded strictly: unknown fields are a `400`.
- Never retry `POST /v1/objects/{object_id}/events` blindly; it isn't
  idempotent. See [Errors and retries](https://sigwise.ai/docs/guides/errors.md).
