Quickstart
Option 1: High-Level API (Simplest)
import { createRegentAgent } from 'regent-sdk';
import { z } from 'zod';
import { createAgentApp } from '@regent/hono';
const agent = await createRegentAgent({
name: 'my-agent',
description: 'A helpful assistant',
version: '1.0.0',
http: { port: 3000 },
});
// Add an entrypoint
agent.runtime.entrypoints.add({
key: 'greet',
input: z.object({ name: z.string() }),
output: z.object({ message: z.string() }),
handler: async ({ input }) => ({ output: { message: `Hello, ${input.name}!` } }),
});
// Serve it with an adapter (Hono example)
const { app } = await createAgentApp(agent.runtime);
export default {
port: 3000,
fetch: app.fetch,
};Option 2: Using the CLI
Option 3: Low-Level API (Full Control)
Test Your Agent
View the Agent Manifest
List Entrypoints
Invoke an Entrypoint
Add Streaming
Add Payments
Register On-Chain Identity
Project Structure
Next Steps
Last updated