@definable/agents
v0.1.0
Published
A comprehensive React component library for building AI agent interfaces with support for chat, voice, form, media, and coding agents
Maintainers
Readme
@definable/agents
A comprehensive React component library for building AI agent interfaces with support for chat, voice, form, media, and coding agents.
Installation
npm install @definable/agentsUsage
Basic Usage
import { Agent } from '@definable/agents';
function App() {
return (
<Agent
type="chat"
// Additional props...
/>
);
}Advanced Usage
import {
Agent,
useAgentInfo,
defaultTheme,
type AgentProps
} from '@definable/agents';
function MyComponent() {
const agentInfo = useAgentInfo();
const config: AgentProps = {
type: 'chat',
theme: defaultTheme,
// Additional configuration...
};
return <Agent {...config} />;
}Features
- Multiple Agent Types: Chat, Voice, Form, Media, Coding, and Input agents
- TypeScript Support: Fully typed with comprehensive type definitions
- Theme System: Customizable themes with utilities
- React Hooks: Custom hooks for agent management
- Modern Design: Beautiful, production-ready components
- Tree Shakeable: Import only what you need
Exports
Components
Agent- Main agent componentAgent(default export)
Hooks
useAgentInfo- Agent information managementuseChat- Chat-specific functionality
Theme Utilities
defaultTheme- Default theme configurationmergeTheme- Theme merging utility
Types
Complete TypeScript definitions for all components and configurations.
Requirements
- React 16.8+
- TypeScript (optional, but recommended)
License
MIT
