# Chronary — agents.md

> Procedural quickstart for AI coding agents. The substantive index is in [`/llms.txt`](https://chronary.ai/llms.txt); this file is its imperative twin, served at the root for parity with the per-repo AGENTS.md convention. It is not a formal standard at the domain level.

If you are an AI agent reading this, do these 4 steps in order. The whole flow takes ≤ 3 HTTP requests plus 1 OTP from the human.

## 1. Sign up

```http
POST https://api.chronary.ai/v1/agent/sign-up
Content-Type: application/json

{
  "email": "<user-supplied email>",
  "tos_version": "<value from GET /v1/terms/current>"
}
```

Response (new email):

```json
{
  "org_id": "org_...",
  "api_key": "chr_sk_..."
}
```

Save `api_key` to `$CHRONARY_API_KEY`. The key works immediately for reads + writes within the introductory free-tier quotas.

## 2. Verify (human-in-the-loop)

Ask the human for the 6-digit OTP that was emailed to them. Then:

```http
POST https://api.chronary.ai/v1/agent/verify
Content-Type: application/json
Authorization: Bearer $CHRONARY_API_KEY

{ "otp": "<6 digits>" }
```

The org is now verified and the key is upgraded to the regular plan tier.

## 3. Create your first calendar

```http
POST https://api.chronary.ai/v1/calendars
Authorization: Bearer $CHRONARY_API_KEY
Content-Type: application/json

{ "name": "Work", "timezone": "America/New_York" }
```

## 4. Schedule

For single-agent events:

```http
POST /v1/events
{ "calendar_id": "cal_...", "title": "Demo", "start_at": "...", "end_at": "..." }
```

For multi-agent coordination (preferred): use scheduling proposals.

```http
POST /v1/scheduling/proposals
{ "title": "Meeting", "participants": ["agt_a", "agt_b"], "candidates": [ ... ] }
```

---

## One-liner bootstrap (does steps 1-4 automatically)

**Recommended — npm (Claude Code, Cursor, Codex, Windsurf, VSCode all bundle Node):**

```bash
npx @chronary/agent-init@latest
```

Accepts `CHRONARY_EMAIL=` and `CHRONARY_OTP=` env vars for non-interactive flows.

**Shell fallback (no Node available):**

```bash
curl -sSfL https://chronary.ai/agent-init.sh | CHRONARY_EMAIL=you@example.com sh
```

Both write the key to `$CHRONARY_API_KEY` and create a smoke calendar to prove write access works.

---

## Install Chronary skills into your IDE

If you are running inside Claude Code, Cursor, Windsurf, VS Code, or Codex, install the Chronary skill packs so the model has the API model + workflow guidance loaded in-context:

```bash
npx @chronary/skills install        # recommended
# or:
curl -sSfL https://chronary.ai/skills.sh | bash
```

This drops `chronary-api`, `chronary-mcp`, `chronary-scheduling` skills into your IDE's skill directory. The model will start citing them automatically when asked Chronary questions.

---

## Differences from `chronary.ai/install.sh`

| Artifact | Purpose |
|---|---|
| `/install.sh` | Installs the `chronary` CLI binary (Go-based developer tool). |
| `/agent-init.sh` | Provisions an **agent identity** (API key + calendar). |
| `/skills.sh` | Installs IDE skill packs for AI assistants. |

They are complementary. An agent typically needs `/agent-init.sh` (or the npx equivalent) plus `/skills.sh`. The CLI binary is for human developers.

---

## See also

- Full LLM context: [`/llms.txt`](https://chronary.ai/llms.txt) → [`docs.chronary.ai/llms-full.txt`](https://docs.chronary.ai/llms-full.txt)
- OpenAPI 3.1: [`api.chronary.ai/openapi.json`](https://api.chronary.ai/openapi.json)
- RFC 9727 api-catalog: [`.well-known/api-catalog`](https://chronary.ai/.well-known/api-catalog)
- MCP server card (SEP-1649 draft): [`.well-known/mcp/server-card.json`](https://chronary.ai/.well-known/mcp/server-card.json)
- Docs: [`docs.chronary.ai`](https://docs.chronary.ai)
