Beyond Code: Building Your First Non-Coding AI Workflow with Claude Agent SDK
Have you ever wondered what the powerful engine behind Claude Code—one of the best coding tools available—could do besides writing code?
As a developer who has long explored the boundaries of AI automation, I’ve been searching for more lightweight and direct solutions for building agents. While mainstream frameworks like CrewAI and LangChain continue to grow in complexity, I decided to turn my attention to an unexpected tool: the 「Claude Agent SDK」. My hypothesis was simple: if it can give AI exceptional coding capabilities, then applying its core principles—tool use, sub-agent collaboration, and external connectivity—to non-coding workflows might open a more efficient path.
To test this idea, I built a simple yet fully functional example: an agent that automatically finds the latest AI news and translates it into Korean. The result was not only successful but also revealed an overlooked fact: 「building complex automation workflows doesn’t necessarily require starting from scratch with complex frameworks.」
A Complete Walkthrough: The Automated News Research Workflow
Let’s start with a concrete goal and see how an idea becomes reality. Suppose you need to accomplish the following tasks:
-
Research the latest news in the Philippines about flood control projects and the Department of Public Works and Highways (DPWH). -
Organize the results into a Markdown report with source URLs. -
Translate the report into Korean. -
Extract key highlights from it. -
Generate an HTML webpage to display this news. -
Create LinkedIn and Twitter posts based on the content.
The traditional approach might require chaining multiple APIs, writing numerous scripts, and manually collating data. Using the Claude Agent SDK, we simply define the “roles” and “objectives,” and an agent system can accomplish all of this autonomously.
Below is the core script that drives this entire workflow. I’ll use it to break down the key concepts behind it.
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions, AgentDefinition
from claude_agent_sdk.types import McpHttpServerConfig
import os
async def main():
# 1. Connect to an external data source
firecrawl_api_key = os.environ['FIRECRAWL_API_KEY']
firecrawl_mcp = McpHttpServerConfig(
type="http",
url="https://mcp.firecrawl.dev/v2/mcp",
headers={"Authorization": f"Bearer {firecrawl_api_key}"}
)
# 2. Define four specialized sub-agents
translator_agent = AgentDefinition(
description="Translate the content from any language to any other language.",
prompt="You are an expert language translator.",
tools=["Read", "Edit", "Bash", "Grep"]
)
highlights_extractor_agent = AgentDefinition(
description="Extract key highlights from researched news and create a markdown file with the highlights.",
prompt="You are an expert at extracting and summarizing key highlights from news articles...",
tools=["Read", "Write", "Edit"]
)
website_developer_agent = AgentDefinition(
description="Create and develop webpages with HTML, CSS, and JavaScript.",
prompt="You are an expert web developer. Create modern, responsive, and well-structured webpages...",
tools=["Read", "Write", "Edit"]
)
social_media_creator_agent = AgentDefinition(
description="Create engaging LinkedIn and Twitter posts from news content.",
prompt="You are an expert social media content creator...",
tools=["Read", "Write", "Edit"],
)
# 3. Configure the main agent options
options = ClaudeAgentOptions(
model="glm-4.6", # Can seamlessly switch to Claude Sonnet or Haiku models
system_prompt="You are an expert news researcher.",
permission_mode='bypassPermissions',
cwd="/output/path", # Specify working directory; all files will be generated here
mcp_servers={"firecrawl_mcp": firecrawl_mcp}, # Inject the data source
agents={ # Inject the team of sub-agents
"translator-agent": translator_agent,
"highlights-extractor-agent": highlights_extractor_agent,
"website-developer-agent": website_developer_agent,
"social-media-creator-agent": social_media_creator_agent
}
)
# 4. Issue the comprehensive instruction
async for message in query(
prompt="What are the latest news topics in the philippines about flood control projects and dpwh. "
"Write the results to a markdown file. Add urls as references as sources in the markdown file. "
"Also write a translation of the news to Korean using the translator-agent. "
"Write the translation to a separate markdown file. "
"Extract highlights and write to a separate markdown file. "
"Then use the website-developer-agent to create an HTML webpage displaying the AI news "
"with proper styling and save it to a file. "
"Finally, use the social-media-creator-agent to create LinkedIn and Twitter posts "
"based on the AI news and save them to a markdown file.",
options=options
):
print(message) # View the agent's execution log in real-time
asyncio.run(main())
After running this script, the system will automatically generate a series of files in the specified working directory, for example:
-
news_summary.md(original news summary with citations) -
news_korean.md(Korean translated version) -
highlights.md(extracted core highlights) -
news_display.html(a well-styled webpage) -
social_posts.md(social media posts adapted for different platforms)
Core Concepts Explained: The Four Pillars of the Workflow
This seemingly complex workflow is actually built on four clear core concepts. Understanding them is key to mastering orchestration with the Claude Agent SDK.
Pillar 1: MCP Servers – The Agent’s “Senses” and “Hands”
Model Context Protocol (MCP) servers are the bridge for agents to interact with the real world. While not unique to the Claude Agent SDK, the SDK’s native support makes using them exceptionally straightforward.
-
「What is it?」 A standardized external capability server, which can be thought of as a plugin for the agent. Through MCP, an agent gains the ability to “see” (read web data), “hear” (connect to databases), and “act” (call APIs). -
「Role in this example:」 We configured a connection to the Firecrawl MCP service via McpHttpServerConfig. This equips the main agent with a “web crawler” tool, enabling it to autonomously access the internet based on instructions (“find Philippine flood control news”) and collect real-time information, moving beyond mere reasoning on trained data. -
「Key Capability Metric:」 Through MCP, agents can break through the static information limits of prompts to perform 「dynamic data retrieval」, 「real-time information summarization」, and 「structured file writing」. This marks AI’s transition from a “chatter” to an “executor.”
Pillar 2: The Sub-Agent System – A Modular “Team of Experts”
This is the key to achieving division of labor and collaboration in complex workflows. Instead of training a single “omnipotent” AI, you assemble a team of specialists, each with their own role.
-
「What is it?」 The AgentDefinitionobject. Each sub-agent is a functional module with a clear responsibility description (description), role instruction (prompt), and tool permissions (tools). -
「Division of Labor in this Example:」 -
「Translation Agent:」 Specializes in language conversion. Its toolset includes Read(read files),Edit(edit),Bash(execute commands),Grep(search text) to handle text in various formats. -
「Highlights Extraction Agent:」 Specializes in information distillation. It uses Read,Write,Edittools to locate and summarize core points from text. -
「Website Developer Agent:」 Specializes in front-end construction. It generates structured HTML, CSS, and JavaScript code files based on content. -
「Social Media Creator Agent:」 Specializes in copywriting. It understands the format and style requirements of different platforms (LinkedIn/Twitter) and generates adapted post content.
-
-
「Working Mode:」 The main agent (the news researcher) acts like a project manager. Upon receiving the overall instruction, it 「autonomously judges and calls upon」 sub-agents like translator-agentorwebsite-developer-agentto complete tasks. This represents 「dynamic task delegation」, not a hard-coded, fixed process.
Pillar 3: Native Toolset – Out-of-the-Box Foundational Capabilities
The capabilities of sub-agents are materialized through Tools. The Claude Agent SDK provides a set of ready-to-use native tools, which are the building blocks for constructing workflows.
-
「Core Tool List and Functions:」 -
Read: Reads the content of a file at a specified path. -
Write/Edit: Creates or modifies files. These are the foundational operations for generating output files likeai_news_en.mdandai_news_ko.md. -
Bash: Executes Shell commands in a secure environment, used for file management, process control, etc. -
Grep: Searches for specific patterns within files, commonly used for data filtering and extraction.
-
-
「Performance Manifestation:」 Tool calls are not simulations but 「real, system-level operations with read/write permissions」. By combining these basic tools (e.g., first Reada news draft, thenEditthe translated content, finallyWritea new file), the agent accomplishes complex tasks.
Pillar 4: Skills and Models – The Intelligent “Brain” Configuration
This is the intelligent core driving the entire system, offering flexible and powerful configuration.
-
「Model Selection:」 The example uses model="glm-4.6", but the SDK is designed to be 「fully compatible with Claude series models」 (like Sonnet, Haiku). You can switch between them based on requirements for speed, cost, or intelligence level without changing the workflow logic. -
「System Prompt:」 system_prompt="You are an expert news researcher."This sets the top-level identity and thinking paradigm for the main agent, keeping its behavior focused on research, verification, and organization rather than unfettered creativity. -
「Permission Mode:」 permission_mode='bypassPermissions'is a crucial configuration. It allows the agent to 「directly perform file read/write and command operations」 within the definedcwd(working directory), which is necessary for achieving automated output.
Why Does This Matter? Re-evaluating the Paradigm for Building AI Workflows
Having experienced the workflow above, it’s worth stepping back to think: What is truly different about adopting the Claude Agent SDK approach compared to building from scratch or using other large frameworks?
「1. The Simplicity and Robustness Born from Ecosystem Native-ness」
The tools, MCP support, skills, and sub-agent mechanisms provided by the Claude Agent SDK are native components of the Claude AI ecosystem. This means:
-
「No Glue Code Needed:」 You don’t need to write extra code to make a framework understand Claude models or handle complex communication protocols. -
「Deep Optimization:」 Component synergy is optimized, reducing compatibility issues and performance overhead common in generic frameworks. -
「Unified Mental Model:」 The entire workflow is built on the same AI model and interaction logic, lowering the cognitive load for design and debugging.
「2. The Substantive Leap from “Chatbot” to “Digital Employee”」
Traditional AI applications mostly remain in Q&A and content generation. By integrating MCP (real-time data input) and tools (file system output), the system we build achieves:
-
「End-to-End Closed Loop:」 Starting from the instruction “get the latest information” and ending with the final generation of publishable webpage and social media copy files, the entire process requires no human intervention. -
「Deliverable Results:」 The output is not text in a chat bubble but actual, well-formatted Markdown and HTML files on the hard drive, ready for subsequent processes or immediate publication.
「3. An Efficient Prototyping Tool for Developers and Researchers」
If you have an idea for an automation process, using this SDK allows you to:
-
「Complete a Proof of Concept (POC) in Hours:」 As shown in the example, defining a few agents and connecting one MCP can get a multi-step process running. -
「Flexibly Adjust and Iterate:」 Modifying a sub-agent’s prompt or tools can quickly change its behavior without refactoring the entire system architecture.
How to Start Building Your First Non-Coding Workflow: A Four-Step Method
Based on the understanding above, you can follow a clear path to implement your own project.
「Step 1: Define the Goal and Decompose Tasks」
Ask yourself: What do I want to automate? Taking a content creation workflow as an example, tasks might be decomposed into: 1) Web research, 2) Outline drafting, 3) Content writing, 4) Multi-platform format adaptation.
「Step 2: Configure the Environment and Connect Resources」
-
Install claude_agent_sdk. -
Identify the required external data sources and find or create corresponding MCP servers (e.g., an MCP for financial data, an MCP for an internal CRM). -
Connect them in your code via McpHttpServerConfig.
「Step 3: Define Your Team of Experts」
Create one AgentDefinition for each task decomposed in Step 1.
-
「Researcher Agent:」 Skilled at searching, summarizing, citing. -
「Writer Agent:」 Skilled at writing according to style guides. -
「Formatter Agent:」 Skilled at generating Word, PDF, or webpage formats.
Assign appropriate tools (Read,Write,Edit,Bash, etc.) to each agent.
「Step 4: Orchestrate and Execute」
Create the main ClaudeAgentOptions, injecting all MCP servers and sub-agents. Write a comprehensive prompt that clearly describes the final goal and workflow. Run the script, observe the collaboration of your agent team, and iteratively optimize each agent’s description and prompt based on the output.
Frequently Asked Questions (FAQ)
「Q: Is the Claude Agent SDK in direct competition with frameworks like LangChain or CrewAI?」
A: It’s not simple competition. LangChain and CrewAI are powerful, general-purpose AI agent frameworks offering high flexibility and customizability, suitable for building extremely complex, highly customized systems. The Claude Agent SDK is more like a “lightweight, ecosystem-native” solution. It provides the core patterns needed to build intelligent workflows (tools, sub-agents, MCP) but focuses more on deep integration with Claude models, allowing developers within the Claude ecosystem to achieve automation flows with lower cost and higher efficiency. 「If your workflow’s core is the Claude model and you prioritize rapid development and deployment, the SDK may be the better choice.」
「Q: Do I need strong programming skills to use it?」
A: The barrier to entry for basic use is moderately low. If you understand Python syntax, can configure API keys and environment variables, and can define agents and options in the structured way shown in the examples, that’s enough to build powerful workflows. Its complexity lies not in coding but in 「how clearly you can define tasks, roles, and processes.」
「Q: Are MCP servers mandatory? Can I just use local tools?」
A: MCP is not mandatory. If all data for your workflow comes from local files and all operations are limited to file reading/writing and simple commands, then you can rely solely on the SDK’s native tools like Read, Write, and Bash. The value of MCP lies in 「connecting to external dynamic data and services」 (like live web pages, databases, third-party APIs), thereby vastly expanding the application boundaries of your workflow.
「Q: Can this SDK only be used for content generation workflows?」
A: Absolutely not. News research and content creation are just easy-to-understand examples. Its application scenarios depend on the MCPs you connect and the agents you define. For instance, you could connect a database MCP and a data analysis agent to create an 「automated reporting system」; connect an MCP for an internal system API and an operations agent to build an 「IT automation workflow」; connect a design tool API and a review agent to implement 「batch generation and preliminary screening of marketing materials」. The core pattern is universal.
Conclusion: Solving Problems at the Right Level of Abstraction
When building AI workflows, we often face a choice: use a fully-featured but somewhat heavy general-purpose framework, or find a more agile tool tailored to specific needs? This exploration of the Claude Agent SDK suggests that sometimes the answer lies within an existing tool ecosystem.
It doesn’t introduce brand-new concepts but abstracts the agent capabilities long proven in Claude Code—「tool use, the Model Context Protocol (MCP), and sub-agent collaboration」—to provide a clean, direct API. This allows developers to bypass the long learning curve of frameworks and quickly assemble automation pipelines that solve real problems on these solid foundations.
This perhaps reveals a more universal principle: the most efficient solution is often not the one with the most features, but the one that provides 「exactly the capabilities you need」 at 「the right level of abstraction」 and lets you combine them smoothly. For many teams and individuals aiming to leverage Claude’s capabilities to build non-coding automation flows, the Claude Agent SDK is precisely such a tool of “exactly what’s needed.”
You don’t have to wait for a perfect, omnipotent agent future. Using existing, mature components, you can start assembling your first AI digital employee today.

