Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Windows Tipps & SecurityNighthawk M7 Pro im Test: Flexibler, aber teurer 5G-Router(21.09.2026 um 10:30 Uhr)
Sichere ProgrammierungNeue Gmail-Funktion: So sparst du jetzt Zeit bei Einmalcodes(21.09.2026 um 10:00 Uhr)
Sichere ProgrammierungYour GIF exporter is fine — the container is the problem(21.09.2026 um 10:01 Uhr)
Sichere ProgrammierungCSS, Motion, or GSAP? I Choose by Who Owns the Animation(21.09.2026 um 10:12 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Claude agent vs Claude Code: which one are you actually building?

Search "claude agent boilerplate" and you'll drown in Claude Code results — the agentic CLI, CLAUDE.md files, slash commands, hooks. Great tools. But none of that is what you want if you're trying to build your own agent on the Anthropic S…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Search "claude agent boilerplate" and you'll drown in Claude Code results — the agentic CLI, CLAUDE.md files, slash commands, hooks. Great tools. But none of that is what you want if you're trying to build your own agent on the Anthropic SDK.



Here's the disambiguation, and the ~40 lines that are actually the whole thing.






Two different "Claude agents"





  • Claude Code — Anthropic's agentic coding CLI. You configure it; you don't build it.


  • An agent you build — your app calls the Anthropic SDK in a loop: the model asks for a tool, you run it, feed the result back, repeat until it's done. That loop is the agent.



Most "agent frameworks" just hide that loop from you. It's small enough that you don't need them.






The whole loop






import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();

async function runAgent(userText, tools, runners) {
const messages = [{ role: "user", content: userText }];

for (let i = 0; i < 10; i++) {
const res = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 1024,
tools,
messages,
});

messages.push({ role: "assistant", content: res.content });

// No tool requested -> the model is done.
if (res.stop_reason !== "tool_use") {
return res.content.filter((b) => b.type === "text").map((b) => b.text).join("");
}

// Run every tool it asked for this turn, collect one result each.
const results = [];
for (const block of res.content) {
if (block.type === "tool_use") {
const out = await runners[block.name](block.input);
results.push({ type: "tool_result", tool_use_id: block.id, content: out });
}
}
messages.push({ role: "user", content: results });
}
}






That's it. The four things people get wrong:




  1. Append the assistant turn verbatim — so the model sees its own tool request on the next call.

  2. One tool_result per request, matched by tool_use_id.

  3. Send all results back in a single user message.

  4. Cap the turns so a confused model can't loop forever.






A runnable starter



If you'd rather start from a streaming Next.js app you can deploy in one command, I open-sourced exactly this (MIT): AgentLoop — the whole agent in ~150 readable lines, no framework. Clone it, add a key, deploy.



There's a $29 Pro pack for the patterns you hit in production (parallel tools, persistent memory, retries, rate limiting, approval gates, evals, token metering, and a multi-provider seam so it runs on any model) — but the free core stands alone forever.



Build the loop. Own it. Don't import a black box.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Claude agent vs Claude Code: which one are you actually building?

Thematisch verwandte Begriffe: Claude, agent, Code, which · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94030 | A security vulnerability has been detected in SerenityOS up to 3d83e4509…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick