Quick Start
Installation
npm install @ainulabs/ainuCreate An Agent
Step 1: Import Required Modules
import { Agent, Anthropic } from "@ainulabs/ainu";Step 2: Set Up a Provider
const provider = new Anthropic({
apiKey: "your-api-key", // Replace with your actual API key
});Step 3: Create the Agent
Adding a Tool
Step 1: Import the Tool Class
Step 2: Create a Tool
Step 3: Attach the Tool to the Agent
Generating Text
Step 1: Use the generateText Method
generateText MethodStep 2: Combine Tools and Text Generation
Running the Code
Last updated