Skip to content

JSONFIRST/jsonfirst-autogen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonfirst-autogen

npm version

AutoGen agents loop indefinitely on ambiguous user input.

JSONFIRST adds a structured intent layer that routes messages to the right agent deterministically.

Intent → Route → Agent.

JSONFIRST helps build reliable AI agents by converting natural language into structured JSON intent.

User message
    ↓
JSONFIRST (JDON: action + object + domain)
    ↓
Route to correct AutoGen agent
    ↓
Deterministic execution

Quick Example

const { routeMessage } = require('jsonfirst-autogen');

const { jdon, routeTo } = await routeMessage(
  "generate a monthly sales report",
  process.env.JSONFIRST_API_KEY,
  {
    generate: 'report_agent',
    send: 'email_agent',
    book: 'calendar_agent'
  }
);

console.log(routeTo); // → "report_agent"
console.log(jdon.jdons[0].action.normalized); // → "generate"

Installation

npm install jsonfirst-autogen

Get your API key at jsonfirst.com → Dashboard → API Console.


API

const { parseIntent, routeMessage } = require('jsonfirst-autogen');
Function Description
parseIntent(text, apiKey, opts) Returns structured JDON
routeMessage(text, apiKey, routingMap) Returns { jdon, routeTo } based on action

Links


License

MIT © JSONFIRST

Releases

No releases published

Packages

 
 
 

Contributors