OpenAI Agents JS

OpenAI Agents JS

TypeScript/JavaScript용 OpenAI Agents SDK와 AgentOps를 통합하는 방법을 소개해요. 설치와 기본 사용법을 알아볼게요.

출처: 문서

본문

OpenAI Agents JS는 TypeScript로 멀티 에이전트 워크플로우를 구축하기 위한 가볍지만 강력한 SDK예요. AgentOps는 이 워크플로우에 관측성을 제공하도록 원활하게 통합됩니다.

설치 (Installation)

npm install agentops @openai/agents

사용법 (Usage)

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

await agentops.init();

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

const result = await run(agent, 'Hello, world!');
console.log(result.finalOutput);

더 알아보기 (Learn more)