# typeagent

> TypeAgent is an experimental opinionated library that makes it easy to build generative AI Agents using typescript.

Latest version **0.1.2** (published 2024-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install typeagent
pnpm add typeagent
yarn add typeagent
bun add typeagent
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2024-02-23 |
| First published | 2023-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 8 |
| Unpacked size | 130.8 KB |
| Known vulnerabilities | 0 (+7 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | caridy |
| Keywords | schema, LLM, agent, assistant, prompt, TypeScript, validation |

## Links

- npm: https://www.npmjs.com/package/typeagent
- Repository: https://github.com/caridy/TypeAgent
- Homepage: https://github.com/caridy/TypeAgent#readme
- Issues: https://github.com/caridy/TypeAgent/issues
- npm.io page: https://npm.io/package/typeagent

## Dependencies (8)

- [zod](https://npm.io/package/zod.md) ^3.22.4
- [typechat](https://npm.io/package/typechat.md) github:microsoft/TypeChat#main
- [langchain](https://npm.io/package/langchain.md) ^0.1.19
- [langsmith](https://npm.io/package/langsmith.md) ^0.1.1
- [@langchain/core](https://npm.io/package/@langchain/core.md) ^0.1.29
- [@langchain/openai](https://npm.io/package/@langchain/openai.md) ^0.0.14
- [json-to-pretty-yaml](https://npm.io/package/json-to-pretty-yaml.md) ^1.2.2
- [@langchain/langgraph](https://npm.io/package/@langchain/langgraph.md) ^0.0.7

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2024-02-23
- 0.1.1 — 2024-01-17
- 0.1.0 — 2024-01-17
- 0.0.4 — 2023-11-02
- 0.0.3 — 2023-10-16
- 0.0.2 — 2023-10-11
- 0.0.1 — 2023-10-07

## README

# TypeAgent

TypeAgent is an experimental opinionated library that makes it easy to build generative AI agents using TypeScript type system. This is based on the work pioneer by [TypeChat](https://microsoft.github.io/TypeChat/) by Microsoft.

# Getting Started

Install TypeAgent:

```
npm install typeagent
```

## TypeChat

TypeAgent depends on TypeChat, which relies on the environment variables to create the default model abstractions:

```env
OPENAI_API_KEY=ADD_YOURS_HERE # https://platform.openai.com/account/api-keys
OPENAI_MODEL=gpt-4
```

## LangSmith

TypeAgent indirectly uses [LangSmith](https://smith.langchain.com/). If you plan to use TypeAgent, we recommend you [sign up for a LangSmith account](https://smith.langchain.com/). You can use it for development and testing, which helps greatly with debugging the orchestrator and the agents. See the following screenshot:

![LangSmith Screenshot](image.png)

For LangSmith to work, you must define the following environment variables:

```env
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
LANGCHAIN_API_KEY=ADD_YOURS_HERE # https://smith.langchain.com/
LANGCHAIN_PROJECT=YourProjectName
```

# Contributing

Just send the pull request.

You can build TypeAgent from source:

```
npm run build
```

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