UNPKG

agentis

Version:

A TypeScript framework for building sophisticated multi-agent systems

22 lines (21 loc) 948 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initializeFramework = initializeFramework; const Agent_1 = require("../agents/Agent"); const WebSearchTool_1 = require("../tools/WebSearchTool"); const OpenRouterTool_1 = require("../tools/OpenRouterTool"); const AgentRuntime_1 = require("../runtime/AgentRuntime"); const testAgentConfig = { id: 'test-agent-1', name: 'TestAgent', lore: 'I am a test agent for the Agentis Framework', role: 'Tester', goals: ['Test the framework'], tools: [new WebSearchTool_1.WebSearchTool(), new OpenRouterTool_1.OpenRouterTool()] }; async function initializeFramework() { const runtime = new AgentRuntime_1.AgentRuntime(); runtime.registerAgent(new Agent_1.Agent(testAgentConfig.id, testAgentConfig.name, testAgentConfig.lore, testAgentConfig.role, testAgentConfig.goals, testAgentConfig.tools)); await runtime.start(); return runtime; }