Skip to content

Aganium/vercel-agent-template

Repository files navigation

vercel-agent-template

Deploy an Agenium agent:// endpoint on Vercel Edge in minutes.

Quick Start

  1. Deploy to Vercel:

    Deploy with Vercel

  2. Set environment variables in Vercel dashboard (see .env.example)

  3. Register your agent:

    npm run register https://your-app.vercel.app/api/message

Architecture

/api/message     → POST  — Main agent:// endpoint (Edge Function)
/api/card        → GET   — Agent card (/.well-known/agent.json)
/api/health      → GET   — Health check + auto re-registration (Cron)
/api/register    → POST  — On-demand registration
/                → GET   — Dashboard (Next.js)

Vercel Ecosystem Integration

Feature Usage
Edge Functions Low-latency agent endpoint
KV Cache DNS resolution
Postgres Session state storage
Blob File storage for agent data
Cron Auto health check + re-registration every 5 min
Next.js Visual agent dashboard

Customization

Edit api/message.tshandleMessage() to add your agent logic:

async function handleMessage(text: string, sessionId?: string): Promise<string> {
  // Call OpenAI, run tools, query databases, etc.
  const result = await myAgentLogic(text);
  return result;
}

Configuration

AGENT_API_KEY=dom_your64hexkey
AGENT_NAME=my-agent
AGENT_DESCRIPTION=My Vercel agent
AGENT_CAPABILITIES=general,search

License

MIT

Bug Reporting

This project includes optional bug reporting to the Agenium monitoring server.

Configuration

Set the following environment variables to enable bug reporting:

BUG_REPORT_URL=http://130.185.123.153:3100
BUG_REPORT_TOKEN=your_token_here

Bug reporting is disabled by default — it only activates when BUG_REPORT_TOKEN is set. Reports are sent asynchronously (fire and forget) and never block the main application.

About

Deploy an **Agenium agent:// endpoint** on Vercel Edge in minutes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors