Create custom Agentic Workflows with Claude Code
The speed with which you can create working Agentic frameworks is astounding…
A Short Overview…
The traction Claude Code and Anthropic in general has been achieving cannot be ignored.
I installed Claude Code on my MacBook and the command line interface is just so lightweight and efficient.
Creating something like a sub-agent hierarchy is made so easy because Claude Code prompts you in very useful ways for things you might over overlooked or missed.
That fact that many people are confusing the Clawbot hype with Claude is funny in a sense, and this adds to the attention Claude is getting.
What I found interesting is that you can, with Claude Code, make use of the standard commands of Claude Code, as seen below…
But you can also describe your application in prompt engineering fashion (as I show below), and Claude builds a working Agent AI application. Which you can run and experiment with.
Anthropic is also advocating the notion of a universal agent, where you do not build purpose specific agents. But rather have a universal agent which can code and built the functionality and integration required on the fly.
And with the execution of code, making use of a sandbox becomes essential. If there is no limitations introduced via a finite amount of tools, then a sandbox environment is a necessity for management and maintaining stability.
Building AI Agents with Claude Code
As you will see below, you can describe the agentic workflow you want, and Claude Code creates the framework, file structure, code and documentation.
Recently I listened to an A16z podcast where they spoke about the (historic) durable nature of software. The fact that software had to be durable due to the sheer cost involved in creating software.
This is changing rapidly, with AI Agents that can develop software as required to execute tasks.
Key Benefits for Agentic Workflows
The example below is one of an Agentic Workflow…
An Agentic Workflow approach delivers modular scalability, allowing seamless integration of specialised AI Agents into larger systems.
It reduces development time while boosting accuracy through targeted tools and instructions, making it ideal for real-world applications in dynamic environments.
The Power of Subagents in Claude Code
Subagents in the context of Agentic Workflows represent a paradigm shift in how we architect AI-driven workflows, transforming monolithic task execution into orchestrated collaboration.
By decomposing complex problems into specialised domains — each handled by a focused subagent with its own expertise and context — we unlock unprecedented scalability and maintainability.
The supervisor agent acts as an intelligent coordinator, routing tasks based on capability, managing inter-agent communication and synthesising results into cohesive outcomes.
This architecture mirrors how effective human teams operate…with specialists diving deep into their domains while a project manager ensures alignment and integration.
The result is a system that’s not just more powerful, but more transparent, debuggable, and adaptable to evolving requirements.
Here is the prompt I used for the initial setup…two things to keep in mind…you must know what you want to achieve. And secondly, you must be specific and not too general.
Create a subagent orchestration system with a supervisor
and 4 specialized subagents (data, code, docs, analysis).
The supervisor should analyze tasks, delegate to appropriate
subagents, and synthesize results. Use the Anthropic API. And below is the output from Claude Code…
I’ll help you create a subagent orchestration system with a
supervisor and 4 specialized subagents. Let me start by
planning this task.This is just what the terminal looks like when the process of creating the Workflow is underway…
As seen below, Claude Code gives you a detailed layout of the project structure, folder and files.
I’ve successfully created a complete subagent orchestration system with a supervisor and 4 specialized subagents. Here’s what was built:
Project Structure
orchestration/
├── __init__.py # Package initialization
├── config.py # Configuration (API key, model settings)
├── supervisor.py # Supervisor agent (task analysis & delegation)
└── subagents/
├── __init__.py # Subagents package
├── base_agent.py # Base class with Anthropic API integration
├── data_agent.py # Data processing & analysis specialist
├── code_agent.py # Code generation & review specialist
├── docs_agent.py # Documentation & writing specialist
└── analysis_agent.py # Analysis & reasoning specialist
main_orchestration.py # Full demo with 4 examples + interactive mode
quick_demo.py # Simple quick-start demo
requirements_orchestration.txt # Dependencies
README_ORCHESTRATION.md # Complete documentation
Key Features
Supervisor Agent:
- Analyzes incoming tasks using Claude API
- Intelligently delegates to appropriate subagent(s)
- Can use multiple agents for complex tasks
- Synthesizes results into coherent responses
4 Specialized Subagents:
1. DataAgent - SQL, data transformations, analytics
2. CodeAgent - Code generation, debugging, algorithms
3. DocsAgent - Documentation, reports, technical writing
4. AnalysisAgent - Critical thinking, decision-making, planningAlso a quick start guide to get your application up and running…
Quick Start
1. Set your API key:
export ANTHROPIC_API_KEY=’your-key-here’
2. Run the quick demo:
python quick_demo.py
3. Run the full interactive system:
python main_orchestration.pyWith example scripts and usage…
Example Usage
from orchestration import Supervisor
# Create supervisor
supervisor = Supervisor(verbose=True)
# Process a task - supervisor will delegate appropriately
task = “Create a binary search function and document how to use it”
result = supervisor.process_task(task)
# Get synthesized result
print(result[’synthesis’])
The system is ready to use! The supervisor will automatically:
1. Analyze your task
2. Delegate to the right subagent(s)
3. Synthesize their results
4. Return a comprehensive response
Check out README_ORCHESTRATION.md for full documentation and examples.Below I asked Claude Code a question about the project…
where in my file system can I find the code? And the response…
The code is located in your current working directory:
/Users/cobusgreyling/virtual_machine/claude/
Here’s what you’ll find:
Main Files:
- /Users/cobusgreyling/virtual_machine/claude/orchestration/ - Main package directory
- /Users/cobusgreyling/virtual_machine/claude/main_orchestration.py - Full demo with examples
- /Users/cobusgreyling/virtual_machine/claude/quick_demo.py - Quick start demo
- /Users/cobusgreyling/virtual_machine/claude/README_ORCHESTRATION.md - Documentation
- /Users/cobusgreyling/virtual_machine/claude/requirements_orchestration.txt - Dependencies
Inside the orchestration package:
- orchestration/supervisor.py - Supervisor agent
- orchestration/subagents/base_agent.py - Base agent class
- orchestration/subagents/data_agent.py - Data specialist
- orchestration/subagents/code_agent.py - Code specialist
- orchestration/subagents/docs_agent.py - Docs specialist
- orchestration/subagents/analysis_agent.py - Analysis specialist
You can navigate there with:
cd /Users/cobusgreyling/virtual_machine/claudeChief Evangelist @ Kore.ai | I’m passionate about exploring the intersection of AI and language. Language Models, AI Agents, Agentic Apps, Dev Frameworks & Data-Driven Tools shaping tomorrow.








Cobus, the supervisor-subagent architecture you describe became native with Opus 4.6's Agent Teams. What you built manually, a supervisor coordinating four specialized subagents, is now a built-in capability. I tested 4 agents in parallel on launch day and the pattern matched your description almost exactly. One lead agent distributing work to specialists, each maintaining deep context in their domain. The difference is that Agent Teams handles the coordination protocol automatically. Your point about the speed of building these frameworks is even more true now. Full parallel experiment: https://thoughts.jock.pl/p/opus-4-6-agent-experiment-2026
The iteration speed when Claude Code scaffolds these systems is wild. I've been building similar workflows and the number of experimental config files you accumulate is unreal. MCP configs, agent definitions, test harnesses. If you don't sort out local exclusion early you end up with a bloated .gitignore or noisy PRs. Wrote about using .git/info/exclude for this exact problem: https://blog.stackademic.com/how-to-test-mcp-servers-and-agent-configs-without-annoying-your-team-20692917488d