Infer Agent

Infer Agent

The inferAgent function uses an LLM to generate executable code for your agent based on a natural language prompt.

Usage

import { inferAgent } from 'agentscript-ai/core';
import * as s from 'agentscript-ai/schema';
 
const agent = await inferAgent({
    tools,
    output: s.number(),
    llm,
    prompt: 'Add numbers 1 and 2',
});