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

@robota-sdk/agent-transport-http

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@robota-sdk/agent-transport-http

HTTP transport adapter for exposing InteractiveSession over REST API

beta
latest
Source
npmnpm
Version
3.0.0-beta.63
Version published
Weekly downloads
31
-85.65%
Maintainers
1
Weekly downloads
 
Created
Source

@robota-sdk/agent-transport-http

Hono-based HTTP transport adapter for exposing InteractiveSession over REST API. Compatible with Cloudflare Workers, Node.js, and AWS Lambda.

Installation

pnpm add @robota-sdk/agent-transport-http

Usage

import { createAgentRoutes } from '@robota-sdk/agent-transport-http';
import type { InteractiveSession } from '@robota-sdk/agent-sdk';
import { Hono } from 'hono';

const app = new Hono();

const routes = createAgentRoutes({
  sessionFactory: (_req) => interactiveSession, // resolve per-request
});

// Mount under a prefix
app.route('/agent', routes);

// Or export directly for Cloudflare Workers
export default routes;

The sessionFactory callback receives the Hono request context and returns an InteractiveSession. Use this to resolve sessions by auth token, session ID, or any request-scoped data.

Endpoints

MethodPathRequest BodyResponseDescription
POST/submit{ prompt: string }SSE streamSubmit prompt, stream events
POST/command{ name: string, args: string }ICommandResult JSONExecute system command
POST/abort{ ok: true }Abort current execution
POST/cancel-queue{ ok: true }Cancel queued prompt
GET/messagesTUniversalMessage[] JSONGet message history
GET/contextIContextWindowState JSONGet context window state
GET/executing{ executing: boolean } JSONCheck if currently executing
GET/pending{ pending: string|null } JSONGet queued prompt

SSE Event Types (POST /submit)

EventDataDescription
text_delta{ delta: string }Streaming text chunk
tool_startIToolStateTool execution began
tool_endIToolStateTool execution finished
thinking{ isThinking: boolean }Execution state changed
completeIExecutionResultPrompt completed
interruptedIExecutionResultExecution was aborted
error{ message: string }Execution error

ITransportAdapter

The HTTP transport implements the ITransportAdapter interface from @robota-sdk/agent-sdk:

import { createHttpTransport } from '@robota-sdk/agent-transport-http';
import type { ITransportAdapter } from '@robota-sdk/agent-sdk';

const transport: ITransportAdapter = createHttpTransport();

transport.attach(interactiveSession);
await transport.start();

// Access the Hono app for serving
const app = transport.getApp();

Dependencies

  • @robota-sdk/agent-sdkInteractiveSession
  • hono — HTTP framework

FAQs

Package last updated on 11 May 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