import { createFileRoute } from '@tanstack/react-router'; import { getNetworkInfo } from '@/lib/network'; export const Route = createFileRoute('/')({ loader: async () => { 'use server'; const { agent, runtime } = await import('@/lib/agent'); const manifest = runtime.manifest.build('http://localhost'); const manifestEntrypoints = manifest.entrypoints || {}; const entrypoints = agent .listEntrypoints() .map( (entry: { key: string; description?: string; stream?: boolean; price?: any; }) => { const manifestEntry = manifestEntrypoints[entry.key]; return { key: String(entry.key), description: entry.description ? String(entry.description) : null, streaming: Boolean(entry.stream), price: entry.price ?? manifestEntry?.pricing?.invoke ?? null, }; } ); return { meta: { name: manifest.name, version: manifest.version, description: manifest.description ?? null, }, entrypoints, }; }, component: HeadlessDashboard, }); function HeadlessDashboard() { const loaderData = Route.useLoaderData(); const network = getNetworkInfo(); return (

Lucid Agent · API Runtime

{loaderData.meta?.name ?? 'Headless Agent'}

{loaderData.meta?.description ? (

{loaderData.meta.description}

) : null}

This project scaffolds the TanStack runtime without a UI shell. Invoke entrypoints via HTTP:

          {`curl -X POST https:///api/agent/entrypoints//invoke \\
  -H "Content-Type: application/json" \\
  -d '{ "input": { ... } }'`}
        

Entrypoints

    {loaderData.entrypoints.map( (entry: { key: string; description?: string | null; streaming: boolean; price?: string | null; }) => (
  1. {entry.key}

    {entry.description ? (

    {entry.description}

    ) : null}

    Streaming: {entry.streaming ? 'yes' : 'no'} · Price:{' '} {entry.price ?? 'free'}

  2. ) )}
); }