惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
Y
Y Combinator Blog
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
博客园 - 司徒正美
I
InfoQ
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
U
Unit 42

Artificial Intelligence in Plain English - Medium

OpenAI launched GPT-5.5 - it’s the death of digital hand-holding The Future of Agentic AI is Not One Genius Model, it is a Team How AI Development Optimizes Smart Parking Management Systems The FAST Framework: A Practical Responsible AI Checklist for Data Scientists Why is Cloud Migration Consulting Important for Businesses? My Team Caught Me Using AI to Merge PRs. The Code Was Fine. The Trust Wasn’t. SQL Tricks Every Data Scientist Should Know I Stopped Chasing AI Hype and Started Building Systems That Actually Worked GPT-5.5: The Model That Thinks Ahead Mastering AI Storytelling: Crafting Prompts for Captivating Narratives Why So Many Businesses Are Switching to Clawdbot for AI Automation The Growing Dependence on AI Tools — And Why It’s Risky How to Cut Claude Code Costs by At least 2 to 3x How The Google Antigravity Agent Hallucinated NSFW Adult Websites? “Vercel Hack Exposed: How a Simple AI Tool Led to a $2M Data Breach” The Vercel Hack: How One AI Tool Cracked Open the Internet’s Deployment Stack AI Chatbot Development Services for Enterprise Data-Sensitive Processes What AI Agent Developers Should Consider When Designing Agents for High-volume Environments My ChatGPT Responds Better Than Yours, Here is the 3-Step Guide How To Create A Custom AI Chatbot, Train & Deploy It In 48 Hrs Learning in the Age of Intelligent Systems: Why Human Understanding Still Matters Everyone Is Learning AI, So Why Will Most Still Fail? AI Is Learning Faster Than You Think What If Your Next Best Friend Is a Robot That Even Feels Real? OpenAI Quietly Broke the Way You Build AI Apps The AI Superpower Standoff: Why the OpenAI vs. Anthropic War Looks Exactly Like the US vs. Iran The LLM Tools That Actually Matter in Production (Not LangChain, Not the OpenAI SDK) The Most Dangerous Use of Artificial Intelligence Yet! | AI Porn Why Your AI Chatbot Gives Vague Answers (And Why That Should Matter to You) How Do You Prove You’re You, After AI Has Evolved?
Want to Build AI Agents? Start by Calling an LLM API Your...
Muneeb Ahmad · 2026-04-26 · via Artificial Intelligence in Plain English - Medium
Everyone’s talking about agentic AI; autonomous systems that reason, use tools, and chain multiple LLM calls together. But before you reach for a framework like LangChain or CrewAI, do yourself a favor: make a single, raw LLM API call first. Once you see what goes in and what comes back, agents stop feeling like magic and start feeling like plumbing. I built llm-api-playground to make that first step as easy as possible; minimal, copy-paste examples for 4 major providers in both Python and Java. What’s Inside OpenAI (GPT-4o) Anthropic (Claude Sonnet 4.5) Google Gemini (Gemini 2.5 Flash) Mistral (Mistral Large) Each provider has one Python file and one Java file. Every file is independently runnable — no shared base class, no framework, no abstraction layers. Just you and the API. This is the fundamental building block that every AI agent is built on. Your First LLM API Call — Python import os from dotenv import load_dotenv from openai import OpenAI load_dotenv("../.env") client = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "What is the capital of France?"}], ) print(response.choices[0].message.content) That’s it. You send a message, you get a response. Every AI agent starts with this exact exchange. All 4 Python files in the repo follow the same pattern; swap the import and model name and you’re talking to a different provider. Same Thing in Java import com.openai.client.OpenAIClient; import com.openai.client.okhttp.OpenAIOkHttpClient; import com.openai.models.ChatModel; import com.openai.models.chat.completions.ChatCompletionCreateParams; import io.github.cdimascio.dotenv.Dotenv; public class OpenAIChat { public static void main(String[] args) { Dotenv dotenv = Dotenv.configure().directory("..").load(); OpenAIClient client = OpenAIOkHttpClient.builder() .apiKey(dotenv.get("OPENAI_API_KEY")) .build(); ChatCompletionCreateParams params = ChatCompletionCreateParams.builder() .model(ChatModel.GPT_4O) .addUserMessage("What is the capital of France?") .build(); String response = client.chat().completions().create(params) .choices().get(0).message().content().get(); System.out.println(response); System.exit(0); } } Three of the Java examples use official SDKs (OpenAI, Anthropic, Gemini). Mistral uses raw java.net.http since there's no official Java SDK — which also makes a nice example of calling an LLM REST API directly. How to Run Python: git clone https://github.com/muneebsa/llm-api-playground.git cp .env.example .env # add your API keys cd python && pip install -r requirements.txt python openai_chat.py Java (requires Java 17+ and Maven): cd java mvn compile mvn exec:java -Dexec.mainClass="OpenAIChat" Now You’re Ready for Agents Once you’ve run these examples, you’ll understand the core mechanic behind every AI agent: send a prompt, get a completion, act on it, repeat. Frameworks add tool use, memory, and orchestration on top; but this is the foundation. Get comfortable here first. The full repo is at github.com/muneebsa/llm-api-playground . Clone it, make your first API call, and then go build agents. A message from our Founder Hey, Sunil here. I wanted to take a moment to thank you for reading until the end and for being a part of this community. Did you know that our team run these publications as a volunteer effort to over 3.5m monthly readers? We don’t receive any funding, we do this to support the community. If you want to show some love, please take a moment to follow me on LinkedIn , TikTok , Instagram . You can also subscribe to our weekly newsletter . And before you go, don’t forget to clap and follow the writer️! Want to Build AI Agents? Start by Calling an LLM API Yourself was originally published in Artificial Intelligence in Plain English on Medium, where people are continuing the conversation by highlighting and responding to this story.