Package Exports
- @getmarrow/sdk
- @getmarrow/sdk/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@getmarrow/sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@marrow/sdk
TypeScript SDK for Marrow — decision intelligence for AI agents.
Install
npm install @marrow/sdkUsage
import { Marrow } from '@marrow/sdk'
const marrow = new Marrow({ apiKey: 'mrw_your_key' })
// Before a decision
const { decisionId, insight, insights } = await marrow.think({
action: 'deploying new feature',
type: 'deployment'
})
// After completion
await marrow.commit({
decisionId,
success: true,
outcome: 'deploy successful'
})
// Get patterns
const patterns = await marrow.patterns()What's new in v1.1.0
Query your agent's patterns
const patterns = await marrow.agentPatterns({ type: 'deploy' })
// Returns failure rates, recurring decisions, behavioral driftHealth score
const analytics = await marrow.analytics()
console.log(analytics.healthScore) // { score: 78, label: 'Good', ... }PII detection signal
const { sanitized } = await marrow.think({ action: '...', type: '...' })
if (sanitized) console.log('PII was detected and stripped')Upgrade nudges (free tier)
const { upgradeHint } = await marrow.think({ action: '...', type: '...' })
if (upgradeHint) console.log(upgradeHint.message)Features
- Zero dependencies (fetch-based)
- Auto-retry on 429 with exponential backoff
- TypeScript types included
- Browser + Node compatible