Sign In

@neeter/server

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neeter/server

Hono server toolkit for building chat UIs on top of the Claude Agent SDK

Source
npmnpm
Version
0.10.0
Version published
Weekly downloads
35
-63.92%
Maintainers
1
Weekly downloads
 
Created
Source

@neeter/server

A Hono server toolkit that puts a browser UI on the Claude Agent SDK. Manages multi-turn sessions, translates SDK messages into named SSE events, and handles tool-approval permissions — so your React client gets a clean event stream out of the box.

Part of the neeter toolkit.

Install

pnpm add @neeter/server

Peer dependencies:

{
  "@anthropic-ai/claude-agent-sdk": ">=0.2.0",
  "hono": ">=4.0.0"
}

Quick start

import { Hono } from "hono";
import { serve } from "@hono/node-server";
import {
  createAgentRouter,
  SessionManager,
  MessageTranslator,
} from "@neeter/server";

const sessions = new SessionManager(() => ({
  context: {},
  model: "claude-sonnet-4-5-20250929",
  systemPrompt: "You are a helpful assistant.",
  maxTurns: 50,
}));

const translator = new MessageTranslator();

const app = new Hono();
app.route("/", createAgentRouter({ sessions, translator }));

serve({ fetch: app.fetch, port: 3000 });

This gives you eight endpoints:

MethodPathDescription
POST/api/sessionsCreate a session
POST/api/sessions/resumeResume or fork a session by SDK session ID
GET/api/sessions/historyList previous sessions
GET/api/sessions/replay/:sdkSessionIdLoad persisted events for UI replay
POST/api/sessions/:id/messagesSend a message
GET/api/sessions/:id/eventsSSE event stream
POST/api/sessions/:id/permissionsRespond to a permission request
POST/api/sessions/:id/abortAbort the current turn

Key features

  • Multi-turn sessionsSessionManager + PushChannel let users send messages at any time, even while the agent is running.
  • Named SSE eventsMessageTranslator reshapes the SDK's flat message stream into text_delta, tool_start, tool_call, tool_result, and more.
  • Tool result hooksonToolResult lets you inspect what the agent did and emit structured custom events.
  • Permission modesbypassPermissions, default, acceptEdits, or plan — with browser-side approval via PermissionGate.
  • Extended thinking — Pass thinking: { type: "enabled", budgetTokens: N } to stream chain-of-thought reasoning.
  • Session resume & persistence — Resume past conversations with SessionManager.resume(). Opt into persistence with createJsonSessionStore for history and event replay that survive server restarts.
  • Abort — Cancel the current agent turn mid-stream.
  • Sandbox hookscreateSandboxHook restricts file operations to a directory.

Examples

ExampleDescription
basic-chatMinimal server + client setup
live-previewPer-session sandboxes, custom events, abort

Documentation

See the neeter README for full API reference, session context examples, and permission configuration.

License

MIT

FAQs

Package last updated on 23 Feb 2026

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