API Reference
Complete props reference for the ArctenAgent component
The ArctenAgent component is the core of the Arcten SDK. A customizable AI agent that integrates deeply with your application through custom tools, user context, and UI options.
Props
Prop
Type
Basic Usage
import { ArctenAgent } from "@arcteninc/core";
import "@arcteninc/core/styles";
<ArctenAgent
systemPrompt="You are an expert AI agent tasked with helping the user."
/>Complete Example
import { ArctenAgent } from "@arcteninc/core";
import "@arcteninc/core/styles";
// Define safe tools (auto-execute, read-only)
function searchProducts(query: string) {
return database.products.search(query);
}
function getUserOrders(userId: string) {
return database.orders.findByUser(userId);
}
// Define tools requiring confirmation
function placeOrder(productId: string, quantity: number) {
const order = orderService.create(productId, quantity);
return `Order placed: ${order.id}`;
}
export default function MyApp() {
const user = {
id: "user_123",
email: "user@example.com",
name: "John Doe",
plan: "premium"
};
return (
<div className="flex h-screen">
<div className="flex-1 overflow-scroll">
{/* Your app content */}
</div>
<ArctenAgent
// User & Conversations
user={user}
// Tools
safeTools={[searchProducts, getUserOrders]}
tools={[placeOrder]}
// Configuration
systemPrompt="You are a shopping assistant. Help users find products and complete purchases."
tokenEndpoint="/api/arcten/token"
// UI Customization
title="Shopping Assistant"
theme="auto"
initiallyExpanded={true}
/>
</div>
);
}