Görev Ekleri
Kapsamlı analiz için görevlere birden fazla dosya türü ekleyin. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve...
Kapsamlı analiz için görevlere birden fazla dosya türü ekleyin.
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/task-attachments
npm installYa da Sadece Paketi Yükleyin
Sıfırdan oluşturmayı tercih ediyorsanız:
npm install @astreus-ai/astreusOrtam Kurulumu
# .env
OPENAI_API_KEY=sk-your-openai-api-key-here
DB_URL=sqlite://./astreus.dbBirden Fazla Ek İçeren Görev
import { Agent } from '@astreus-ai/astreus';
const agent = await Agent.create({
name: 'AnalysisAgent',
model: 'gpt-4o',
visionModel: 'gpt-4o', // Specify vision model directly
vision: true // Enable vision for images
});
// Code review task with multiple file types
const reviewTask = await agent.createTask({
prompt: `Perform a comprehensive analysis:
1. Review the code for security issues
2. Check the design mockup for usability
3. Verify dependencies are up to date
4. Review documentation completeness`,
attachments: [
{
type: 'code',
path: './src/auth/login.ts',
name: 'Login Controller',
language: 'typescript'
},
{
type: 'image',
path: './designs/login-ui.png',
name: 'Login UI Mockup'
},
{
type: 'json',
path: './package.json',
name: 'Dependencies'
},
{
type: 'markdown',
path: './docs/api.md',
name: 'API Documentation'
}
],
metadata: {
type: 'comprehensive-review',
priority: 'high'
}
});
const result = await agent.executeTask(reviewTask.id);
console.log('Analysis complete:', result.response);Örneği Çalıştırma
Repository'yi klonladıysanız:
npm run devSıfırdan oluşturduysanız, yukarıdaki kodla bir index.ts dosyası oluşturun ve şunu çalıştırın:
npx tsx index.tsRepository
Eksiksiz örnek GitHub üzerinde mevcuttur: examples/task-attachments
Son güncelleme: 6 Temmuz 2026
Bu bölümde
İlk Ajanınız
Astreus framework ile ilk yapay zeka ajanınızı oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve pratik...
Belleğe Sahip Ajan
Kalıcı bellek yeteneklerine sahip ajanlar oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve pratik...
Bilgi Tabanlı Ajan
Gelişmiş bilgi erişimi için bilgi tabanı yeteneklerine sahip ajanlar oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum...
Görsel Destekli Ajan
Görselleri işleyip analiz edebilen ajanlar oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve pratik...