Astreus

Temel Alt Ajanlar

Karmaşık görev dağıtımı için birden fazla yapay zeka ajanı oluşturun ve koordine edin. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum...

Karmaşık görev dağıtımı için birden fazla yapay zeka ajanı oluşturun ve koordine edin.

Hızlı Başlangıç

Eksiksiz Örneği Klonlayın

Başlamanın en kolay yolu, eksiksiz örnek repository'sini klonlamaktır:

git clone https://github.com/astreus-ai/examples
cd examples/sub-agents-basic
npm install

Ya da Sadece Paketi Yükleyin

Sıfırdan oluşturmayı tercih ediyorsanız:

npm install @astreus-ai/astreus

Ortam Kurulumu

# .env
OPENAI_API_KEY=sk-your-openai-api-key-here
DB_URL=sqlite://./astreus.db

Basit Alt Ajan Kurulumu

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

// Create specialized sub-agents
const researcher = await Agent.create({
  name: 'Researcher',
  model: 'gpt-4o',
  systemPrompt: 'You are an expert researcher who gathers comprehensive information.'
});

const writer = await Agent.create({
  name: 'Writer',
  model: 'gpt-4o',
  systemPrompt: 'You are a skilled writer who creates clear, engaging content.'
});

// Create main coordinator agent
const mainAgent = await Agent.create({
  name: 'Coordinator',
  model: 'gpt-4o',
  systemPrompt: 'You coordinate tasks between specialized agents.',
  subAgents: [researcher, writer]
});

// Use auto delegation
const result = await mainAgent.ask(
  'Research artificial intelligence trends and write a summary',
  {
    useSubAgents: true,
    delegation: 'auto'
  }
);

console.log(result);

Örneği Çalıştırma

Repository'yi klonladıysanız:

npm run dev

Sıfırdan oluşturduysanız, yukarıdaki kodla bir index.ts dosyası oluşturun ve şunu çalıştırın:

npx tsx index.ts

Repository

Eksiksiz örnek GitHub üzerinde mevcuttur: examples/sub-agents-basic

Son güncelleme: 6 Temmuz 2026