Hızlı Başlangıç
İlk Astreus agent projenizi 5 dakikadan kısa sürede oluşturun. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve...
İlk Astreus agent projenizi 5 dakikadan kısa sürede oluşturun.
Kurulum Yöntemleri
npx Kullanarak (Önerilen)
npx create-astreus-agent my-agentnpm create Kullanarak
npm create astreus-agent my-agentpnpm Kullanarak
pnpm create astreus-agent my-agentİnteraktif Kurulum
1. Proje Adı
? What is your project name? my-agentProje adınızı girin. Yeni bir dizin oluşturulacaktır. Sadece harfler, rakamlar, tire ve alt çizgiye izin verilir.
2. Özellik Seçimi
? Which features do you want to include?
◉ Memory - Persistent agent memory with vector search
◉ Knowledge (RAG) - Document ingestion and retrieval
◯ Graph Workflows - DAG-based task orchestration
◯ Sub-Agents - Multi-agent coordination
◯ Custom Plugins - Extensible tool system
◯ MCP Integration - Model Context Protocol supportÖzellikleri seçmek için ok tuşlarını ve boşluk tuşunu kullanın. Tüm özellikler opsiyoneldir.
3. LLM Sağlayıcısı
? Which LLM provider do you want to use?
● OpenAI - GPT-4, GPT-3.5
○ Anthropic - Claude
○ Google - Gemini
○ Ollama - Local models
○ Multiple providers - Configure laterTercih ettiğiniz sağlayıcıyı seçin veya daha sonra yapılandırmak için "Multiple providers" seçeneğini seçin.
4. TypeScript
? Use TypeScript? YesDaha iyi bir geliştirici deneyimi için TypeScript önerilir.
Kurulum Sonrası
Proje oluşturulduktan sonra:
# Navigate to project
cd my-agent
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
nano .env # or use your preferred editor
# Start the agent
npm run devÖrnek: İlk Konuşma
Çalıştıktan sonra agent'ınız hazırdır:
import { Agent } from '@astreus-ai/astreus';
import 'dotenv/config';
const agent = await Agent.create({
name: 'my-agent',
model: 'gpt-4o',
memory: true,
});
// Have a conversation
const response = await agent.ask("Hello! What can you help me with?");
console.log(response);Oluşturulan Kod
CLI, eksiksiz bir src/index.ts oluşturur:
import { Agent } from '@astreus-ai/astreus';
import 'dotenv/config';
async function main() {
console.log('Starting Astreus Agent...\n');
const agent = await Agent.create({
name: 'my-agent',
model: 'gpt-4o',
systemPrompt: 'You are a helpful AI assistant powered by Astreus.',
memory: true,
});
// Interactive loop
const readline = await import('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
console.log('Agent ready! Type your message (or "exit" to quit):\n');
const prompt = () => {
rl.question('You: ', async (input) => {
if (input.toLowerCase() === 'exit') {
console.log('\nGoodbye!');
rl.close();
process.exit(0);
}
try {
const response = await agent.ask(input);
console.log(`\nAgent: ${response}\n`);
} catch (error) {
console.error('Error:', error instanceof Error ? error.message : error);
}
prompt();
});
};
prompt();
}
main().catch(console.error);Gereksinimler
- Node.js >= 22.0.0
- npm, yarn veya pnpm
- LLM sağlayıcı API anahtarı (veya yerel modeller için Ollama)
Sonraki Adımlar
- Özellikler - Her bir özellik hakkında bilgi edinin
- Yapılandırma - Ortam kurulumu
Son güncelleme: 6 Temmuz 2026
Bu bölümde
Şablonlar
Proje şablonları ve yaygın yapılandırmalar hakkında bilgi. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını, API'leri ve...
Yapılandırma
Astreus agent projeniz için ortam değişkenleri ve yapılandırma seçenekleri. Güvenilir Astreus agent sistemleri oluşturmak için gereken kurulum kalıplarını,...