@projectaria/aria-agents
v0.0.4
Published
Project Aria Agents
Readme
aria
Local development (monorepo)
import { openai } from '@ai-sdk/openai';
import { CombinedAnalysisService, ProgressionEngine, VoltRuntime } from 'aria';
import type { FlowDefinition } from 'aria';
const flow: FlowDefinition = {
id: 'HELLO_FLOW',
name: 'Hello',
startNodeId: 'start',
nodes: {
start: {
id: 'start',
type: 'task',
instructions: 'Say hello and ask what they need help with.',
transitions: [{ to: 'done' }],
},
done: { id: 'done', type: 'end', instructions: 'Done.' },
},
};
const runtime = new VoltRuntime({
flows: new Map([[flow.id, flow]]),
analysisService: new CombinedAnalysisService(openai('gpt-4o-mini')),
progressionEngine: new ProgressionEngine(),
});Default runtime helper
If you want Aria to use an LLM by default when OPENAI_API_KEY is present,
use the helper and optionally set ARIA_OPENAI_MODEL:
import { createDefaultRuntime } from 'aria';
const runtime = createDefaultRuntime({
flows: new Map([[flow.id, flow]]),
guidelines: ['Be concise and friendly.'],
});Examples and demos live in:
aria/apps/examplesaria/apps/nextjs-streaming
