빠른 시작
Astreus 문서에서 빠른 시작에 대해 알아보고, 에이전트 시스템을 구축하기 위한 설정 안내, API 패턴, 실용적인 예제를 확인하세요. 안정적인 Astreus 에이전트 시스템을 구축하는 데 필요한 설정 패턴, API, 실용적인 예제를 알아보세요.
5분 안에 첫 번째 Astreus 에이전트 프로젝트를 만들어보세요.
설치 방법
npx 사용 (권장)
npx create-astreus-agent my-agentnpm create 사용
npm create astreus-agent my-agentpnpm 사용
pnpm create astreus-agent my-agent대화형 설정
1. 프로젝트 이름
? What is your project name? my-agent프로젝트 이름을 입력하세요. 새 디렉터리가 생성됩니다. 문자, 숫자, 대시, 밑줄만 사용할 수 있습니다.
2. 기능 선택
? Which features do you want to include?
◉ Memory - Persistent agent memory with vector search
◉ Knowledge (RAG) - Document ingestion and retrieval
◯ Graph Workflows - DAG-based task orchestration
◯ Sub-Agents - Multi-agent coordination
◯ Custom Plugins - Extensible tool system
◯ MCP Integration - Model Context Protocol support화살표 키와 스페이스바로 기능을 선택하세요. 모든 기능은 선택 사항입니다.
3. LLM 프로바이더
? Which LLM provider do you want to use?
● OpenAI - GPT-4, GPT-3.5
○ Anthropic - Claude
○ Google - Gemini
○ Ollama - Local models
○ Multiple providers - Configure later선호하는 프로바이더를 선택하거나 "Multiple providers"를 선택하여 나중에 구성할 수 있습니다.
4. TypeScript
? Use TypeScript? Yes더 나은 개발자 경험을 위해 TypeScript를 권장합니다.
설치 후 작업
프로젝트가 생성된 후:
# 프로젝트로 이동
cd my-agent
# 의존성 설치
npm install
# 환경 변수 템플릿 복사
cp .env.example .env
# .env 파일에 API 키 입력
nano .env # 원하는 편집기 사용 가능
# 에이전트 시작
npm run dev예제: 첫 대화
실행되면 에이전트가 준비된 상태입니다.
import { Agent } from '@astreus-ai/astreus';
import 'dotenv/config';
const agent = await Agent.create({
name: 'my-agent',
model: 'gpt-4o',
memory: true,
});
// Have a conversation
const response = await agent.ask("Hello! What can you help me with?");
console.log(response);생성된 코드
CLI는 완전한 src/index.ts를 생성합니다.
import { Agent } from '@astreus-ai/astreus';
import 'dotenv/config';
async function main() {
console.log('Starting Astreus Agent...\n');
const agent = await Agent.create({
name: 'my-agent',
model: 'gpt-4o',
systemPrompt: 'You are a helpful AI assistant powered by Astreus.',
memory: true,
});
// Interactive loop
const readline = await import('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
console.log('Agent ready! Type your message (or "exit" to quit):\n');
const prompt = () => {
rl.question('You: ', async (input) => {
if (input.toLowerCase() === 'exit') {
console.log('\nGoodbye!');
rl.close();
process.exit(0);
}
try {
const response = await agent.ask(input);
console.log(`\nAgent: ${response}\n`);
} catch (error) {
console.error('Error:', error instanceof Error ? error.message : error);
}
prompt();
});
};
prompt();
}
main().catch(console.error);요구 사항
- Node.js >= 22.0.0
- npm, yarn 또는 pnpm
- LLM 프로바이더 API 키 (또는 로컬 모델을 위한 Ollama)
다음 단계
마지막 업데이트: 2026년 7월 6일
이 섹션에서