You can define multiple skills in one project to organize tools logically, then add them all to your agent.
import { LuaAgent, LuaSkill } from 'lua-cli';// Single project, multiple skillsconst catalogSkill = new LuaSkill({...});const cartSkill = new LuaSkill({...});const orderSkill = new LuaSkill({...});// Configure agent with all skills (v3.0.0)export const agent = new LuaAgent({ name: "ecommerce-agent", persona: "You are a helpful shopping assistant...", skills: [catalogSkill, cartSkill, orderSkill]});
import { LuaAgent, LuaSkill } from "lua-cli";import { SearchProductsTool, GetProductTool} from "./tools/ProductTools";import { CreateBasketTool, AddItemTool} from "./tools/BasketTools";import { CreateOrderTool, TrackOrderTool} from "./tools/OrderTools";// Skill 1: Product Catalogconst catalogSkill = new LuaSkill({ name: "catalog-skill", description: "Product browsing and search", context: ` Use search_products when users want to find items. Use get_product for detailed product information. `, tools: [ new SearchProductsTool(), new GetProductTool() ]});// Skill 2: Shopping Cartconst cartSkill = new LuaSkill({ name: "cart-skill", description: "Shopping cart management", context: ` Use create_basket to start shopping. Use add_item to add products to cart. `, tools: [ new CreateBasketTool(), new AddItemTool() ]});// Skill 3: Order Managementconst orderSkill = new LuaSkill({ name: "order-skill", description: "Order creation and tracking", context: ` Use create_order to finalize purchase. Use track_order for delivery status. `, tools: [ new CreateOrderTool(), new TrackOrderTool() ]});// Configure agent with all skills (v3.0.0)export const agent = new LuaAgent({ name: "ecommerce-assistant", persona: `You are a helpful e-commerce shopping assistant.Your role:- Help customers find products- Assist with shopping cart management- Process orders and track deliveriesCommunication style:- Friendly and professional- Proactive with suggestions- Clear about pricing and availability`, skills: [catalogSkill, cartSkill, orderSkill]});
import { LuaAgent, LuaSkill } from 'lua-cli';// FAQ & Knowledge Baseconst knowledgeSkill = new LuaSkill({ name: "knowledge-skill", tools: [ new SearchArticlesTool(), new GetArticleTool() ]});// Ticket Managementconst ticketSkill = new LuaSkill({ name: "ticket-skill", tools: [ new CreateTicketTool(), new UpdateTicketTool(), new GetTicketStatusTool() ]});// Account Managementconst accountSkill = new LuaSkill({ name: "account-skill", tools: [ new GetAccountTool(), new UpdateAccountTool(), new ResetPasswordTool() ]});// Configure support agent (v3.0.0)export const agent = new LuaAgent({ name: "support-agent", persona: "You are a customer support specialist. Help users with their questions, create tickets when needed, and manage accounts.", skills: [knowledgeSkill, ticketSkill, accountSkill]});
import { LuaAgent, LuaSkill } from 'lua-cli';// Menu & Ordersconst menuSkill = new LuaSkill({ name: "menu-skill", tools: [ new ShowMenuTool(), new CreateOrderTool() ]});// Reservationsconst reservationSkill = new LuaSkill({ name: "reservation-skill", tools: [ new MakeReservationTool(), new CheckAvailabilityTool(), new CancelReservationTool() ]});// Loyalty Programconst loyaltySkill = new LuaSkill({ name: "loyalty-skill", tools: [ new CheckPointsTool(), new RedeemRewardTool() ]});// Configure restaurant agent (v3.0.0)export const agent = new LuaAgent({ name: "restaurant-assistant", persona: "You are a friendly restaurant assistant. Help with menu questions, take orders, manage reservations, and handle loyalty rewards.", skills: [menuSkill, reservationSkill, loyaltySkill]});
const allInOne = new LuaSkill({ name: "all-in-one", tools: [ new SearchProductsTool(), new CreateBasketTool(), new CreateOrderTool(), // 20 more tools... ]});
After (Multiple Skills with v3.0.0):
import { LuaAgent, LuaSkill } from 'lua-cli';const productsSkill = new LuaSkill({ name: "products", tools: [new SearchProductsTool(), ...]});const cartSkill = new LuaSkill({ name: "cart", tools: [new CreateBasketTool(), ...]});const orderSkill = new LuaSkill({ name: "orders", tools: [new CreateOrderTool(), ...]});// Configure agent with organized skillsexport const agent = new LuaAgent({ name: "ecommerce-agent", persona: "You are a helpful shopping assistant...", skills: [productsSkill, cartSkill, orderSkill]});