Astreus

Karmaşık İş Akışları

Gelişmiş orkestrasyon desenleriyle sofistike çoklu ajan iş akışları oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum...

Gelişmiş orkestrasyon desenleriyle sofistike çoklu ajan iş akışları oluşturun.

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/complex-workflows
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

Çoklu Ajan İş Akışı

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

// Create specialized agents
const researcher = await Agent.create({
  name: 'Researcher',
  model: 'gpt-4o',
  systemPrompt: 'You research topics thoroughly.'
});

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

// Create workflow pipeline
const pipeline = new Graph({
  name: 'content-pipeline'
}, researcher);

// Define workflow steps
const research = pipeline.addTaskNode({
  prompt: 'Research AI trends in 2024',
  agentId: researcher.id
});

const article = pipeline.addTaskNode({
  prompt: 'Write an article based on the research',
  agentId: writer.id,
  dependencies: [research]
});

// Execute the workflow
const results = await pipeline.run();

// Parse the result and extract the response
if (results.success && results.results[article]) {
  const articleResult = JSON.parse(results.results[article]);
  console.log(articleResult.response);
}

Örneği Çalıştırma

Repository'yi klonladıysanız:

npm run dev

Repository

Eksiksiz örnek GitHub üzerinde mevcuttur: examples/complex-workflows

Son güncelleme: 6 Temmuz 2026