Truffle AI provides a simple yet powerful TypeScript SDK for building AI-powered applications. Our platform makes it easy to create, deploy, and interact with AI agents through a clean and intuitive API.
import { TruffleAI } from 'truffle-ai';// Initialize the clientconst truffle = new TruffleAI('your-api-key');// Deploy an agentconst agent = await truffle.deployAgent({ name: 'My Assistant', instruction: 'You are a helpful AI assistant.', model: 'gpt-4o-mini'});// Run a taskconst response = await agent.run('Hello!');// Or start a chat sessionconst chat = agent.chat();const chatResponse = await chat.send('Hello!');
import { TruffleAI } from 'truffle-ai';const truffle = new TruffleAI('your-api-key');
3
Create an Agent
Copy
Ask AI
const agent = await truffle.deployAgent({ name: 'My Assistant', instruction: 'You are a helpful AI assistant.', model: 'gpt-4o-mini'});
4
Start Using
Copy
Ask AI
// Run a taskconst result = await agent.run('What can you help me with?');// Or start chattingconst chat = agent.chat();const response = await chat.send('Hello!');