Build your method|INEMA.CLUB-PRO

Lesson 3 · 16 min

The agent orchestra: one agent per role, with written context and rules

A company's director is a conductor: purchasing, marketing, sales and finance play together and the director coordinates. It works the same with agents. Instead of one assistant that knows a little about everything, you build one per role, each with its own context, its own rules and its own model, running on a server that stays on 24 hours a day.

Start the lesson
Small, clean server room, neutral light, an open laptop on a workbench.

In this lesson you will

  1. 1Coordinator on top, specialists below
  2. 2One agent per company knows which repository and database to go to
  3. 3The rules for the agent that writes code
  4. 4Server running 24/7 on the subscription, no API key

Goal: design your team of agents by role, with context per company, written rules and each one's model.

01The orchestra

Tap each agent.

Click each block in the diagram to see what it does.

Split by function AND by company: a clinic's agent doesn't need to know about the real estate firm's construction projects.

02Building the orchestra

Four decisions.

1. Where it runs

Agents that serve the team need to stay on. A rented server (VPS) does the job; there are open platforms, like Hermes Agent, that already come with agent profiles, their own terminal and access through Telegram.

To experiment, a small machine is enough; with a dozen agents, memory usually calls for 8 GB or more.

03Templates to copy

The map stays with you. The rules go in the instructions of the agent that programs.

Orchestra map
AGENT         | FUNCTION                       | CONTEXT (sources)                 | MODEL
coordinator   | receives, routes, pulls together | list of agents and what each does | <top>
finance       | cash, accounts, forecast       | ERP, banks, cost spreadsheet      | <top at numbers>
programming   | code and automations           | repository, database              | <top at code>
data          | sales, inventory, campaigns    | CRM, ads, inventory               | <economical>
sales-<X>     | serves and qualifies           | company X's CRM, product, team    | <economical>

GENERAL RULES
- each agent only reads the sources on its own line
- a request outside its function goes back to the coordinator
- weekly report from each agent to you
Rules for the agent that programs
PROGRAMMING RULES

BEFORE STARTING
- git status and git pull in the right repository
- never work directly on main (or master)

DURING
- one branch per task, short name in kebab-case (e.g.: fix-invoice)
- small commits, a message that says what changed
- no passwords, keys or customer data in the repository
  (secrets stay in the password vault)

SOURCES OF TRUTH, IN THIS ORDER
1. the repository
2. the database
3. the documentation

AT THE END
- open a pull request with what changed and how to test it
- NEVER do the merge: a person approves

04Practice

You can do it on paper before setting up any server.

1 · Orchestra map

30 min

Copy the map and fill it in with the roles in your company (or in the companies you serve). Start with five agents at most.

Done when: the map has 3 to 5 agents, each with a role, context sources and the type of model.

2 · Written rules

15 min

Save the coding rules as REGRAS-PROGRAMACAO.md in the repository where the agent will work, and adjust the names.

Done when: the file exists in the repository and has the rule "never merge".

3 · Rules of a good agent

10 min

Ask the agent you already work well with: "write the rules for how you work with me, as a list".

Done when: you have the list and you marked the rules that go to the new agents.

05Lesson 3 on video

The lesson's mechanism explained in about two and a half minutes.

Lesson 3 on video · 2 min 22 sVideo page with script →

06Quick quiz

4 questions.

Question 1 of 4

You have clinics and a real estate agency. How do you split the sales agents?

07Summary

MaestroYou coordinate; the coordinator distributes; specialists execute.
Separate contextBy role and by company, with the order of the sources of truth.
Written rulesNever on main, small commits, no secrets, merge by a person.
Server and subscriptionOn 24/7, using the plan you already pay for.
Previous lessonNext lesson