Agent-Friendly API + Skill
This page documents the official machine-facing integration surface for Arklib Iteration 37.
What was added
- Versioned REST API at
/api/agent/v1 - OpenAPI document at
/api/agent/v1/openapi - Raw skill markdown endpoint at
/skill.mdfor bot fetch/discovery - Wallet-session-authenticated write intent endpoints
- Presence wrappers with viewer/session consistency checks
- In-app execution helper:
executeAgentIntent - Official root skill runbook (
SKILL.md)
Core endpoint groups
GET /api/agent/v1/metaGET /api/agent/v1/openapiGET /api/agent/v1/auth/sessionGET /api/agent/v1/spacesand space/page/revision/backlink read routesGET /api/agent/v1/search/pagesPOST /api/agent/v1/intents/*for space/page lifecycle + ownership + extensionPOST|PATCH|DELETE /api/agent/v1/presence/*
Write model
Write routes return validated intents (sdkCall + optional followUpCalls + postconditions).
Transactions remain wallet-signed by the caller; no server-custodied owner write path is used.
Official SKILL.md access and usage
- Fetch the official skill as raw markdown:
GET /skill.md. - If working from the repository, read the root file directly:
SKILL.md. - Follow the runbook sections in order: setup, wallet-session auth flow, deterministic reads, write intents, and error handling.
- For automation/agent integrations, fetch
/skill.mdat runtime to stay aligned with the current runbook text.