npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@evolutese/react

v1.0.0

Published

React components and hooks for building agent-powered UIs with Evolutese

Readme

@evolutese/react

React components and hooks for building agent-powered UIs with the Evolutese runtime.

Installation

npm install @evolutese/react

Peer dependencies: react >= 18, react-dom >= 18. The backend must expose an SSE endpoint via @evolutese/sdk.


Setup

Wrap your app in EvoluteseProvider and point it at your backend:

import { EvoluteseProvider } from '@evolutese/react';

export default function App() {
  return (
    <EvoluteseProvider
      apiEndpoint="http://localhost:4000/api/assistant"
      tenantId="default"
    >
      <YourApp />
    </EvoluteseProvider>
  );
}

Hooks

useEvoluteseAction

Primary hook — SSE streaming, pending state, and result data in one call.

import { useEvoluteseAction } from '@evolutese/react';

function MyComponent() {
  const { execute, isPending, data, error } = useEvoluteseAction({
    onComplete: (result) => console.log('done', result),
    onError:    (err)    => console.error(err),
  });

  return (
    <button onClick={() => execute({ text: 'Create a task', tenant_id: 'default' })}>
      {isPending ? 'Running…' : 'Run'}
    </button>
  );
}

useAgent

Lower-level hook with full message history and raw SSE event log.

import { useAgent } from '@evolutese/react';

const { state, status, send, reset } = useAgent({
  endpoint: 'http://localhost:4000/api/assistant',
  tenantId: 'default',
  onComplete: (data) => console.log(data),
});

await send({ text: 'List all tasks' });
// state.messages — full chat history
// state.events   — raw SSE events
// status         — 'idle' | 'running' | 'streaming' | 'error'

Components

AgentBar

Left sidebar listing all agents and their intents. Fetches the catalog from GET /api/agents and highlights the currently active intent.

<AgentBar
  fetchAgents={async () => (await fetch('/api/agents')).json().then(d => d.agents)}
  brandName="My App"
  width={300}
  activeKey={view?.intent}
  onNavigate={(key) => handleCommand(key)}
  onClose={() => setOpen(false)}
/>

DynamicViewSlot

Center content area. Renders the right view type — table, form, or document — automatically based on the agent response. No frontend logic to write.

<DynamicViewSlot
  view={view}
  onViewChange={setView}
  onQuickCommand={handleCommand}
  quickCommands={['Create a task', 'List tasks']}
/>

CommandPanel

Chat input + message history + streaming execution trace. Supports rich SuggestionCard items (icon, description, accentColor), an onClear prop, and configurable title, header icon, placeholder, and button labels.

<CommandPanel
  messages={messages}
  onCommand={(text) => execute({ text, tenant_id: 'default' })}
  onClear={() => clearThread(threadId)}
  isLoading={isPending}
  width={384}
/>

AgentPanel

Drawer or fullscreen chat panel — an alternative to CommandPanel with a more opinionated layout. Slides in from the right in drawer mode or fills its container in fullscreen mode.

import { AgentPanel, type AgentPanelMessage } from '@evolutese/react';

const messages: AgentPanelMessage[] = [
  { type: 'system', text: 'Welcome! How can I help?' },
  { type: 'user', text: 'List all invoices' },
  { type: 'agent', text: 'Here are your invoices…', streaming: false },
];

<AgentPanel
  mode="drawer"
  open={panelOpen}
  onClose={() => setPanelOpen(false)}
  context={[{ label: 'Tenant: acme', active: true }]}
  messages={messages}
  suggestions={['Create invoice', 'List customers']}
  onSend={(text) => execute({ text, tenant_id: 'default' })}
  isLoading={isPending}
  modelLabel="gemini"
/>

Message types

| type | Fields | Rendered as | |------|--------|------------| | system | text | Muted system note | | user | text | Right-aligned user bubble | | agent | text, html?, streaming?, formLink? | Left-aligned agent bubble | | tool | name, args? | Compact tool-call badge | | result | text, ok? | Success/error result line |


Full layout

The three components are designed to compose into a standard agent UI:

import { EvoluteseProvider, AgentBar, DynamicViewSlot, CommandPanel, AgentPanel } from '@evolutese/react';

export default function Layout() {
  return (
    <EvoluteseProvider apiEndpoint="http://localhost:4000/api/assistant" tenantId="default">
      <div className="flex h-screen">
        <AgentBar fetchAgents={fetchAgents} brandName="My App" onNavigate={handleCommand} />
        <div className="flex-1">
          <DynamicViewSlot view={view} onViewChange={setView} onQuickCommand={handleCommand} />
        </div>
        <CommandPanel messages={messages} onCommand={handleCommand} isLoading={isPending} />
      </div>
    </EvoluteseProvider>
  );
}

evolutese init scaffolds this layout automatically in the generated frontend.


License

MIT