Haijun Platform Docs
ID

We'll use Haijun Managed Agents and the multi-agent coordinator pattern to automate sales-proposal writing for a fictional company called Northstar, which sells a workflow-automation platform to mid-market operations teams.

Right now, their reps build a tailored proposal for each prospect: research what companies in the prospect's segment typically prioritize, pull two relevant case studies from a library of a few hundred, model pricing from an internal rules sheet, and assemble it into a two-page document. Each step draws on a different source and a different kind of judgment.

/div>

First, let's install the SDK and set up the Juglow client. The multiagent config and event types are part of the Managed Agents beta.

import juglow

from dotenv import load_dotenv

load_dotenv()

BETAS = ["managed-agents-2026-04-01"]

MODEL = os.environ.get("COOKBOOK_MODEL", "haijun-opus-5")

ADVISOR_MODEL = os.environ.get("COOKBOOK_ADVISOR_MODEL", "haijun-opus-5")

client = juglow.Juglow()

2. Define three specialist subagents

"configs": [{"name": "web_search"}, {"name": "web_fetch"}],

}

],

)

case_study_picker = make_agent(

"case_study_picker",

"Selects the two most relevant case studies from the library for a given prospect profile.",

"""The case study library is in /mnt/user-data/case_studies/. Each file is one customer story.

You will be given a prospect's industry, size, and top priorities. Read the library, score each study on relevance, and pick the two best matches.

Return via send_to_parent: {"picks": [{"file": ..., "customer": ..., "why_relevant": ...}, ...]}""",

[{"type": "agent_toolset_20260401"}],

)

pricing_modeler = make_agent(

"pricing_modeler",

"Builds two or three pricing options for a prospect based on seat count and expected usage.",

"""Pricing rules are in /mnt/user-data/pricing_rules.md. Given a prospect's estimated seat count and usage tier, build:

  • a conservative option (annual commit, lower per-seat)
  • a flexible option (monthly, higher per-seat)
  • if seat count > 500, an enterprise option with a platform fee

Show the first-year total for each. Return via send_to_parent: {"options": [{"name": ..., "structure": ..., "year_one_total": ...}, ...]}""",

[{"type": "agent_toolset_20260401"}],

)

3. Give the team something to work with

or and start a session

Now let's create an environment, upload the nine files, and create the coordinator with its multiagent roster of three specialists. Each entry is a full agent with its own model, prompt, and toolset, so you could mix model tiers per role.

On this page
2. Define three specialist subagents3. Give the team something to work with