Agenten, die delegieren, sich erinnern und die Arbeit zu Ende bringen.

Astreus ist ein Open-Source-Framework in TypeScript für autonome KI-Agenten: Sub-Agenten, Graph-Workflows, persistentes Gedächtnis und MCP-Tools hinter einer typisierten API.

npm install @astreus-ai/astreus

Er liest das Dashboard, das du um 3 Uhr nachts lesen würdest.

Ein Agent nimmt den Alarm und den Grafana-Screenshot und sagt dem Incident-Kanal, was kaputt ist.

import { Agent, Graph } from '@astreus-ai/astreus';const oncall = await Agent.create({  name: 'OnCall',  model: 'gpt-6-astra',  systemPrompt: 'On-call engineer for the payments API',  vision: true,  memory: true});await oncall.ask('Checkout p95 alert. What broke?', {  attachments: [    { type: 'image', path: './grafana-checkout.png' }  ],  stream: true,  onChunk: (chunk) => process.stdout.write(chunk)});
Agent-Doku

Dann prüft er, was du prüfen würdest.

GitHub für das letzte Deployment, Sentry für die Fehler, Postgres für die Last. Jedes ist ein MCP-Server, den das Modell von sich aus aufruft.

await oncall.addMCPServers([  {    name: 'github',    command: 'npx',    args: ['-y', '@modelcontextprotocol/server-github']  },  {    name: 'postgres',    command: 'npx',    args: [      '-y', '@modelcontextprotocol/server-postgres',      'postgresql://replica.internal/payments'    ]  },  { name: 'sentry', url: process.env.SENTRY_MCP_URL }]);await oncall.ask(  'What shipped in the last hour, and what broke after?');
MCP-Doku

Drei Untersuchungen gleichzeitig.

Ein Triage-Agent gibt Logs, Deployments und Datenbank an drei Spezialisten und führt ihre Ergebnisse zusammen.

const logs = await Agent.create({  name: 'LogAnalyst', model: 'llama3.3',  systemPrompt: 'Find the first error in the logs.'});const deploys = await Agent.create({  name: 'DeployAuditor', model: 'gpt-6-astra',  systemPrompt: 'Audit what shipped in the last hour.'});const database = await Agent.create({  name: 'DbInspector', model: 'gpt-6-astra',  systemPrompt: 'Find slow queries and lock waits.'});const triage = await Agent.create({  name: 'Triage', model: 'claude-fable-5-1',  systemPrompt: 'Split the work, merge the findings.',  subAgents: [logs, deploys, database]});const cause = await triage.ask('Why is checkout slow?', {  useSubAgents: true,  delegation: 'auto',  coordination: 'parallel'});
Sub-Agenten-Doku

Der ganze Vorfall als Graph.

Diagnose, während die Statusseite aktualisiert wird, Rollback erst nach der Diagnose, prüfen, dann das Postmortem schreiben.

const incident = new Graph({  name: 'Incident response',  maxConcurrency: 3,  retryAttempts: 2,  subAgentAware: true}, triage);const diagnose = incident.addTaskNode({  prompt: 'Find the root cause', useSubAgents: true});const status = incident.addTaskNode({  prompt: 'Post an update to the status page'});const rollback = incident.addTaskNode({  prompt: 'Roll back the deploy', dependencies: [diagnose]});const verify = incident.addTaskNode({  prompt: 'Confirm p95 < 400 ms', dependencies: [rollback]});incident.addTaskNode({  prompt: 'Write the postmortem',  dependencies: [verify, status]});await incident.run();
Graph-Doku

Er hat diesen Vorfall schon gesehen.

Runbooks sind sein Wissen, frühere Vorfälle sein Gedächtnis, und ein vierstündiger Thread wird komprimiert statt überzulaufen.

const oncall = await Agent.create({  name: 'OnCall',  model: 'gpt-6-astra',  systemPrompt: 'On-call engineer for the payments API',  embeddingModel: 'text-embedding-3-small',  memory: true,  knowledge: true,  autoContextCompression: true,  preserveLastN: 5});await oncall.addKnowledgeFromDirectory('./runbooks');await oncall.addMemory(  'Incident 214: checkout latency, pool exhausted.');const seen = await oncall.searchMemoriesBySimilarity(  'checkout latency spike',  { similarityThreshold: 0.7, limit: 3 });
Memory-Doku

Das richtige Modell für jede Aufgabe.

Ein lokales Modell bereinigt die Logs, damit nichts dein Netz verlässt, ein größeres diagnostiziert, ein anderes schreibt den Bericht.

const rawLogs = await readFile('./checkout.log', 'utf8');// Scrub raw logs locally. Nothing leaves your network.const scrubbed = await oncall.ask(rawLogs, {  model: 'llama3.3'});// A larger model finds the causeconst cause = await oncall.ask(scrubbed, {  model: 'claude-fable-5-1'});// Another one writes it upconst report = await oncall.ask('Write the postmortem', {  model: 'gpt-6-astra'});
Anbieter-Doku

Kundendaten bleiben verschlossen.

Eine Einstellung verschlüsselt jedes Transkript, jeden Prompt und jeden Runbook-Abschnitt in deiner Datenbank mit AES-256-GCM.

// .env// ENCRYPTION_ENABLED=true// ENCRYPTION_MASTER_KEY=<openssl rand -hex 32>// DB_URL=postgresql://...// KNOWLEDGE_DB_URL=postgresql://...const oncall = await Agent.create({  name: 'OnCall',  model: 'gpt-6-astra',  systemPrompt: 'On-call engineer for the payments API',  memory: true,  knowledge: true});// Stored encrypted: the prompt, the incident thread,// every memory and every runbook chunkawait oncall.ask('Which customers were affected?');
Sicherheits-Docs

Vor der Installation.

Node.js 22 oder neuer, eine Datenbank und ein Modell. Astreus speichert Agenten und Erinnerungen in SQLite oder PostgreSQL und spricht mit OpenAI, Claude, Gemini oder einem lokalen Ollama-Modell. Die Installation erfolgt mit npm install @astreus-ai/astreus.

Ja. Gib einem Agenten ein Ollama-Modell wie llama3.3, und er läuft auf deinem eigenen Rechner. Der Agentencode bleibt derselbe.

Ja. Ein Sub-Agent ist ein gewöhnlicher Agent mit eigenem Modell, eigenem Prompt und eigenen Fähigkeiten, der dem Koordinator über subAgents übergeben wird. Die Delegation kann automatisch, manuell oder sequenziell erfolgen.

Ein Knoten startet, sobald alle Knoten abgeschlossen sind, von denen er abhängt. Setze maxConcurrency am Graphen, damit unabhängige Knoten gleichzeitig laufen. Standardmäßig laufen sie nacheinander.

Jeden Server, den du mit einem Befehl und Argumenten starten oder über eine URL erreichen kannst. Füge sie einem Agenten mit addMCPServers hinzu, und ihre Tools stehen dem Modell zur Verfügung.

Ja. Astreus steht unter der MIT-Lizenz. Du darfst es in kommerziellen Projekten verwenden, verändern und ausliefern.

© 2026 pzzaworks

© 2026 pzzaworks