jsonfirst-mistral
v1.0.0
Published
JSONFIRST intent layer for Mistral — structured JSON intent governance for Mistral AI agent pipelines
Maintainers
Readme
jsonfirst-mistral
Mistral is powerful but still needs structured intent to execute reliably.
JSONFIRST adds a governance layer before Mistral acts — converting natural language into structured JDON intent.
Intent → Govern → Mistral.
JSONFIRST helps build reliable AI agents by converting natural language into structured JSON intent.
User input
↓
JSONFIRST (structured JDON)
↓
Mistral (with governed context)
↓
Deterministic executionQuick Example
const { buildSystemPrompt } = require('jsonfirst-mistral');
const Mistral = require('@mistralai/mistralai');
const systemPrompt = await buildSystemPrompt(
"cancel the subscription for user 42",
process.env.JSONFIRST_API_KEY,
"You are a customer success agent."
);
const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY });
const response = await client.chat.complete({
model: 'mistral-large-latest',
messages: [
{ role: 'system', content: systemPrompt },
{ role: 'user', content: "cancel the subscription for user 42" }
]
});Installation
npm install jsonfirst-mistralGet your JSONFIRST API key at jsonfirst.com → Dashboard → API Console.
API
const { parseIntent, buildSystemPrompt } = require('jsonfirst-mistral');| Function | Description |
|---|---|
| parseIntent(text, apiKey, opts) | Returns raw JDON structured intent |
| buildSystemPrompt(text, apiKey, base) | Returns a Mistral system prompt with JDON context injected |
Links
License
MIT © JSONFIRST
