mirror of
https://github.com/Mintplex-Labs/abitat.git
synced 2026-07-21 00:05:25 -04:00
30 lines
719 B
TypeScript
30 lines
719 B
TypeScript
import {AIbitat} from '../src'
|
|
import {terminal} from '../src/plugins'
|
|
|
|
const aibitat = new AIbitat({
|
|
nodes: {
|
|
client: 'manager',
|
|
manager: ['mathematician', 'reviewer', 'client'],
|
|
},
|
|
config: {
|
|
client: {
|
|
type: 'assistant',
|
|
},
|
|
manager: {type: 'manager'},
|
|
mathematician: {
|
|
type: 'agent',
|
|
role: `You are a mathematician and only solve math problems from client`,
|
|
},
|
|
reviewer: {
|
|
type: 'agent',
|
|
role: `You are a peer-reviewer and you do not solve math problems. Check the result from mathematician and then confirm. Just confirm, no talk.`,
|
|
},
|
|
},
|
|
}).use(terminal())
|
|
|
|
await aibitat.start({
|
|
from: 'client',
|
|
to: 'manager',
|
|
content: '2 + 2 = ?',
|
|
})
|