Skip to content

JSONFIRST/jsonfirst-mistral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonfirst-mistral

npm version

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 execution

Quick 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-mistral

Get 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

Releases

No releases published

Packages

 
 
 

Contributors