@artinet/sdk
Version:
A TypeScript SDK for building collaborative AI agents.
33 lines (32 loc) • 1.02 kB
TypeScript
/**
* Copyright 2025 The Artinet Project
* SPDX-License-Identifier: Apache-2.0
*/
import serverless from "serverless-http";
import { ServerParams } from "../server.js";
/**
* Creates a serverless handler for the given parameters and options.
* @note Streaming capabilities are currently not supported in serverless handlers.
* @docs https://github.com/dougmoscrop/serverless-http
*
* @param params - {@link ServerParams}
* @param options - {@link serverless.Options}
* @example
* ```typescript
* import { Handler } from "aws-lambda";
* import { serve } from "@a2a-js/sdk/serverless";
*
* const handler: Handler = serve({
* agent: cr8("MyAgent")
* .text("Hello, world!")
* .agent,
* basePath: "/a2a",
* }, { provider: "aws" });
* ```
* @returns - {@link serverless.Handler}
*/
export declare function serve(params: ServerParams, options: serverless.Options): serverless.Handler;
/**
* @deprecated Use `serve` instead.
*/
export declare const createServerlessHandler: typeof serve;