# Question about using a custom LLM Manager in a hierarchical setup

**URL:** <https://community.crewai.com/t/question-about-using-a-custom-llm-manager-in-a-hierarchical-setup/6114>\
**Category:** CrewAI Community Support\
**Created:** [June 5, 2025, 9:10am UTC](https://community.crewai.com/t/question-about-using-a-custom-llm-manager-in-a-hierarchical-setup/6114 "2025-06-05T09:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simone\_russo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/simone_russo/32/3485_2.png) [@simone\_russo](https://community.crewai.com/u/simone_russo)\
**Post date:** [June 5, 2025, 9:10am UTC](https://community.crewai.com/t/question-about-using-a-custom-llm-manager-in-a-hierarchical-setup/6114/1 "2025-06-05T09:10:51Z")

</div>

Hi everyone!  
I’m currently studying how to use a **custom LLM manager** in a **hierarchical setup** , and I’ve been experimenting with an implementation based on the official documentation.

In my exercise, I created a manager agent that coordinates two other agents.  
Here’s the code:

```
from crewai import Agent, Task, Crew, Process
from crewai.project import CrewBase, agent, task, crew
from dotenv import load_dotenv

@CrewBase
class ProductionCrew():
    def __init__ (self):
        load_dotenv("../.env")
        
    @agent
    def creative_agent(self) -> Agent:
        return Agent(
            config=self.agents_config["creative_agent"],
            #verbose=True
        )
        
    @agent
    def budget_agent(self) -> Agent:
        return Agent(
            config=self.agents_config["budget_agent"],
            #verbose=True
        )
        
    @agent
    def manager_agent(self) -> Agent:
        return Agent(
            config=self.agents_config["manager_agent"],
            #verbose=True,
            allow_delegation=True
        )
        
    @task
    def concept_task(self) -> Task:
        return Task(
            config=self.tasks_config["concept_task"]
        )
        
    @task
    def budget_task(self) -> Task:
        return Task(
            config=self.tasks_config["budget_task"]
        )
        
    @crew
    def crew(self) -> Crew:
        return Crew(
            agents=[self.creative_agent(), self.budget_agent()],
            tasks=[self.concept_task(), self.budget_task()],
            manager_agent=self.manager_agent(),
            process=Process.hierarchical,
            verbose = True
        )
        
    def run(self):
        try:
            self.crew().kickoff()
        except:
            raise Exception(f"Errore durante l'esecuzione della crew: {e}")

```

agents.yaml

```
creative_agent:
  role: >
    Creative Writer
  goal: >
    Come up with an original concept for a short film
  backstory: >
    Experienced screenwriter with a background in independent cinema.
  llm: together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
  temperature: 0.7

budget_agent:
  role: >
    Film Budget Analyst
  goal: >
    Estimate the budget for the production of the short film
  backstory: >
    Specialist in film production with a focus on cost control.
  llm: together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
  temperature: 0.7

manager_agent:
  role: > 
    Production Manager
  goal: >
    Coordinate pre-production and present a complete package
  backstory: > 
    Production manager with experience in complex film projects.
  llm: together_ai/meta-llama/Llama-3.3-70B-Instruct-Turbo-Free
  temperature: 0.7

```

tasks.yaml

```
concept_task:
  description: >
    Write an original synopsis for a short film. Include: theme, brief plot, setting, and main characters.
  expected_output: >
    Synopsis and setting, maximum 300 words
  agent: creative_agent

budget_task:
  description: >
    Estimate a rough budget to produce the short film, considering: cast, location, visual effects, equipment, and post-production.
  expected_output: > 
    Summary table with items and estimated costs
  agent: budget_agent

```

In the documentation, the example shows **a single task** shared between **two agents** , while I’ve taken a different approach by assigning **a specific task to each agent**. Also, in the docs, the task isn’t explicitly assigned to any agent, whereas I’ve done so directly in my code.

I’d love to get some clarification on a few points:

1. **Is it a good practice to assign tasks explicitly** to individual agents in a hierarchical structure with a custom manager?
2. **What are the best practices** in this kind of setup? Should tasks be kept generic and let the manager decide who handles them?
3. When using a custom LLM manager, how much autonomy should it have in assigning and managing tasks?

Any insights or suggestions would be greatly appreciated!

Thanks in advance

Edit:  
Additionally, the output I was expecting was a **combination of the work done by both agents** —that is, the movie plot and a cost estimate.  
However, the output I’m getting from the crew includes **only the cost estimate**.

**Expected output:**

```
Title: ...
Plot: ...
Estimated Costs: ...

```

**Actual output:**

```
| Category | Estimated Cost |
|------------------|------------------------|
| Cast | $25,000 - $55,000 |
| Location | $15,000 - $30,000 |
| Visual Effects | $17,000 - $35,000 |
| Equipment | $12,000 - $24,000 |
| Post-Production | $18,000 - $36,000 |
| Total Budget | $87,000 - $180,000 |

```

Edit 2:  
Another question is: does it make sense to create a task for the manager? Or is it correct to leave the manager without any tasks?

---

<div class="post-metadata">

**Author:** ![Tony\_Wood](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tony_wood/32/1876_2.png) [@Tony\_Wood](https://community.crewai.com/u/Tony_Wood)\
**Post date:** [June 8, 2025, 6:00am UTC](https://community.crewai.com/t/question-about-using-a-custom-llm-manager-in-a-hierarchical-setup/6114/2 "2025-06-08T06:00:31Z")

</div>

great question.

From first look I would look at increasing the context around your task. There is a 80 / 20 rule.. 20% of your time on the Agent and 80% on the task  
This might be useful [Crafting Effective Agents - CrewAI](https://docs.crewai.com/guides/agents/crafting-effective-agents)

I like to reread the docs here from time to time [Overview - CrewAI](https://docs.crewai.com/learn/overview) as they help me refine my crews… Also look at the awesome release notes in announcements as things like Reasoning were added and they make a big difference
