# jzanecook-e2b-sdk-test

> API for interacting with Agent

Latest version **0.1.3** (published 2023-07-21) · 0 weekly downloads

## Install

```sh
npm install jzanecook-e2b-sdk-test
pnpm add jzanecook-e2b-sdk-test
yarn add jzanecook-e2b-sdk-test
bun add jzanecook-e2b-sdk-test
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-07-21 |
| First published | 2023-07-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 24 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | jzanecook |

## Links

- npm: https://www.npmjs.com/package/jzanecook-e2b-sdk-test
- npm.io page: https://npm.io/package/jzanecook-e2b-sdk-test

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^9.0.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [express-openapi-validator](https://npm.io/package/express-openapi-validator.md) ^5.0.4

## Recent versions

- 0.1.3 (latest) — 2023-07-21
- 0.1.2 — 2023-07-21
- 0.1.1 — 2023-07-21
- 0.1.0 — 2023-07-21

## README

<h1 align="center">
  <img width="200" src="https://raw.githubusercontent.com/e2b-dev/e2b/main/docs-assets/logoname-black.svg#gh-light-mode-only" alt="e2b">
  <img width="200" src="https://raw.githubusercontent.com/e2b-dev/e2b/main/docs-assets/logoname-white.svg#gh-dark-mode-only" alt="e2b">
  SDK
</h1>

<h2 align="center">Developer-first platform for deploying, testing, and monitoring AI agents</h2>

<h4 align="center">
  <a href="https://e2b.dev">Website</a> |
  <a href="https://discord.gg/U7KEcGErtQ">Discord</a> |
  <a href="https://twitter.com/e2b_dev">Twitter</a>
</h4>

<h4 align="center">
  <a href="https://discord.gg/U7KEcGErtQ">
    <img src="https://img.shields.io/badge/chat-on%20Discord-blue" alt="Discord community server" />
  </a>
  <a href="https://twitter.com/e2b_dev">
    <img src="https://img.shields.io/twitter/follow/infisical?label=Follow" alt="e2b Twitter" />
  </a>
</h4>

## Development

This was developed with the following dependencies:

- _node v18.16.0_
- _ts-node v10.9.1_
- _prettier 3.0.0_
- _pnpm 8.6.9_

During development, you should be able to simply import the Agent from `src/index.ts` and run using `ts-node`.

## Example

The minimal example is below. This creates a simple agent which performs no tasks itself, but does create the agent API.

```typescript
import Agent from "@e2b/agent-sdk";
import { StepResult, StepHandler } from "@e2b/agent-sdk";

const taskHandler = async (taskInput: any | null): Promise<StepHandler> => {
  console.log(`task: ${taskInput}`);

  const stepHandler = async (stepInput: any | null): Promise<StepResult> => {
    console.log(`step: ${stepInput}`);
    return {
      output: stepInput,
    };
  };

  return stepHandler;
};

const agent = new Agent(taskHandler).start();
```

Run `ts-node` on the example above and you should see the following:

```
Agent listening at http://localhost:8000
```

You can then experiment with the SDK via CURL, as the examples below:

```bash
$ curl -X POST -H "Content-Type: application/json" -d '{ "input": "This is a test of the emergency broadcast system." }' http://localhost:8000/agent/tasks # Create a new Task for the agent
```

```bash
$ curl -X GET -H "Content-Type: application/json" http://localhost:8000/agent/tasks # Get tasks
```

Feel free to ask questions on our Discord, or sign up for the newsletter for updates!

---
_Source: https://npm.io/package/jzanecook-e2b-sdk-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
