Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ag-ui-node-server

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-ui-node-server

AG-UI Node.js server with OpenAI integration

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

AG-UI Node Server

A Node.js server with OpenAI integration for AG-UI applications.

Features

  • 🚀 TypeScript + ESM support
  • 🔌 OpenAI integration
  • ⚡️ Express server
  • 📦 Easy to use API
  • 🔒 Environment-based configuration

Installation

npm install ag-ui-node-server
# or
pnpm add ag-ui-node-server
# or
yarn add ag-ui-node-server

Quick Start

import { OpenAIAgent, createServer } from 'ag-ui-node-server';

// Create an OpenAI agent
const agent = new OpenAIAgent({
  openaiApiKey: process.env.OPENAI_API_KEY,
  model: 'gpt-3.5-turbo',
});

// Create and start the server
const app = createServer(agent);
app.listen(3000, () => {
  console.log('Server running on port 3000');
});

API Reference

OpenAIAgent

import { OpenAIAgent } from 'ag-ui-node-server';

const agent = new OpenAIAgent({
  openaiApiKey: string,
  model?: string,
  temperature?: number,
  maxTokens?: number,
});

Server

import { createServer } from 'ag-ui-node-server';

const app = createServer(agent);

Configuration

Environment variables:

  • OPENAI_API_KEY: Your OpenAI API key (required)
  • OPENAI_MODEL: Model to use (default: 'gpt-3.5-turbo')
  • OPENAI_TEMPERATURE: Temperature for generation (default: 0.7)
  • OPENAI_MAX_TOKENS: Max tokens per response (default: 1000)

Development

# Install dependencies
pnpm install

# Start development server
pnpm run dev

# Build
pnpm run build

# Start production server
pnpm start

License

MIT

Keywords

ag-ui

FAQs

Package last updated on 10 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts