🔧
pai AI & Intelligence
ai-tools
Pre-built AI tool library for PascalAI agents. Provide agents with web search, calculator, code execution, weather, Wikipedia lookup, and unit conversion capabilities.
Install ppm install ai-tools
Usage Example
uses ai_tools; // Assign tools to an agent agent ResearchAgent do tools := [WebSearch, Calculator, WikiLookup, UnitConverter]; on message(q: String) do begin // Agent automatically selects tools based on the query var answer := LLM.Complete(q); send reply(answer); end; end; // Use tools directly in code var results := WebSearch('PascalAI language'); var calc := Calculator('sqrt(144) + 10'); var weather := WeatherCheck('London'); var wiki := WikiLookup('Pascal programming language'); var conv := UnitConverter('100 km to miles');
Features
WebSearch: real-time web search with result snippets
Calculator: safe mathematical expression evaluator
CodeRunner: sandboxed code execution (Python, JS)
WeatherCheck: current weather and forecast by location
WikiLookup: Wikipedia article summary retrieval
UnitConverter: convert between units of measurement
All tools are composable as agent.tools arrays
← Back to Package Index