Create a config directory to house your YAML configurations. Define the agent personas in config/agents.yaml:
config/agents.yaml
1# config/agents.yaml23reader:4role: Contract analyst
5goal: Pull every commercially important term out of a contract, with its section number
6backstory:>7 You read contracts line by line for a procurement team. You quote the
8 contract rather than paraphrase it, and you always note the section a
9 term comes from.1011risk_analyst:12role: Commercial risk analyst
13goal: Spot the deadlines, costs, and one-sided terms that could hurt {customer}14backstory:>15 You have reviewed hundreds of software agreements from the buyer's side.
16 You know which clauses cost customers money: automatic renewals, price
17 increases, short claim windows, and terms the vendor can change on its own.1819fact_checker:20role: Contract fact-checker
21goal: Make sure every claim in a contract memo matches the contract word for word
22backstory:>23 You are the last reviewer before a memo goes to the finance team. You
24 check every number, date, and section reference against the source
25 document and fix anything that does not match.
Define the corresponding task objectives and output formats in config/tasks.yaml:
config/tasks.yaml
1# config/tasks.yaml23extract_terms:4description:>5 Read the contract at {contract_path}. List its key terms: parties, dates,
6 term and renewal, fees and payment, service levels, data handling,
7 termination, liability, and any clause that lets one party change the
8 deal on its own.9expected_output:>10 A bulleted list of key terms. Each bullet quotes the contract and ends
11 with its section number.1213assess_risks:14description:>15 Using the key terms, write a risk memo for {customer}. Pick the five terms
16 most likely to cost them money or catch them out, and say what they
17 should do about each one.18expected_output:>19 A Markdown memo of no more than 350 words: a two-sentence summary, then a
20 numbered list of five risks. Each risk has a section number, why it
21 matters, and a recommended action.2223fact_check:24description:>25 Check every claim in the risk memo against the contract at {contract_path}.
26 Fix any number, date, or section reference that does not match the
27 contract, and remove anything the contract does not say.28expected_output:>29 The corrected memo in Markdown, followed by a "Corrections" section that
30 lists each change you made, or says "None".