맡기고, 기억하고, 끝까지 해내는 에이전트.
Astreus는 자율 AI 에이전트를 위한 오픈소스 TypeScript 프레임워크입니다. 서브 에이전트, 그래프 워크플로, 영구 메모리, MCP 도구를 타입이 지정된 하나의 API로 다룹니다.
npm install @astreus-ai/astreus새벽 3시에 당신이 볼 대시보드를 대신 읽습니다.
에이전트 하나가 알림과 Grafana 스크린샷을 받아, 무엇이 고장 났는지 인시던트 채널에 알려 줍니다.
import { Agent, Graph } from '@astreus-ai/astreus';const oncall = await Agent.create({ name: 'OnCall', model: 'gpt-6-astra', systemPrompt: 'On-call engineer for the payments API', vision: true, memory: true});await oncall.ask('Checkout p95 alert. What broke?', { attachments: [ { type: 'image', path: './grafana-checkout.png' } ], stream: true, onChunk: (chunk) => process.stdout.write(chunk)});에이전트 문서그다음, 당신이 확인할 것을 확인합니다.
최근 배포는 GitHub, 오류는 Sentry, 부하는 Postgres. 모두 모델이 스스로 호출하는 MCP 서버입니다.
await oncall.addMCPServers([ { name: 'github', command: 'npx', args: ['-y', '@modelcontextprotocol/server-github'] }, { name: 'postgres', command: 'npx', args: [ '-y', '@modelcontextprotocol/server-postgres', 'postgresql://replica.internal/payments' ] }, { name: 'sentry', url: process.env.SENTRY_MCP_URL }]);await oncall.ask( 'What shipped in the last hour, and what broke after?');MCP 문서세 가지 조사를 동시에.
트리아지 에이전트가 로그, 배포, 데이터베이스를 세 전문 에이전트에게 맡기고 결과를 합칩니다.
const logs = await Agent.create({ name: 'LogAnalyst', model: 'llama3.3', systemPrompt: 'Find the first error in the logs.'});const deploys = await Agent.create({ name: 'DeployAuditor', model: 'gpt-6-astra', systemPrompt: 'Audit what shipped in the last hour.'});const database = await Agent.create({ name: 'DbInspector', model: 'gpt-6-astra', systemPrompt: 'Find slow queries and lock waits.'});const triage = await Agent.create({ name: 'Triage', model: 'claude-fable-5-1', systemPrompt: 'Split the work, merge the findings.', subAgents: [logs, deploys, database]});const cause = await triage.ask('Why is checkout slow?', { useSubAgents: true, delegation: 'auto', coordination: 'parallel'});서브 에이전트 문서인시던트 전체를 하나의 그래프로.
상태 페이지를 업데이트하는 동안 진단하고, 진단이 끝난 뒤에만 롤백하고, 검증한 다음 포스트모템을 씁니다.
const incident = new Graph({ name: 'Incident response', maxConcurrency: 3, retryAttempts: 2, subAgentAware: true}, triage);const diagnose = incident.addTaskNode({ prompt: 'Find the root cause', useSubAgents: true});const status = incident.addTaskNode({ prompt: 'Post an update to the status page'});const rollback = incident.addTaskNode({ prompt: 'Roll back the deploy', dependencies: [diagnose]});const verify = incident.addTaskNode({ prompt: 'Confirm p95 < 400 ms', dependencies: [rollback]});incident.addTaskNode({ prompt: 'Write the postmortem', dependencies: [verify, status]});await incident.run();그래프 문서이 인시던트를 전에 본 적이 있습니다.
런북은 지식이고 과거 인시던트는 메모리입니다. 네 시간짜리 스레드도 넘치지 않고 압축됩니다.
const oncall = await Agent.create({ name: 'OnCall', model: 'gpt-6-astra', systemPrompt: 'On-call engineer for the payments API', embeddingModel: 'text-embedding-3-small', memory: true, knowledge: true, autoContextCompression: true, preserveLastN: 5});await oncall.addKnowledgeFromDirectory('./runbooks');await oncall.addMemory( 'Incident 214: checkout latency, pool exhausted.');const seen = await oncall.searchMemoriesBySimilarity( 'checkout latency spike', { similarityThreshold: 0.7, limit: 3 });메모리 문서작업마다 알맞은 모델.
로컬 모델이 로그를 정리해 아무것도 네트워크 밖으로 나가지 않고, 더 큰 모델이 진단하고, 또 다른 모델이 보고서를 씁니다.
const rawLogs = await readFile('./checkout.log', 'utf8');// Scrub raw logs locally. Nothing leaves your network.const scrubbed = await oncall.ask(rawLogs, { model: 'llama3.3'});// A larger model finds the causeconst cause = await oncall.ask(scrubbed, { model: 'claude-fable-5-1'});// Another one writes it upconst report = await oncall.ask('Write the postmortem', { model: 'gpt-6-astra'});프로바이더 문서고객 데이터는 잠긴 채로.
설정 하나로 데이터베이스의 모든 대화 기록, 프롬프트, 런북 조각을 AES-256-GCM으로 암호화합니다.
// .env// ENCRYPTION_ENABLED=true// ENCRYPTION_MASTER_KEY=<openssl rand -hex 32>// DB_URL=postgresql://...// KNOWLEDGE_DB_URL=postgresql://...const oncall = await Agent.create({ name: 'OnCall', model: 'gpt-6-astra', systemPrompt: 'On-call engineer for the payments API', memory: true, knowledge: true});// Stored encrypted: the prompt, the incident thread,// every memory and every runbook chunkawait oncall.ask('Which customers were affected?');보안 문서설치하기 전에.
Node.js 22 이상, 데이터베이스, 그리고 모델이 필요합니다. Astreus는 에이전트와 메모리를 SQLite 또는 PostgreSQL에 저장하고, OpenAI, Claude, Gemini 또는 로컬 Ollama 모델과 연동합니다. npm install @astreus-ai/astreus로 설치합니다.
네. 에이전트에 llama3.3 같은 Ollama 모델을 지정하면 내 컴퓨터에서 실행됩니다. 에이전트 코드는 그대로입니다.
네. 서브 에이전트는 일반 에이전트입니다. 각자의 모델, 프롬프트, 역량으로 만든 뒤 subAgents로 코디네이터에게 넘깁니다. 위임 방식은 자동, 수동, 순차 중에서 고를 수 있습니다.
노드는 자신이 의존하는 모든 노드가 끝나는 즉시 시작됩니다. 그래프에 maxConcurrency를 설정하면 독립적인 노드가 동시에 실행됩니다. 기본값은 하나씩 실행하는 것입니다.
명령어와 인자로 실행할 수 있거나 URL로 접근할 수 있는 서버라면 모두 가능합니다. addMCPServers로 에이전트에 추가하면 해당 도구를 모델이 사용할 수 있습니다.
네. Astreus는 MIT 라이선스이므로 상용 프로젝트에서 사용하고, 수정하고, 배포할 수 있습니다.
© 2026 pzzaworks