openai-agents-js: A Lightweight Framework for Multi-Agent Workflows and Voice Agents

This repository profile is provided by osrepos.com, an open source repository discovery platform.

openai-agents-js: A Lightweight Framework for Multi-Agent Workflows and Voice Agents

Summary

The OpenAI Agents SDK for JavaScript/TypeScript is a powerful, lightweight, and provider-agnostic framework designed for building complex multi-agent workflows. It enables developers to create sophisticated AI applications, including real-time voice agents, by orchestrating multiple LLMs with tools, guardrails, and dynamic handoffs. This SDK streamlines the development of intelligent systems, offering robust features for tracing, debugging, and integrating human-in-the-loop processes.

Repository Information

Analyzed by OSRepos on October 25, 2025

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introdução

O openai-agents-js é o SDK oficial da OpenAI para a construção de fluxos de trabalho multi-agente e agentes de voz em JavaScript/TypeScript. Este framework leve e poderoso é agnóstico em relação ao provedor, suportando as APIs da OpenAI e outras. Ele foi projetado para simplificar a orquestração de múltiplos LLMs, permitindo a criação de sistemas complexos com agentes configurados com instruções, ferramentas, guardrails e transferências de controle (handoffs).

Os conceitos centrais incluem:

  • Agentes: LLMs configurados com instruções, ferramentas, guardrails e handoffs.
  • Handoffs: Chamadas de ferramentas especializadas para transferir o controle entre agentes.
  • Guardrails: Verificações de segurança configuráveis para validação de entrada e saída.
  • Tracing: Rastreamento integrado de execuções de agentes para visualização, depuração e otimização de fluxos de trabalho.

Instalação

Para começar a usar o OpenAI Agents SDK, você pode instalá-lo via npm:

npm install @openai/agents zod@3

Ambientes suportados incluem Node.js 22 ou posterior, Deno e Bun. Há também suporte experimental para Cloudflare Workers com nodejs_compat ativado.

Exemplos

O SDK oferece uma variedade de exemplos para demonstrar suas capacidades. Aqui está um exemplo básico de "Hello World" para criar um agente simples:

import { Agent, run } from '@openai/agents';

const agent = new Agent({
  name: 'Assistant',
  instructions: 'You are a helpful assistant',
});

const result = await run(
  agent,
  'Write a haiku about recursion in programming.',
);
console.log(result.finalOutput);
// Code within the code,
// Functions calling themselves,
// Infinite loop's dance.

O diretório examples/ no repositório GitHub contém exemplos mais completos, incluindo uso de ferramentas, handoffs, agentes de voz em tempo real, paralelização e integração de "human-in-the-loop".

Porquê usar

O openai-agents-js é uma escolha excelente para desenvolvedores que buscam construir aplicações AI avançadas devido às suas características robustas:

  • Fluxos de trabalho multi-agente: Componha e orquestre múltiplos agentes em um único fluxo de trabalho.
  • Integração de ferramentas: Chame ferramentas/funções de forma transparente a partir das respostas do agente.
  • Handoffs dinâmicos: Transfira o controle entre agentes dinamicamente durante uma execução.
  • Agentes de voz em tempo real: Construa agentes de voz em tempo real usando WebRTC ou WebSockets.
  • Rastreamento e depuração: Rastreamento integrado para visualizar e depurar execuções de agentes.
  • Guardrails: Validação de entrada e saída para segurança e confiabilidade.
  • Human-in-the-Loop: Integre aprovação ou intervenção humana em fluxos de trabalho.
  • Suporte a modelos mais amplos: Use modelos não-OpenAI através do adaptador Vercel AI SDK.

Links

Related repositories

Similar repositories that may be relevant next.

DeepFabric: High-Quality Synthetic Data for Agentic AI Systems

DeepFabric: High-Quality Synthetic Data for Agentic AI Systems

July 2, 2026

DeepFabric is an open-source Python library designed to generate high-quality synthetic training data for language models and agent evaluations. It excels at creating domain-specific datasets that teach models to think, plan, and act effectively, including correct tool usage and adherence to schema structures. This comprehensive pipeline also integrates training and evaluation capabilities, ensuring robust model development.

pythonaimachine-learning
agentmemory: Persistent Memory for AI Coding Agents

agentmemory: Persistent Memory for AI Coding Agents

May 27, 2026

agentmemory provides persistent memory for AI coding agents, ensuring they remember past interactions and project context across sessions. This eliminates the need for re-explaining, significantly boosting agent efficiency and reducing token costs. Built on the `iii engine`, it offers high retrieval accuracy and multi-agent support without external databases.

agentmemoryagentsai
agent-service-toolkit: A Comprehensive Toolkit for AI Agent Services with LangGraph

agent-service-toolkit: A Comprehensive Toolkit for AI Agent Services with LangGraph

March 17, 2026

The agent-service-toolkit is a full-featured repository for building and running AI agent services. It leverages LangGraph for sophisticated agent logic, FastAPI for a robust service API, and Streamlit for an interactive chat interface. This toolkit provides a comprehensive and robust template for developing and deploying custom AI agents with ease.

agentslanggraphstreamlit
Deep Agents: The Batteries-Included Agent Harness for Complex AI Tasks

Deep Agents: The Batteries-Included Agent Harness for Complex AI Tasks

March 4, 2026

Deep Agents is an agent harness built on LangChain and LangGraph, designed to simplify the creation of complex AI agents. It comes equipped with essential tools like planning, filesystem access, and the ability to spawn sub-agents, enabling it to handle sophisticated agentic tasks out of the box. This framework provides a ready-to-run agent that can be easily customized with additional tools, models, and prompts.

agentsdeepagentslangchain

Source repository

Open the original repository on GitHub.

16 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️