MMarketing Against The Grain
← All frameworks
Innovation

Composable Agent Team

Combine specialized agents into a reusable digital production line

Difficulty
Moderate
Time to result
~weeks to results
Steps
6
Confidence
95%

Treat agents as specialized digital coworkers rather than as one universal assistant. Begin with the desired deliverable, split it into discrete capabilities, and assign each capability to a narrowly focused agent. Make outputs reusable through structured handoffs such as JSON, then connect the agents in the order dictated by their dependencies. Because the components remain independent, builders can replace a model, improve a specialist, or reuse one agent in another workflow without rebuilding the entire system. The user interacts with the higher-level outcome while the orchestration layer selects tools and passes context behind the scenes. This creates leverage through composition rather than through increasingly complicated prompts.

Origin

Extracted from Marketing Against The Grain through Dharmesh Shah's example of connecting a color-palette extractor, image generator, and LinkedIn-post generator.

Core principles

  • 01Give each agent one discrete responsibility
  • 02Pass structured outputs between agents
  • 03Compose independently useful tools into larger workflows
  • 04Choose the best model for each step
  • 05Hide implementation complexity from the end user

How to run it

  1. 1

    Specify the final deliverable

    Define what the complete digital team must produce and how success will be judged.

    Pro tip Choose a recurring output with a consistent structure.

    Watch out Do not begin by collecting tools without a shared outcome.

  2. 2

    Decompose the capabilities

    Break the deliverable into discrete tasks such as extraction, classification, generation, publishing, and measurement.

    Pro tip Make each capability independently useful when possible.

    Watch out Overlapping responsibilities make failures and ownership difficult to diagnose.

  3. 3

    Build specialist agents

    Give each agent the context, tools, and instructions needed for one narrow responsibility.

    Pro tip Use different models when their strengths match different tasks.

    Watch out Do not force one model to handle every modality or reasoning pattern.

  4. 4

    Standardize handoffs

    Define the fields and formats one agent must pass to the next. Prefer structured data for outputs that machines will reuse.

    Pro tip Include provenance or confidence fields when later steps depend on uncertain extraction.

    Watch out Free-form handoffs can silently lose important information.

  5. 5

    Compose the chain

    Connect agents according to dependencies and preserve intermediate outputs for inspection.

    Pro tip Allow reusable branches, such as one palette feeding several image generators.

    Watch out Circular or implicit dependencies make the workflow brittle.

  6. 6

    Test and evolve components

    Evaluate each specialist independently and then exercise the complete workflow. Swap models or agents as better options emerge.

    Pro tip Keep external behavior stable while improving internal components.

    Watch out A successful component test does not prove the full chain works.

In the wild

Brand-consistent LinkedIn asset

A palette agent takes a website screenshot and returns proportional brand colors as JSON. An image agent uses that palette to create a topical visual, and a LinkedIn agent combines the visual with a platform-specific post.

The workflow creates a coherent branded social asset from independently reusable agents.

Model-swappable writing workflow

A content agent uses one model for transcript analysis and another for punchy copy. When a stronger model appears, the builder replaces only the affected step while users continue requesting the same final deliverable.

The workflow improves without exposing model-selection complexity to users.

Common mistakes

Building a monolithic agent

Packing unrelated capabilities into one agent makes evaluation, reuse, and model replacement harder.

Passing ambiguous text

Loosely formatted handoffs force downstream agents to infer structure and increase error rates.

Optimizing components only

Individually strong agents can still fail when their formats, assumptions, or dependencies do not align.

Is it for you?

Best for

It is best for repeatable deliverables that combine research, transformation, generation, publishing, or monitoring capabilities.

Not ideal for

It is not ideal for simple tasks that one well-scoped model call can complete reliably.

From the transcript

the really really exciting thing about these agents is that they can actually use each other

Dharmesh Shah · 17:00

that's the composing two agents that didn't know anything about each other right until the fact that you glue them together in a in a…

Dharmesh Shah · 18:00

your agent takes care of that's what software is supposed to do is raise the level of abstraction for the M user

Dharmesh Shah · 44:00

From the episode

HubSpot Co-Founder Introduces The Future Of Ai Agents