supernal-interfaceUniversal AI Interface framework for making applications AI-controllable. Use when adding AI tool decorators, setting up chat adapters, creating AI-callable functions, or integrating CopilotKit.
Install via ClawdBot CLI:
clawdbot install ianderrington/supernal-interfacenpm install @supernal/interface
Decorate functions → AI can call them with full type safety.
import { Tool } from '@supernal/interface';
class TodoApp {
@Tool({
name: 'add_todo',
description: 'Add a new todo item',
category: 'productivity'
})
async addTodo(text: string): Promise<Todo> {
return this.db.create({ text, done: false });
}
@Tool({
name: 'complete_todo',
description: 'Mark a todo as complete'
})
async completeTodo(id: string): Promise<void> {
await this.db.update(id, { done: true });
}
}
import { createCopilotKitAdapter, ChatUIProvider } from '@supernal/interface';
const adapter = createCopilotKitAdapter({
autoRegisterTools: true,
autoRegisterReadables: true
});
function App() {
return (
<ChatUIProvider adapter={adapter}>
<YourApp />
</ChatUIProvider>
);
}
AI assistants can now discover and call your decorated functions.
| Decorator | Purpose |
|-----------|---------|
| @Tool | Expose function as AI-callable tool |
| @ToolProvider | Class containing multiple tools |
| @Component | React component with AI context |
import { createCopilotKitAdapter } from '@supernal/interface';
const adapter = createCopilotKitAdapter({
autoRegisterTools: true
});
import { ChatUIAdapter } from '@supernal/interface';
class MyAdapter implements ChatUIAdapter {
name = 'my-adapter';
registerTools(tools) { /* convert to your format */ }
render(props) { return <MyChat {...props} />; }
}
import { useToolBinding, usePersistedState, useChatWithContext } from '@supernal/interface';
// Bind a tool to component state
const [todos, setTodos] = useToolBinding('todos', []);
// Persist state across sessions
const [prefs, setPrefs] = usePersistedState('user-prefs', defaults);
// Chat with app context
const { messages, send } = useChatWithContext();
import { StateManager, LocalStorageAdapter } from '@supernal/interface/storage';
const storage = StateManager.getInstance('myapp', new LocalStorageAdapter());
await storage.setState('user', { name: 'Alice' });
import { GherkinParser, TestRunner } from '@supernal/interface/testing';
const feature = GherkinParser.parseFeature(gherkinText);
const tests = await TestRunner.generateTests({ framework: 'jest' });
Available at supernal.ai/enterprise:
Generated Mar 1, 2026
A productivity app where AI assistants can directly manage user tasks by calling decorated functions like adding, completing, or updating todos with full type safety. This enables natural language interaction for task management without manual UI input.
A customer service platform where AI chatbots use decorated tools to fetch order details, process returns, or update customer profiles from backend systems. The framework ensures secure, type-safe API calls triggered through chat interfaces.
A medical application where AI assistants help clinicians input patient data or retrieve records via decorated functions, reducing manual entry errors. It integrates with chat adapters for voice or text-based interactions in clinical settings.
A home automation system where users control devices like lights or thermostats through AI assistants. Decorated functions map to IoT APIs, allowing voice commands to trigger actions with persisted state management for user preferences.
A finance tool where AI generates reports by calling decorated functions to pull data from databases or APIs. It uses React hooks for real-time updates and storage adapters to maintain user-specific settings across sessions.
Offer the framework as a cloud-based service with tiered pricing based on usage, such as number of decorated tools or API calls. Include enterprise features like audit logging and multi-model routing in higher tiers for large organizations.
Sell customized licenses to large companies for on-premises deployment, including advanced features like architecture visualization and auto test generation. Provide dedicated support and compliance tools for regulated industries.
Monetize by selling premium adapters, storage solutions, or testing utilities as add-ons in a marketplace. Offer freemium core framework to attract developers, then upsell specialized components for specific use cases.
💬 Integration Tip
Start by decorating simple functions with @Tool to expose them as AI-callable tools, then integrate a chat adapter like CopilotKit for immediate AI interaction in your application.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection