Belleğe Sahip Ajan
Kalıcı bellek yeteneklerine sahip ajanlar 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/agent-with-memory
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
# Database for memory storage
DB_URL=sqlite://./astreus.dbBellekli Ajan#
import { Agent } from '@astreus-ai/astreus';
const agent = await Agent.create({
name: 'MemoryBot',
model: 'gpt-6-astra',
memory: true,
systemPrompt: 'You remember our conversation history.'
});
// First conversation
const response1 = await agent.ask("My name is John and I like TypeScript");
console.log(response1);
// Later conversation - agent remembers
const response2 = await agent.ask("What's my name and what do I like?");
console.log(response2); // Should remember John and TypeScriptÖrneği Çalıştırma#
Repository'yi klonladıysanız:
npm run devRepository#
Eksiksiz örnek GitHub üzerinde mevcuttur: examples/agent-with-memory