This morning we noticed Claude Code, the agentic coding CLI quietly gaining momentum among developers, has introduced an interesting new feature: custom sub-agents. At Ascend.io, we're passionate about bringing the power of agentic development to data engineers.
Claude Code's agent definitions looked pretty familiar to us! We're excited to see the validation in our approach from an industry leader like Anthropic. Let's take a look at how developers can now use Claude Code to create and use custom agents.
Prerequisites
Install and set up Claude Code:
If you already have Claude Code installed, you should update it with the command above to get access to /agents
.
Creating your first custom agent
Run /agents
from the Claude Code text user interface (TUI):
First choose where the agent's definition (a Markdown file with YAML frontmatter) will be stored. This can either be for a project or globally for all projects in your home directory:
Then choose whether to generate the agent file with Claude or manually. I'd recommend using Claude -- you'll get the opportunity to edit the file in your editor before saving it. Also, since the file is just a Markdown file, it's easy to edit and tinker with later!
Enter a prompt describing the agent's purpose. For demonstration purposes, I'll create an agent that just squawks:
And, for demo purposes, give this agent access to no tools:
The user experience (UX) is well-designed, allowing you to select a background color to easily distinguish between sub-agents visually as you watch Claude Code work:
You can then review and edit the agent file before saving it.
The agent file
This produces an agent file like:
While this specific demonstration is nonsensical, you could use this to build agents with specialized system prompts and a subset of tools. The general-purpose agent then orchestrates these to achieve more complex tasks.
How it works and why it's powerful
In Ascend, we refer to what Claude Code calls the built-in "general purpose" agent as the "Super Agent". This is the agent that runs the main thread on a given interaction with a user, calling out to sub-agents as needed to complete tasks toward the objective.
For instance, you might break down sub-agents into:
- Builder agent
- Test agent
- Context agent
where one is responsible for building new data pipelines, another for testing them, and a third for gathering context from the data system (e.g. reviewing past Git commits or run history for a given pipeline). We're in the early stages of learning as an industry what works well for different types of problems.
The compounding error problem
AI has a well-known compounding error problem. That is, when a non-deterministic process aiming to achieve one or more correct answers will achieve worse performance the more steps it takes to reach a solution. For example if each AI step is 99% accurate, you end up with about 90% accuracy after 10 steps.
One way to mitigate this is to break down complex problems into sub-tasks that sub-agents can solve with a higher degree of accuracy. We're excited about how customers are adopting Agentic Data Engineering in Ascend and eager to see how Claude Code's custom agents will help developers in the wild.
Event-driven agents
In Ascend, we're also introducing event-driven Automations that can run custom agents in response to common data engineering events throughout the system. This allows you to automate common tasks like gathering context and notifying your team in Slack when pipelines fail -- the possibilities are endless!
Next steps
If you're a data engineer interested in applying agentic software engineering to your data projects, join our waitlist for the freemium Developer Tier launching soon! You can also register for our upcoming webinar on Agentic Data Operations.