AI agents fail when they act on ambiguous input.
JSONFIRST adds a structured intent governance layer before any agent executes — parse, validate, and route natural language deterministically.
Intent → Govern → Execute.
JSONFIRST helps build reliable AI agents by converting natural language into structured JSON intent.
User input (any language, any format)
↓
JSONFIRST (parse + govern)
↓
JDON: { action, object, confidence, domain }
↓
canExecute() → true/false
↓
Agent execution (safe)
const { parseIntent, canExecute, getAction } = require('jsonfirst-ai-agents');
const jdon = await parseIntent(
"cancel the premium subscription for user 42",
process.env.JSONFIRST_API_KEY
);
if (canExecute(jdon, 0.85)) {
const action = getAction(jdon); // → "cancel"
await agents[action].run(jdon);
} else {
console.log('Low confidence — requesting clarification');
}Without JSONFIRST:
User: "remove john" → agent deletes user → irreversible
With JSONFIRST:
User: "remove john" → JDON: { action: "delete", confidence: 0.91 }
→ canExecute(jdon, 0.9) → true → agent deletes safely
npm install jsonfirst-ai-agentsGet your API key at jsonfirst.com → Dashboard → API Console.
const { parseIntent, canExecute, getAction } = require('jsonfirst-ai-agents');| Function | Description |
|---|---|
parseIntent(text, apiKey, opts) |
Returns structured JDON |
canExecute(jdon, threshold) |
Returns true if confidence ≥ threshold (default: 0.8) |
getAction(jdon) |
Returns normalized action string |
| Mode | Use case |
|---|---|
ANTI_CREDIT_WASTE_V2 |
Default — fast, token-efficient |
MAX_PERFORMANCE |
Maximum accuracy for critical actions |
STRICT_PROTOCOL |
Enforces full JSONFIRST compliance |
GUARDIAN_MODE |
Enhanced safety for destructive actions |
MIT © JSONFIRST