Astreus

빠른 시작

Astreus 문서에서 빠른 시작에 대해 알아보고, 에이전트 시스템을 구축하기 위한 설정 안내, API 패턴, 실용적인 예제를 확인하세요. 안정적인 Astreus 에이전트 시스템을 구축하는 데 필요한 설정 패턴, API, 실용적인 예제를 알아보세요.

2분 안에 Astreus로 첫 번째 AI 에이전트를 만들어 보세요

작업을 실행하고 지능적으로 응답할 수 있는 간단한 에이전트를 만들어 보겠습니다.

시작하기 전에 Astreus가 설치되어 있는지 확인하세요. 아직 설치하지 않았다면 설치 가이드를 따라 진행하세요.

Build your first agent

1

Create Environment File

프로젝트 루트에 .env 파일을 만들고 OpenAI API 키를 추가하세요.

touch .env

.env 파일에 API 키를 추가하세요.

OPENAI_API_KEY=sk-your-openai-api-key-here
2

Create your First Agent

메모리와 시스템 프롬프트를 갖춘 에이전트를 만드세요.

import { Agent } from '@astreus-ai/astreus';

// Create agent
const agent = await Agent.create({
  name: 'ResearchAgent',
  model: 'gpt-4o',
  memory: true,
  systemPrompt: 'You are an expert research assistant.'
});
3

Create and Execute Task

작업을 만들고 에이전트로 실행하세요.

import { Agent } from '@astreus-ai/astreus';

// Create agent
const agent = await Agent.create({
  name: 'ResearchAgent',
  model: 'gpt-4o',
  memory: true,
  systemPrompt: 'You are an expert research assistant.'
});

// Create a task
const task = await agent.createTask({
  prompt: "Research latest news in Anthropic and OpenAI"
});

// Execute the task
const result = await agent.executeTask(task.id);
console.log(result.response);
4

Build a Graph Workflow

여러 작업으로 구성된 워크플로우 그래프를 만드세요.

import { Agent, Graph } from '@astreus-ai/astreus';

// Create agent
const agent = await Agent.create({
  name: 'ResearchAgent',
  model: 'gpt-4o',
  memory: true,
  systemPrompt: 'You are an expert research assistant.'
});

// Create a graph for complex workflows
const graph = new Graph({
  name: 'Research Pipeline',
  defaultAgentId: agent.id
});

// Add task nodes
const researchNode = graph.addTaskNode({
  prompt: 'Research the latest AI developments'
});

const analysisNode = graph.addTaskNode({
  prompt: 'Analyze the research findings',
  dependencies: [researchNode]
});

const summaryNode = graph.addTaskNode({
  prompt: 'Create a summary report',
  dependencies: [analysisNode]
});

// Run the graph
const graphResult = await graph.run();
console.log(graphResult.results[summaryNode]);

축하합니다! Astreus로 첫 번째 AI 에이전트를 만들었습니다.

마지막 업데이트: 2026년 7월 6일