Astreus

Temel Graf'lar

Çok adımlı süreçleri organize etmek için basit iş akışı graf'ları oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını,...

Çok adımlı süreçleri organize etmek için basit iş akışı graf'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/basic-graphs
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

Temel Graf İş Akışı

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

// Create an agent
const agent = await Agent.create({
  name: 'WorkflowAgent',
  model: 'gpt-4o'
});

// Create a simple sequential graph
const graph = new Graph({
  name: 'research-workflow'
}, agent);

// Add tasks with dependencies
const research = graph.addTaskNode({
  prompt: 'Research artificial intelligence trends'
});

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

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

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

Örneği Çalıştırma

Repository'yi klonladıysanız:

npm run dev

Repository

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

Son güncelleme: 6 Temmuz 2026