JavaScript SDK v1.0

AI-Powered Web Automationfor Your Users

Integrate intelligent web agents into your application. Let AI help your users navigate, search, extract data, fill forms, and automate repetitive tasks.

🤖

Natural Language Tasks

Users describe what they want in plain language. The AI understands and executes.

🔍

Data Extraction

Extract structured data from any page. Prices, products, text, links, and more.

📝

Form Automation

Fill forms, select options, check boxes, and submit - all automated.

🔗

Smart Navigation

Click buttons, follow links, scroll to elements, and navigate pages intelligently.

⚖️

Comparison & Analysis

Compare products, prices, features. Get AI-powered recommendations.

👁️

Visual Feedback

Highlight elements, show progress, animate actions for better UX.

Installation

1. Include the SDK

<script src="https://dynamicinterfaces.com/sdk/dynamicui-agent.js"></script>

2. Initialize with your API Key

// Initialize the Agent SDK
DynamicUIAgent.init({
  apiKey: 'sk_live_your_api_key_here',
  debug: true,
  language: 'en',  // 'en' or 'es'
  showVisualFeedback: true,
  autoExecute: true
});

Usage Examples

Execute a Task

Let AI analyze the page and execute actions based on natural language instructions.

// Execute a task with natural language
const result = await DynamicUIAgent.execute(
  "Find all product prices and tell me which is the cheapest",
  {
    onProgress: (progress) => {
      console.log(progress.status, progress.message);
    },
    onActionExecuted: (action) => {
      console.log('Executed:', action.action.type);
    },
    onComplete: (result) => {
      console.log('Recommendation:', result.recommendation);
      console.log('Extracted Data:', result.extractedData);
    }
  }
);

Extract Data

Extract structured data from page elements.

// Extract data from elements
const data = await DynamicUIAgent.extract({
  selector: '.product-card',
  fields: ['text', 'href', 'data-price'],
  multiple: true
});

console.log('Found', data.count, 'products');
console.log(data.data);

Fill Forms

Automate form filling with visual feedback.

// Fill form fields
await DynamicUIAgent.fill('#email', 'user@example.com');
await DynamicUIAgent.fill('#password', 'securepassword');
await DynamicUIAgent.click('#submit-btn');

Search & Find

Search for text on the page and highlight results.

// Find text on page
const results = await DynamicUIAgent.find('free shipping', true);
console.log('Found', results.found, 'matches');

// Wait for element to appear
await DynamicUIAgent.waitFor('.search-results', 5000);

Show Assistant Panel

Display a floating AI assistant panel for users to interact with.

// Show the assistant panel
DynamicUIAgent.showAssistant();

// Hide it when done
DynamicUIAgent.hideAssistant();

API Reference

init(options)Initialize the SDK with your API key and options
execute(task, options)Execute a natural language task with AI
extract(options)Extract data from page elements
fill(selector, value)Fill a form field
click(selector)Click an element
navigate(url, newTab)Navigate to a URL
scroll(options)Scroll to element or by amount
find(text, highlight)Find text on the page
waitFor(selector, timeout)Wait for an element to appear
showAssistant()Show the floating assistant panel
hideAssistant()Hide the assistant panel
getHistory()Get execution history
getCredits()Check remaining credits

Simple Pricing

Pay only for what you use. No monthly fees.

UI Generation

1 credit

per AI-generated UI component

  • GPT-4 powered generation
  • Responsive design
  • Custom styling
Popular

Agent Task

2 credits

per AI agent execution

  • Natural language tasks
  • Data extraction
  • Form automation
  • Smart recommendations