Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityWindows-Update beschädigt wichtige Datenrettungsfunktion(22.09.2026 um 09:04 Uhr)
Sichere ProgrammierungBuilding an Accessible Ecommerce Product Page with WCAG 2.2(22.09.2026 um 03:39 Uhr)
Sichere ProgrammierungGet Your Website Protected in 10 Minutes with SafeLine WAF(22.09.2026 um 08:42 Uhr)
Sichere ProgrammierungIntroduction to SPRINGBOOT(22.09.2026 um 08:42 Uhr)
Windows Tipps & SecurityWindows-Update beschädigt wichtige Datenrettungsfunktion(22.09.2026 um 09:04 Uhr)
Sichere ProgrammierungBuilding an Accessible Ecommerce Product Page with WCAG 2.2(22.09.2026 um 03:39 Uhr)
Sichere ProgrammierungGet Your Website Protected in 10 Minutes with SafeLine WAF(22.09.2026 um 08:42 Uhr)
Sichere ProgrammierungIntroduction to SPRINGBOOT(22.09.2026 um 08:42 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Run your first AI agent in Java — for free, with Mistral

Every "build an AI agent" tutorial I find assumes two things: you write Python, and you have a paid OpenAI key. I write Java and I didn't want to pay just to experiment. So here's the version nobody writes: a real LLM-backed agent, on the…

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

Every "build an AI agent" tutorial I find assumes two things: you write Python, and you have a paid OpenAI key. I write Java and I didn't want to pay just to experiment.



So here's the version nobody writes: a real LLM-backed agent, on the JVM, for free — using Mistral's free tier and AgentFlow4J, an open-source orchestration runtime on top of Spring AI. About ten minutes, start to finish.






Step 1 — Create a Mistral account



Go to console.mistral.ai and sign up (email, Google, or GitHub). You land on La Plateforme, the developer console.






Step 2 — Get a free API key



Open API KeysCreate new key, name it, copy it (you only see it once).



Export it in your shell — never commit it:




export MISTRAL_API_KEY="sk-...your-key..."






mistral-small is covered by the free tier, which is plenty for building and testing.






Step 3 — Add the dependencies



AgentFlow4J ships via JitPack. Add it plus Spring AI's Mistral starter:




<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.datallmhub.agentflow4j</groupId>
<artifactId>agentflow4j-starter</artifactId>
<version>v0.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-mistral-ai</artifactId>
</dependency>









Step 4 — Point Spring AI at Mistral






# application.yml
spring:
ai:
mistralai:
api-key: ${MISTRAL_API_KEY}
chat:
options:
model: mistral-small-latest
temperature: 0.3









Step 5 — Write and run an agent






@Bean
CommandLineRunner demo(ChatClient.Builder chatClientBuilder) {
Agent assistant = ExecutorAgent.builder()
.name("assistant")
.chatClient(chatClientBuilder.build())
.systemPrompt("You are a concise, helpful assistant. Answer in one sentence.")
.build();

return args -> {
AgentResult result = assistant.execute(
AgentContext.of("What is backpressure in reactive streams?"));
System.out.println("\nMistral says: " + result.text() + "\n");
};
}






Run with MISTRAL_API_KEY set, and you get a real answer from Mistral — your first LLM agent in Java, for free.






Why a runtime, not just a ChatClient?



A single call is easy. Real systems chain agents, pass state, retry, and need guardrails. That's what AgentFlow4J adds on top of Spring AI: graph orchestration, typed state, checkpoint/resume, and governance gates (budget caps, tool/state policies, human approval) — all idiomatic Java, no Python, no sidecar.



The cookbook has five runnable recipes (RAG, ticket triage, web research, Slack bot, batch processing) if you want to go further.






It's open source (Apache 2.0). If you've been wanting to build agents without leaving the JVM, I'd genuinely love your feedback: github.com/datallmhub/agentflow4j

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Run your first AI agent in Java — for free, with Mistral

Thematisch verwandte Begriffe: your, first, agent, Java · 6 Treffer

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 ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-55210 | Joplin is an open source note-taking and to-do application that organise…
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