Developers · BIP v0.1

Build against the protocol.

Your first BIP call in sixty seconds. Read a user’s current behavioral context, push an interrupt trigger from a wearable, or subscribe to outcome webhooks — pick a surface, paste a snippet, ship a behaviorally-aware feature.

This page is the how. The v0.1 spec is the what. If you’re evaluating BIP as a category, start at the spec. If you’re ready to integrate, stay here.

01 · 5-minute integration

Your first BIP call. Read the context.

Install one of the official SDKs (forthcoming — @coyl/protocol for TypeScript, coyl_protocol for Python). Authenticate with an API key. Read the user’s behavioral context. Branch on it. That’s the integration.

typescript
// @coyl/protocol — Read a user's behavioral context (TypeScript)
import { CoylProtocol } from '@coyl/protocol'

const coyl = new CoylProtocol({ apiKey: process.env.COYL_API_KEY! })
const ctx = await coyl.context.get('u_2sj8xks0a')

if (ctx.danger_window_active && ctx.risk_level === 'HIGH') {
  // Your LLM now knows the user is in a high-risk behavioral state
  return llm.respond({
    ...userPrompt,
    systemContext: `User is a ${ctx.archetype} in active danger window.`,
  })
}
python
# coyl_protocol — Trigger an interrupt from a wearable signal (Python)
from coyl_protocol import CoylProtocol

coyl = CoylProtocol(api_key=os.environ["COYL_API_KEY"])
result = coyl.interrupt.trigger(
    user_id="u_2sj8xks0a",
    trigger_source="apple_watch_hrv_spike",
    trigger_type="physiological",
    urgency="HIGH",
)
# result.decision: "FIRE" | "DEFER" | "IGNORE"

02 · What you can build with BIP

Three integration shapes. One protocol.

For LLM platforms

Make every model behaviorally aware.

Inject the Behavioral Context Object into the system prompt of any Claude / GPT / Gemini call. The model stops giving generic advice to a user in a danger window and starts giving the right answer for the moment.

typescript
// Wrap your LLM call with behavioral context
const ctx = await coyl.context.get(userId)

const completion = await anthropic.messages.create({
  model: 'claude-opus-4-7',
  system: `The user is a ${ctx.archetype}.
    Danger window active: ${ctx.danger_window_active}.
    Current excuse pattern: ${ctx.current_excuse_category}.
    Respond accordingly.`,
  messages: [{ role: 'user', content: prompt }],
})

For wearables + health apps

Get the interrupt layer you didn’t build.

Glucose monitors, sleep trackers, GLP-1 apps, ADHD tools — you collect signal. BIP decides when to fire. You push the trigger; BIP returns FIRE / DEFER / IGNORE and (if FIRE) emits the interrupt on your behalf.

typescript
// HRV spike from a Watch? Glucose dip from a CGM? Push the trigger.
const decision = await coyl.interrupt.trigger({
  userId: 'u_2sj8xks0a',
  triggerSource: 'cgm_glucose_dip',
  triggerType: 'physiological',
  urgency: 'MEDIUM',
})

if (decision.decision === 'FIRE') {
  // BIP fired the interrupt — your job is done.
  metrics.record('bip.fire', { source: 'cgm' })
}

For enterprise productivity

Real-time follow-through across teams.

Subscribe to the outcome webhook. Every time an interrupt resolves — stopped, deferred, ignored — your productivity platform learns whether the team is following through on commitments. The data loop closes in real time.

typescript
// Receive outcome webhooks (TypeScript Express/Next.js handler)
app.post('/webhooks/coyl', verifySignature, (req, res) => {
  const event = req.body
  if (event.event === 'INTERRUPT_RESOLVED' && event.outcome === 'STOPPED') {
    // user pulled through — update your retention metrics
  }
  res.sendStatus(200)
})

03 · Auth + scopes

OAuth 2.0, PKCE, consent that’s real.

Server-to-server traffic uses signed API keys. Third-party client integrations use OAuth 2.0 with PKCE. Subjects (users) can revoke consent at any time — revoked tokens return HTTP 410 Gone, a signal to drop the integration immediately.

context:read

Read the current Behavioral Context Object for a consented subject. No PII — only behavioral abstractions.

interrupt:trigger

Push a behavioral signal. The engine decides FIRE / DEFER / IGNORE against the subject’s model.

outcome:subscribe

Receive outcome webhooks after every interrupt — STOPPED, DEFERRED, IGNORED — with pattern updates.

pattern:update

Contribute observed behavioral signal back to the subject’s pattern model with explicit consent.

http
GET https://api.coyl.ai/v1/oauth/authorize
  ?response_type=code
  &client_id=<your_client_id>
  &redirect_uri=<your_redirect_uri>
  &scope=context:read+interrupt:trigger+outcome:subscribe
  &code_challenge=<pkce_challenge>
  &code_challenge_method=S256
  &state=<csrf_token>

→ 302 → <your_redirect_uri>?code=<auth_code>&state=<csrf_token>

04 · Compatibility badge program

BIP-Compatible. Earn the badge.

Any engine that passes the public conformance suite can display the BIP-Compatible badge. Same play as OAuth-Compliant, MCP-Compatible, GraphQL-Spec-Compliant — an open verification ritual the ecosystem trusts. Suite ships open-source at github.com/coyl/bip-conformance (forthcoming).

bash
# Run the conformance suite against your engine
npx @coyl/bip-conformance \
  --engine https://your-engine.example.com \
  --suite v0.1 \
  --output ./conformance-report.json

# Pass → eligible for the BIP-Compatible badge

05 · Coming soon

Public preview Q3 2026.

Q3 2026

COYL Cloud reference engine — public preview

The hosted BIP-compatible engine. Production-grade rate limits, audit log, observability dashboards. Currently in private alpha.

Q3 2026

Official SDKs — TypeScript, Python, Go

First-party SDKs with typed responses, retry semantics, signed-webhook helpers, and idempotency. Distributed via npm, PyPI, and pkg.go.dev.

Q3 2026

Webhook test harness

Local CLI that mocks INTERRUPT_RESOLVED events with valid HMAC signatures so you can build webhook receivers without a live engine.

Q3 2026

Sandbox API keys

Free, rate-limited sandbox keys for any developer with a verified email. Production keys gated on alpha onboarding.

06 · PAP — LLM partners

Build proactive Claude / ChatGPT / Gemini on COYL.

The Proactive AI Protocol is the trust layer foundation labs integrate against to ship proactive features without owning the rate-limit, dedup, consent, or audit infrastructure. Your LLM emits a Proposal; the PAP Coordinator decides whether to allow, queue, or deny against the user’s current behavioral state and consent grants. If allowed, PAP fires through the user’s preferred modality. Your LLM never touches a device API.

typescript
// @coyl/pap-sdk — Propose a proactive intervention (Node.js)
import { COYL } from '@coyl/pap-sdk'

const coyl = new COYL({
  apiKey: process.env.COYL_API_KEY!,
  llmId: 'anthropic-claude-sonnet-3.7',
})

const proposal = await coyl.proposal.create({
  userId: 'u_xyz',
  scopeRequested: ['proactive_food'],
  action: {
    kind: 'interrupt',
    mode: 'high_arousal',
    headline: 'Stop. Hand on the counter. 4 breaths.',
    subhead: '9:47 PM. You said no food after 9.',
  },
  context: {
    trigger: 'danger_window_active:late_night_kitchen',
    confidence: 0.84,
    reasoning: 'HRV dropped 22pts in 90min + sedentary 105min + geofence:kitchen + active commitment:no_food_after_9',
  },
})

if (proposal.decision === 'allowed') {
  // PAP coordinator will fire via the user's preferred modality.
  // Subscribe to the outcome webhook to learn whether the user
  // caught themselves, deferred, or ignored.
}

07 · EAP — LLM partners

Address any device. Through one protocol.

The Edge AI Protocol extends PAP from behavioral interventions to general cross-device action. Your LLM requests a haptic on the user’s Watch, a voice prompt on their iPhone, a screen dim on their Mac — independently or as a multi-device orchestration. The user’s device coordinator evaluates against cached scope grants, fires the actuator natively, returns the outcome.

typescript
// @coyl/eap-sdk — Request a single action on a specific device
import { COYL } from '@coyl/eap-sdk'

const coyl = new COYL({
  apiKey: process.env.COYL_API_KEY!,
  llmId: 'anthropic-claude-sonnet-3.7',
})

const action = await coyl.action.request({
  userId: 'u_xyz',
  deviceId: 'watch-series-9-def',
  actuator: 'haptic',
  params: { pattern: 'double-tap' },
  scopeRequested: 'edge:watch:haptic',
  reasoning: 'HRV spike + active danger window',
  confidence: 0.83,
})

if (action.decision === 'allowed') {
  // The user's Watch coordinator will fire the haptic.
  // Outcome arrives via your subscribed webhook.
}
typescript
// Multi-device orchestration — one user-facing moment, three devices
const orchestration = await coyl.orchestration.create({
  userId: 'u_xyz',
  atomicity: 'all_or_none',
  steps: [
    {
      deviceId: 'watch-series-9-def',
      actuator: 'haptic',
      params: { pattern: 'double-tap' },
      atOffsetMs: 0,
    },
    {
      deviceId: 'iphone-15-pro-abc',
      actuator: 'voice_tts',
      params: { text: 'Stop. Hand on the counter. 4 breaths.' },
      atOffsetMs: 200,
    },
    {
      deviceId: 'macbook-pro-ghi',
      actuator: 'system_dim_screen',
      params: { brightnessPct: 30, durationSec: 60 },
      atOffsetMs: 200,
    },
  ],
})
// atomicity: 'all_or_none' — composite is denied if any step is denied.
// Use 'best_effort' for independent step evaluation.

08 · UAP — User-Authority Protocol

Standing authority for agentic AI.

UAP defines the standing-authority layer. When a user grants their LLM bounded autonomous action, UAP is the trust contract — eight primitives, hard expiry, kill switch, signed audit trail.

bash
# Issue a standing grant under UAP v0.1
curl -X POST https://coyl.ai/api/uap/v1/grant \
  -H "Authorization: Bearer coyl_uap_<partner_id>_<secret>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "u_2sj8xks0a",
    "scopes": ["calendar.write", "messaging.routine"],
    "expires_at": "2026-05-29T17:00:00Z",
    "rules": [
      { "kind": "spending_cap", "max_per_action_usd": 50 },
      { "kind": "quiet_hours", "from": "00:00", "to": "07:00", "tz": "America/Los_Angeles" }
    ],
    "consent_artifact": {
      "version": "0.1",
      "shown_to_user_at": "2026-05-22T16:58:00Z",
      "user_response": "explicit_grant",
      "ui_surface": "settings.standing_authority"
    }
  }'

Note: The /api/uap/v1/* namespace is reserved and currently returns HTTP 501 Not Implemented. The reference engine ships post-Series-A. Specification is final; implementations are encouraged.

09 · EAP — device manufacturers

Run a coordinator. Become an EAP-compliant edge.

Each EAP-compatible device runs a small coordinator daemon (~10K lines per platform). The coordinator receives action requests from EAP cloud, checks the local cache of user scope grants, executes the actuator natively, and reports the outcome. Sensor streams flow in the other direction — the coordinator publishes events to EAP cloud, which fans out to subscribed LLMs.

We ship reference coordinators for every major platform. Device manufacturers can fork + extend for their own hardware.

iOS

Native app extension + App Intents. ~60% actuator coverage; Live Activities, haptics, push, voice TTS.

macOS

Menu bar app + AppleScript + Shortcuts. ~80% actuator coverage; notifications, dim screen, app launch.

watchOS

Watch app + WatchConnectivity. Haptic patterns, complication updates, HRV stream.

Android

Tasker + custom Service. ~85% actuator coverage; least restrictive of the mobile platforms.

Wear OS

Watch app. Haptic + tile updates + HRV stream via Health Services.

Chrome

WebExtension. Tab control, full-screen overlay, web push, active-URL read.

Edge

Shared WebExtension build with Chrome. Same actuator surface.

Firefox

WebExtension. Tab control, push, overlay. Manifest v2 + v3 supported.

Safari

Safari Extension. ~50% coverage; most restrictive of the browsers.

bash
# Reference coordinators — open-source, per-platform
git clone https://github.com/coyl/eap-coordinator-reference

# Each platform ships its own implementation:
#   ios/        — Native app extension + App Intents
#   macos/      — Menu bar app + AppleScript + Shortcuts
#   watchos/    — Watch app + WatchConnectivity
#   android/    — Tasker + custom Service
#   wearos/     — Watch app
#   chrome/     — WebExtension (also Edge, Firefox)
#   safari/     — Safari Extension

# Fork + extend for your hardware. Reach out and we'll
# RFC the manifest schema for your device class.

Get into the alpha.

We’re onboarding integration partners through the private alpha now — wearables, LLM platforms, telehealth, enterprise productivity. Tell us what you’re building and we’ll get you sandbox keys.