Explore the build library
consultance.ai
Deal Copilot
Build libraryControlsAboutCase studiesBlogBook an audit
consultance.ai

Systems

WorkflowsDeal CopilotPrivate knowledgeFinance automationBuild library

Company

About usCase studiesBlogContact

Start a conversation

Free AI auditfounder@consultance.ai

Teams

Investment bankingCFOs & financePrivate equityPrivate creditReal estateProperty managementProfessional servicesOther industriesAll industries

Legal

Privacy policyTerms of service

Our approach

Audit the workflow.Build in your environment.Hand over a system you own.
Build something useful © 2026 consultance.ai
Build library/Build Your Own AI Agent Desk

Finance and data

Build Your Own AI Agent Desk

For fund managers, family office CIOs, RIAs and CFOs: run ai-hedge-fund, the open source AI hedge fund, on Claude, then add your own judgment as specialist agents. 18 prompts, and you keep the final call.

Technical setup4 steps18 prompts
Open the setup guide Discuss an implementation
Finance and data

Start with the guided setup

Follow the setup below in your own workspace. For a demonstration of the prompt-copying process, open the optional walkthrough.

Watch the setup walkthrough
Step 1 · setup
Three minutes, four steps, nothing to install by hand

Claude sets it up for you. You just paste.

Never used Claude? It is free and takes 30 seconds to open. Copy the instruction below, paste it into Claude, and it reads this page and walks you through everything, one question at a time.

  1. Tell Claude how to talk to you

    One tap. It changes how much Claude explains, and how slowly it goes. You can change it any time.

  2. Copy your setup instruction

    A short instruction plus a link to this page lands on your clipboard. First copy asks for your email once. That unlocks every button across the whole library.

  3. Open Claude in a new tab

    Free account, no card, 30 seconds. This tab stays open so you can come back.

    Open claude.ai
  4. Paste, send, and answer one question

    Claude reads this page, asks one question about your work, then guides you step by step until your first output is right. If anything looks wrong, tell Claude what you see, and it fixes it with you.

▸Prefer the full prompt instead of the link? (optional)
Click to copy
I am comfortable copy-pasting and following instructions, but I am not a developer.
There is nothing to install for this one and no commands to type: it all happens inside Claude. If any instruction below implies a Terminal, translate it into the equivalent click path for me instead.
- Plain English. Define jargon the first time it appears.
- One step at a time, then wait for me to confirm before the next one.
- Tell me what success looks like at each step, and diagnose any error before moving on.

Follow the instructions below with those rules applied.

If you can browse the web, open and read this page in full first, it has the complete guide and every prompt you will run (the vault is under the-vault anchor): https://consultance.ai/library/build-your-agent-desk#the-vault . If you cannot open links, tell me and I will paste the page in, do not guess the prompts.

I want to turn how I make one recurring decision into a small desk of specialist AI agents, each judging one thing on its own, with a coordinator that shows me every view and me making the final call. Walk me through it, one step at a time, the way someone from consultance.ai would sit next to me.

This is a HYBRID setup. Part one is a conversation in the Claude app, no install. Part two is a small build in Claude Code on my own machine, with Terminal commands. Tell me clearly which part we are in at every step so I never guess.

Your FIRST message asks me exactly one question: "Do you want to see ai-hedge-fund, an open source AI hedge fund, run on real stocks first (prompt 16, Claude Code), start the interview that captures your own method (Claude app, no install), or go straight to adding your own specialists to ai-hedge-fund (Claude Code)?" Wait for my answer. If I pick the working fund, walk me through prompt 16 one command at a time, then prompt 17.

Terms, defined once:
- Specialist agent: one AI agent with a narrow brief. It judges one factor of my decision and nothing else.
- Coordinator: the step that collects every specialist's view, shows them to me unchanged, and lists where they disagree. It recommends. It never decides.
- Decision log: a file with one line per decision, written before I know the outcome, so I can score my calls later.
- ai-hedge-fund: an open source Python project by Virat Singh (github.com/virattt/ai-hedge-fund, MIT licence). Each agent in it is one system prompt. It trades a simulated account only, never a real one.
- Mandate: ai-hedge-fund's YAML file that describes a desk: its strategies, agents, risk limits, capital and cadence.
- Claude Code: Anthropic's coding agent that runs in Terminal and can write files and run tests on my machine.

PART ONE, the Claude app (NOT a Terminal install). Walk me click by click:
1. Open claude.ai and sign in. My material goes only to my own Claude account, never to consultance.ai. For anything confidential use a Team or Enterprise plan, or turn off model training in my settings first. Confirm my plan before I upload anything.
2. Open Projects in the left sidebar and create a new project. Name it "Agent desk".
3. In the model picker, choose Claude Opus 5.5. Keep it for every prompt.
4. Open the vault on the page above. Copy prompt 01 into the Project chat and send it. It asks me setup questions, one at a time.
5. Then run prompt 02, the calibration run, before I share a single real decision. It must show six MATCH lines. If one says MISMATCH, stop and tell me what went wrong.
6. Then prompts 03 to 10 in order. They interview me on real past decisions and turn my answers into signed specs. Expect this to take a few sessions, not one.

PART TWO, Claude Code (a Terminal install). One command at a time. After each, tell me what success looks like and the common error.
1. Install Claude Code if I do not have it. The official install lines are:
   macOS or Linux: curl -fsSL https://claude.ai/install.sh | bash
   Windows (PowerShell): irm https://claude.ai/install.ps1 | iex
   Success: typing claude in Terminal opens it.
2. I need two keys. An Anthropic API key from the Claude Console, Anthropic's developer dashboard. And a Financial Datasets key from financialdatasets.ai, which supplies the prices and company figures. Its pricing page lists paid options, the smallest a one time credit pack. Tell me this before I start, so I am not surprised.
3. To see the fund work (prompt 16), from the ai-hedge-fund README:
   uv tool install aihf
   aihf
   If uv is missing, install it first with the line from uv's own docs:
   macOS or Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
   Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
   The first aihf run asks for my keys and saves them to ~/.hedge-fund/.env. Common error: "command not found: aihf" means the tool folder is not on my PATH; run uv tool update-shell, then open a new Terminal.
4. To add my own specialists (prompts 11 to 14), from the README's Development section:
   git clone https://github.com/virattt/ai-hedge-fund.git
   cd ai-hedge-fund
   poetry install
   poetry run pytest hedge_fund
   The cd line is not optional: without it the next commands run in the wrong folder. The tests must pass before I change anything. Python 3.11 or newer is required. No poetry? Prompt 11 gives the uv lines that do the same job.
5. Prompts 12, 13 and 14 write the tests first, run my desk once on a held out case, and prove the guardrail can fail.
6. Want the history? Prompt 18 backtests the fund point in time with the README line aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT --backtest, plus --model claude-opus-5-5 and --out backtest.json. Start with two tickers: every agent call uses my own key. Before I trust the result, it checks whether the window sits before the model's training cutoff.

FIRST SESSION DRILL, before trusting anything:
- Input: the sample inside prompt 02, not my data.
- Good output: six MATCH lines, a Brier score of 0.145 with the working shown, and a refusal to make a rule from the incident with no record from the day.
- Review check: if Claude made a rule from memory alone, the method is not safe yet. Do not go on.

Rules for you while you help me:
- Never tell me something is "not possible" when the page shows how. If you are unsure, read the ai-hedge-fund README at https://github.com/virattt/ai-hedge-fund.
- Never connect a real broker, and never give any agent a tool that can place an order, move money or edit my records.
- Never invent a setting, menu or command. If the page or the docs do not show it, say so.
Step 2 · run it on your data

Step 1 set it up. These 18 prompts do the work.

the vault

The 18 prompts

Grab the whole pack as one file, or tap any prompt below to copy it on its own. Placeholders that look like {{THIS}} get swapped for your own numbers — and if you ran Step 1, Claude fills them in for you.

One .md file · all 18 prompts, numbered, in order · nothing left out.
Click to copy
<role>
You are my desk architect: a knowledge engineer who has run Critical Decision Method interviews with
traders and portfolio managers, and a Python developer who has added agents to ai-hedge-fund, where
each agent is one system prompt. A colleague, not a judge of my decisions. Model: Claude Opus 5.5 (API id claude-opus-5-5) for
every prompt in this pack. Do not switch model mid prompt.
</role>

<what_this_is>
State this back to me before anything else.
IS: a method to capture how I make ONE recurring decision, split it into specialists that each score
one factor blind, a coordinator that shows me every view unchanged, and a log that scores my calls.
IS NOT: a trading system. ai-hedge-fund trades a simulated broker only. Never connect a real broker.
I make every final call.
</what_this_is>

<surface>
Tell me which of these fits and route me before we start.
- Interviewing me about past decisions and writing the specs (prompts 03 to 10) -> the Claude app,
  in a private Project named "Agent desk". Chat is the right place for this part.
- A folder of past trade notes, memos or exports to mine -> Claude Code, pointed at the folder.
- Running or backtesting ai-hedge-fund (prompts 16 and 18) or adding my specialists to it (prompts 11 to 14) -> Claude Code
  on my own machine. It writes files and runs tests. A chat window cannot.
STOP and re route rather than degrade if: I paste a file path or a folder screenshot instead of content
(a Claude Code job, say so and stop); my notes arrive truncated (name what is missing, extract no rule
from it); or you need a record I have not given (ask once, name it, stop). Advise, do not apologise,
do not continue anyway.
</surface>

<evidence_tiers>
Declared once. Every rule, cue and figure in this pack carries its tier and its source id.
  TIER 1 (T1)  Written at the time: the memo, the order note, the chat message, the data snapshot dated on or
      before the decision. Can support a rule.
  TIER 2 (T2)  Rebuilt later from dated data: a chart or table you pull today for the decision date. Can
      support a cue, if the date is stated.
  TIER 3 (T3)  Told now from memory. Generates a QUESTION and never a rule on its own. Hindsight lives here.
Source id format: [incident id | document or "interview" | date]. A rule with no source id is not a rule.
</evidence_tiers>

<shared_rules>
Apply in every prompt, so later prompts do not repeat them.
1. Independence. Each specialist judges from the case file only. It never sees another specialist's view.
2. Flags carry one tag: CHANGES THE DECISION, WORTH A QUESTION, or EXPLAINED BY CONTEXT (name the
   context). Only the first reaches my summary. An explained flag is closed and must not colour later
   prompts. A flag I explain is closed too.
3. Disagreement between specialists is information, not an error. Never average it away.
4. "Insufficient data" is an honest answer. A guess is not.
5. Only arithmetic that does not tie may block. A judgment flag never blocks on its own.
6. The coordinator recommends. I decide. If I do nothing, the default is no action.
</shared_rules>

<setup>
Ask ONE AT A TIME, waiting each time. Do not start until all are answered.
0. Do you want to SEE a working AI fund first? If yes, go to prompt 16 in Claude Code (its investor
   agents on real stocks, a simulated book), then 17 and 18. Then come back to build YOUR specialists.
1. Which decision do we capture first? A. Entry on a new position. B. Sizing. C. Exit or trim.
   D. A manager, deal or allocation approval. E. Something else, name it. One decision only.
2. Where do my past decisions live? A. Notes or memos I can upload to this Project. B. I will paste
   them. C. A folder on my machine (Claude Code). D. Mostly in my head (we lean on prompt 04). E. A mix.
3. Capture and reuse: {{DECISION}}, {{BOOK}} (what I manage, in one line), {{HORIZON}} (typical holding
   or decision horizon), {{WHO_DECIDES}} (me alone, or a committee).
4. Read my output bar back: every rule has a source id and a tier, T3 alone never makes a rule, and no
   agent is built until prompt 08 passes.
Then run prompt 02 before touching my real decisions.
</setup>

<how_to_adapt>
- Different decision: change {{DECISION}}, rerun from 03. A committee: run 04 with each member, merge in 06.
- Stricter evidence: forbid T2 cues in prompt 07.
- Newer model: pass --model with its full id in prompts 13, 16 and 18, and log it.
- Specialist count: prompt 06 decides it.
</how_to_adapt>
Click to copy
<role>Run this BEFORE you tell me one real decision. Claude Opus 5.5.</role>

<task>
Work this sample exactly as prompts 03, 06, 08 and 15 would, then compare line by line to the
expected output. If ONE item does not match, name it and STOP. Do not start prompt 03 until it matches.

SAMPLE. Decision: entry on a new long position. Book: a personal equity and commodity account.

Incident I1 [memo_2025-03-04.txt | T1 | 2025-03-04]  "Entered copper miner. Price broke a 6 month
  range on volume 2x the 20 day average. Balance sheet net cash. Would exit on a close back inside
  the range."
Incident I2 [interview | T3 | told 2026-09]  "I passed on the gold miner in June 2025 because I just
  knew the breakout was fake." No memo, no chart saved.
Incident I3 [memo_2025-08-19.txt | T1 | 2025-08-19]  "Entered uranium name. Range break on 1.8x
  volume. Net debt 3x EBITDA, sized half. Would exit on a close back inside the range."
Incident I4 [memo_2025-11-02.txt | T1 | 2025-11-02]  "Passed on lithium name. Range break but volume
  only 0.9x average."
Stated rule, told now [interview | T3]: "I never buy anything with debt."

Decision log, four scored entries (probability the position is up at the review date, outcome 1 or 0):
  E1 0.70 outcome 1 ; E2 0.60 outcome 0 ; E3 0.80 outcome 1 ; E4 0.30 outcome 0

Specialist views on a new case, run blind:
  technical-read: "range break confirmed, volume 2.1x" confidence high
  balance-sheet-read: "net debt 2.5x EBITDA, above my comfort" confidence medium
  base-rate-check: "insufficient data: no count of past range breaks in this sector" 

EXPECTED OUTPUT, with the working.

1. Cues extracted. Range break (I1, I3, I4, all T1). Volume above average: entered at 2x (I1) and
   1.8x (I3), passed at 0.9x (I4), all T1. The cut lies somewhere between 0.9x and 1.8x. Mark it
   DERIVED, PENDING and ask me; do not name a number. Leverage changes SIZE, not entry (I3, T1).
2. The stated rule contradicts the record. "Never buy anything with debt" is T3; I3 (T1) shows an entry
   at 3x net debt, sized half. What I did outranks what I say: leverage sets size, not entry. Ask me to
   confirm; never silently pick a version.
3. I2 makes NO rule. It is T3 with no dated record. Output: a question ("what did the chart show on
   the day?"), not a cue. If your run turned "fake breakout" into a rule, it failed.
4. Factor split. Two specialists from this sample: technical-read (range break plus volume, which
   cannot be judged apart) and balance-sheet-read (leverage, which feeds size). base-rate-check is
   recommended but has no data yet.
5. Coordinator sheet on the new case. All three views printed word for word. Disagreement named:
   technical says enter, balance sheet says caution. Under the extracted rule this points to entering
   at reduced size, a recommendation, not a decision. base-rate-check's "insufficient data" is an
   open question, NOT a vote against. The disagreement is EXPLAINED BY CONTEXT (different factors on
   purpose), never an error.
6. Brier score of the log. Working: (0.70-1)^2 = 0.09 ; (0.60-0)^2 = 0.36 ; (0.80-1)^2 = 0.04 ;
   (0.30-0)^2 = 0.09. Sum 0.58. Mean 0.58 / 4 = 0.145. Lower is better, 0.25 is what always saying
   0.5 would score. Four entries is far too few to judge calibration: say so.

DELIBERATE GAP. I2 has no record from the day. Your run MUST stop short of a rule for I2 and ask for
the June 2025 chart or note. If it made a rule anyway, the method is not safe on my history.
</task>

<review_gate>Show me each of the six items with MATCH or MISMATCH. On any mismatch, stop.</review_gate>
Click to copy
<role>Knowledge engineer preparing a Critical Decision Method interview. Claude Opus 5.5.</role>

<task>
Using the data source I chose in prompt 01, help me assemble 5 to 8 real past {{DECISION}} incidents:
1. At least two wins, at least one loss, and at least one PASS (a decision not to act).
2. Prefer hard incidents where judgment mattered. Routine cases teach nothing.
3. For each, record: incident id, date, what I decided, what records exist from that day, tier.
4. Build the information set AS OF the decision date. Anything learned later goes in a LATER column
   and never explains the decision.
5. Set aside two incidents as HELD OUT. We do not interview on them. Prompt 08 tests the specs on them.
</task>

<trap>Incidents picked because they turned out well teach the outcome, not the method. Insist on the
loss and the pass.</trap>

<stop>If fewer than two incidents have a T1 record from the day, stop. Name the records to look for
(the order note, the memo, the message to a colleague, a dated screenshot) and do not build a method on
memory alone.</stop>

<output_format>Table: id | date | decision | outcome | records from the day | tier | LATER facts |
held out Y/N.</output_format>

<constraints>Work from the data source selected in prompt 01. Shared rules from prompt 01 apply.</constraints>
<review_gate>I confirm the incident list and the two held out incidents before prompt 04.</review_gate>
Click to copy
<role>Interviewer trained in the Critical Decision Method. You ask, I answer. Claude Opus 5.5.</role>

<task>
For each incident that is NOT held out, run four passes. Ask one question at a time and wait.
Pass 1: "Walk me through it from the moment it got your attention." Do not interrupt.
Pass 2, the timeline: rebuild the sequence with dates and the decision points.
Pass 3, the probes, at each decision point:
  - Cues: what did you see in the data, the chart, the filing, the tape?
  - Expectancy: what did you expect next, and what would have surprised you?
  - The anomaly: what did not fit, and did it change your mind?
  - Options: what else did you consider, and why did you reject it?
  - Novice: what would someone new have missed here?
  - Gaps: what did you want to know and could not, and what did you do?
  - Kill: what evidence would have made you reverse?
Pass 4, the check: read my answers back as a timeline and let me correct it.
</task>

<trap>"How do you usually decide" gets the textbook answer. What an operator notices surfaces only on a
real incident, so every question stays on it and its date.</trap>

<stop>When my answer uses something I only learned later ("it obviously rolled over after"), stop
that line, mark it LATER, and ask what I knew on the day. Never write a cue from a LATER fact.</stop>

<output_format>Per incident: cues | expectancies | anomaly | rejected options | novice error | gaps |
kill criteria. Each item with its tier and source id.</output_format>

<constraints>Work from the data source selected in prompt 01. One question per message.</constraints>
<review_gate>I read each incident write up and mark it correct before prompt 05.</review_gate>
Click to copy
<role>Think aloud observer. Claude Opus 5.5.</role>

<task>
I will work through one CURRENT {{DECISION}} out loud, pasting my thoughts as I go.
1. Do not ask "why" while I am working. Only prompt me with "keep talking" if I stop.
2. After I finish, list the cues I used, in order, and mark any that did not appear in prompt 04.
3. List anything I checked that I never mentioned in the interviews. That is tacit method surfacing.
4. Write down my stated expectation and a probability (0 to 1) BEFORE any outcome is known, with the
   date and {{HORIZON}}. This becomes the first real entry for prompt 10.
</task>

<trap>Asking why during the task changes how people decide. Explanations come after.</trap>

<stop>No probability: stop and ask for a range. "Likely" cannot be scored, so it stays out of the record.</stop>

<output_format>Cue sequence | new cues not in prompt 04 | stated expectation | probability | horizon | date.</output_format>
<constraints>Work from the data source selected in prompt 01.</constraints>
<review_gate>I confirm the probability and date are exactly what I said.</review_gate>
Click to copy
<role>Decision designer who splits a judgment into independent assessments. Claude Opus 5.5.</role>

<task>
1. List every recurring cue across prompts 04 and 05, with the incidents it came from.
2. Group cues into FACTORS. If factor A cannot be judged without knowing B, merge them.
3. For each factor, name the base rate I lean on ("how often does a setup like this work"). None is a
   finding, not a failure.
4. List conflicts between rules and the condition that decides which applies (regime, liquidity,
   horizon). If none, keep both as a known tension.
5. List say versus do contradictions; T1 outranks T3. Ask me about each; never silently correct.
6. Propose one specialist per factor, plus a base rate specialist if any factor lacks a reference class.
</task>

<trap>One agent that "considers everything" blends the factors into one impression; too many slice one
judgment into pieces that cannot be scored apart. The merge test in step 2 sets the count.</trap>

<stop>A factor backed only by T3 gets no specialist yet. Name the record that would support it; park it.</stop>

<output_format>Factor table: factor | cues | incidents | tier | base rate | specialist. Then conflicts,
then contradictions.</output_format>

<constraints>Work from the data source selected in prompt 01. Shared rules from prompt 01 apply.</constraints>
<review_gate>I approve the factor list and the specialist count.</review_gate>
Click to copy
<role>Spec writer. Each spec is the whole brief an agent will ever get. Claude Opus 5.5.</role>

<task>
For each approved specialist, write a spec with these fields:
  name | the ONE factor it owns | what it judges and what it explicitly does not |
  inputs it may use, with freshness limits | cues to look for, each tied to its source incident |
  base rate it starts from | scoring scale with an anchored meaning for each level |
  output: view, confidence, probability or range, horizon, evidence quoted from the case file,
  flags with tags, missing inputs, what would change its mind |
  the "insufficient data" condition and exactly what it returns |
  independence: it never sees other specialists' views |
  provenance: incidents and interview dates it was built from, and my sign off with a date
Each spec is a system prompt under 300 words, second person, one lens.
</task>

<trap>A specialist briefed on my CURRENT view of a trade agrees with me. Brief it on my method and cues,
never my view of the position.</trap>

<stop>If a spec needs a cue with no source incident, stop and mark it DERIVED, PENDING. It does not ship
until I confirm it on a new case.</stop>

<output_format>One block per specialist: the field table, then the system prompt text.</output_format>
<constraints>Work from the data source selected in prompt 01. No model name other than Claude Opus 5.5.</constraints>
<review_gate>I sign each spec with a date. Unsigned specs are not built.</review_gate>
Click to copy
<role>Back tester. You run each spec as a separate, fresh read. Claude Opus 5.5.</role>

<task>
For each held out incident from prompt 03:
1. Build the case file from the AS OF information set only. No LATER facts, no outcome.
2. Run each specialist's system prompt on the case file SEPARATELY, in a fresh reply that does not
   show the other specialists' output. Record each view.
3. Compare each view with what I decided and the outcome.
4. Score direction: AGREES WITH MY CALL, DISAGREES, or ABSTAINED.
5. Looks wrong, is normal: specialists disagreeing, an honest "insufficient data", or my override: EXPLAINED BY CONTEXT,
   unless they disagree on a shared fact (price, date), which is a data error.
6. Count: of all flags raised, how many were EXPLAINED BY CONTEXT? Show the fraction.
</task>

<trap>Specialists run in one reply anchor on each other. One per reply, or the result is void.</trap>

<stop>If more than 1 in 4 flags are EXPLAINED BY CONTEXT, or a specialist points the wrong direction on
both held out incidents, stop. Name the spec, go back to prompt 07, and do not build anything in
Claude Code until this passes.</stop>

<output_format>Per incident, per specialist: view | direction score | flags with tags. Then the
explained fraction with its working (explained flags / all flags).</output_format>
<constraints>Work from the data source selected in prompt 01.</constraints>
<review_gate>I accept the back test result before prompt 09.</review_gate>
Click to copy
<role>Head of a small research desk who runs the morning meeting and never takes the decision away
from the owner. Claude Opus 5.5.</role>

<task>
Write the coordinator's spec:
1. It prints every specialist view WORD FOR WORD, never rewritten, shortened or merged.
2. It lists agreements, then named conflicts, each with the evidence that would settle it.
3. It lists open questions, including every "insufficient data".
4. It runs a pre mortem BEFORE the decision: "Assume this went wrong at {{HORIZON}}. What are the three
   most likely reasons?" Using only the case file.
5. It gives a recommendation with a probability, and says plainly: "The decision is yours."
6. It may report UNRESOLVED. A coordinator that always resolves is siding by default.
</task>

<trap>A coordinator that summarises will quietly drop the dissent. Code copies the views (prompt 11, decide.py);
the model only adds conflicts, the pre mortem and the recommendation.</trap>

<stop>A missing or failed view: the coordinator names it and shows the rest. It never fills the gap or
recommends as if that view agreed.</stop>

<output_format>Coordinator system prompt, then a sample desk sheet built from one held out case.</output_format>
<constraints>Work from the data source selected in prompt 01.</constraints>
<review_gate>I approve the desk sheet layout.</review_gate>
Click to copy
<role>Decision journal designer. Claude Opus 5.5.</role>

<task>
1. Define one log entry, written BEFORE execution: id, timestamp, {{DECISION}} type, case file hash,
   model id, every specialist view verbatim with its prompt_key, coordinator sheet, pre mortem, my
   decision, size, my probability, horizon, kill criteria, review date, override flag and my reason.
2. Define the outcome record, written LATER as a separate line pointing at the entry id. The entry is
   never edited.
3. Scoring: Brier score per entry, (probability minus outcome) squared, outcome 1 or 0. Show the working
   on my entry from prompt 05 once its review date passes.
4. Tag each scored entry: BAD DECISION, BAD LUCK, or BAD INFORMATION, with one line of reason.
</task>

<trap>Results alone cannot tell a good decision from a lucky one, and reasoning edited afterwards
measures nothing. Entry first, outcome later, separate lines, never overwritten.</trap>

<stop>If an entry has no probability, it cannot be scored. Refuse to create it without one.</stop>

<output_format>The JSON fields for an entry and for an outcome, with one filled example of each.</output_format>
<constraints>Work from the data source selected in prompt 01.</constraints>
<review_gate>I confirm the fields before prompt 11 writes them into code.</review_gate>
Click to copy
<role>Python developer. Run this in Claude Code, in a folder {{DESK_DIR}} where the ai-hedge-fund
clone will live. Claude Opus 5.5.</role>

<task>
First, the environment. Run one line at a time and show me each output. From the ai-hedge-fund
README (Development section):
  git clone https://github.com/virattt/ai-hedge-fund.git
  cd ai-hedge-fund
  poetry install
  poetry run pytest hedge_fund
Python 3.11 or newer. If poetry is missing, use uv from the same folder. Install uv first if needed,
from uv's own docs:
  macOS or Linux:        curl -LsSf https://astral.sh/uv/install.sh | sh
  Windows (PowerShell):  powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Then:
  uv venv --python 3.12
  source .venv/bin/activate        (Windows PowerShell: .venv\Scripts\Activate.ps1)
  uv pip install -e . pytest
  python -m pytest hedge_fund
On uv, "poetry run X" is plain "X" with .venv active.
Baseline PASS: the repo's tests are green BEFORE any change. Record the count.

Keys go in a file named .env at the repo root, never in this chat, two lines:
  FINANCIAL_DATASETS_API_KEY=your-key   (paid; see financialdatasets.ai/pricing)
  ANTHROPIC_API_KEY=your-api-key        (from the Claude Console)

Write ~/.hedge-fund/mandates/my-desk.yaml: schema_version 2, one strategy named after my
{{DECISION}}, blend: {mode: long_only}, models = desk_<name> for each spec I signed in prompt 07,
with the risk, capital, rebalance and benchmark keys copied from hedge_fund/fund/example.yaml.
Write desk/decide.py: reads a run file from prompt 13, prints every signal's reasoning word for
word, grouped by specialist, then asks ME for decision, size, probability, horizon and reason, and
appends one JSON line to desk/decision_log.jsonl with the prompt 10 fields. Code writes the log,
never an agent. Print ls -R desk as proof. Do NOT write the specialists yet: prompt 12 tests first.
</task>

<trap>The default snapshot is filed ratios only: no price series, volume or news. A technical specialist
left on it reasons about a chart it cannot see, or always abstains. Mark which specs need prices now.</trap>

<stop>If the baseline tests are not green before your change, stop: fix the install first. Do not
invent a class, method or config key. Check names against hedge_fund/signals/base.py and
llm_agent.py.</stop>

<output_format>Command outputs, baseline count, mandate, decide.py, price series specs.</output_format>
<constraints>Never add a broker, an order API or a trading library.</constraints>
<review_gate>I confirm the baseline count and the mandate's model list.</review_gate>
Click to copy
<role>Test first developer. Claude Opus 5.5. Run in Claude Code in the ai-hedge-fund folder.</role>

<task>
1. Write hedge_fund/signals/test_desk.py while no desk_ specialist exists. Run it and show it RED.
   Start from the fakes in hedge_fund/signals/test_llm_agents.py, then extend them: FakeLLM stores
   each (system, user) it receives, and the mock data client gains get_prices. No network.
   For every desk_ name in my mandate it asserts:
   a. it is in ALPHA_MODEL_REGISTRY and its name equals its key
   b. a canned bullish 70 reply folds to Signal.value 0.7
   c. with too little history it abstains (metadata["abstained"] is True) instead of guessing
   d. the prompt it sends contains no data dated after the as of date (serve bars past it and check)
   e. the prompt it sends contains no other specialist's output
   f. Fund(load_spec(Path.home() / ".hedge-fund/mandates/my-desk.yaml")) builds; an unregistered
      name fails here (Python does not expand "~")
2. Now write each specialist as hedge_fund/signals/desk_<name>.py: subclass LLMAgent, set
   investment_approach = "long_only" (or "long_short" only if my spec shorts), return name
   "desk_<name>", and return my signed spec text from get_system_prompt(). Keep the two lines the
   contract tests require, copied from signals/buffett.py: the rule that treats "the most recent
   filing date shown" as the present, and "Respond with JSON only, in exactly this schema:" with
   signal, confidence, reasoning. A spec that needs a price series overrides build_snapshot()
   and returns an object with ticker, as_of, content_hash and render(), built only from bars dated on
   or before the as of date. Register each in ALPHA_MODEL_REGISTRY in hedge_fund/signals/__init__.py.
3. Rerun and show GREEN. Then run the whole suite: poetry run pytest hedge_fund -q
</task>

<trap>The shared tests loop over EVERY registered agent. A price specialist fails
test_every_agent_maps_and_replays_native_metadata (its mock serves fundamentals only). Do not weaken
the agent: exclude agents that override build_snapshot from that one parametrize list, and say why.</trap>

<stop>If the test is green before any specialist exists, the test is wrong. Stop and fix it. If the full
suite count drops below the prompt 11 baseline plus your new tests, name what broke.</stop>

<output_format>The red run, the specialist files, the green run, the full suite count.</output_format>
<constraints>Use the signed specs from prompt 07 exactly. Do not loosen an assertion to make it pass.</constraints>
<review_gate>I see red then green, and confirm each desk_ prompt matches my signed spec.</review_gate>
Click to copy
<role>Desk operator on day one. Claude Opus 5.5. Run in Claude Code in the ai-hedge-fund folder.</role>

<task>
Use one held out incident from prompt 08: its ticker {{TICKER}} and decision date {{AS_OF}}.
1. Run (uv path: drop "poetry run"): poetry run aihf ~/.hedge-fund/mandates/my-desk.yaml
   --tickers {{TICKER}} --date {{AS_OF}} --model claude-opus-5-5 --out desk/runs/case-001.json
   (make desk/runs first)
2. Print each specialist's signal, confidence and reasoning from strategies[].signals, word for word,
   beside the prompt 08 result for the incident. Apply the prompt 09 coordinator spec. Never rewrite a view.
3. Run: python desk/decide.py desk/runs/case-001.json and let me enter a decision.
4. Run the tests from prompt 12.
PASS means all of these: one signal per specialist, every abstention named with its reason, my
decision in desk/decision_log.jsonl, tests green, and each specialist's direction matching prompt 08
for this incident. The fund's final_weights are a simulated book, shown for reference, never my
decision.
</task>

<trap>Answers are cached in ~/.hedge-fund/cache/llm, keyed on the prompt text, so a rerun on the same
filings returns the first answer and tests nothing. Change the spec or move that folder aside.</trap>

<stop>If the run prints Pending, the next close after {{AS_OF}} has not happened yet; pick an earlier
date. If any part of PASS fails, the desk is not built. Say which part and go to prompt 14. Do not quote
a cost: this run does not report one. Read usage in the Claude Console.</stop>

<output_format>Signals table | back test comparison | log line | test output | PASS or FAIL.</output_format>
<constraints>Research only. The run uses the simulated broker. You make the call.</constraints>
<review_gate>I read the PASS or FAIL line myself.</review_gate>
Click to copy
<role>The developer who has broken this desk before. Claude Opus 5.5. Run in the ai-hedge-fund folder.</role>

<task>
1. Prove the lookahead guard can fail. Delete the date filter in one price specialist, rerun check d
   from prompt 12, and show it RED. Restore the filter and show it GREEN. A test that passes both ways
   proves nothing.
2. Debug table. Match my symptom, apply the fix, rerun prompt 13:
   - Missing FINANCIAL_DATASETS_API_KEY or ANTHROPIC_API_KEY: the .env is not at the repo root, or the
     name is misspelt.
   - "unknown model 'desk_x'": not registered in ALPHA_MODEL_REGISTRY.
   - Contract test fails on "most recent filing date" or "Respond with JSON": the spec text dropped
     one of the two required lines.
   - Every run abstains with "insufficient data": fewer than four filed trailing twelve month periods,
     or a price specialist on the default snapshot.
   - Directions differ from prompt 08: diff each desk_ file against the signed spec.
3. Definition of done: prompt 13 passes, the guard test fails and passes on cue, and three real
   decisions are in the log.
4. Next builds, in order: prompt 18 (backtest the mandate point in time); a base rate specialist fed
   from your own log; a second decision type, starting again at prompt 03.
</task>

<trap>Keys exported in the shell win over the .env file, so a fixed .env can look like it changed
nothing. Check the shell first.</trap>

<stop>If the guard test is green with the filter removed, stop. No live decision until it can fail.</stop>

<output_format>Guard test red and green, any fix applied, then the prompt 13 rerun result.</output_format>
<constraints>Never add a real broker. Keep the model fixed with --model and recorded in the log.</constraints>
<review_gate>I confirm the guard test and the definition of done.</review_gate>
Click to copy
<role>Reviewer who separates decision quality from luck. Claude Opus 5.5.</role>

<task>
Read decision_log.jsonl (Claude Code) or the entries I paste (Claude app).
1. For every entry past its review date, pair it with its outcome line and compute the Brier score,
   showing (probability minus outcome) squared for each.
2. Per specialist: how often it was right on direction, how often it abstained, how often I overrode it
   and how those overrides turned out.
3. Recurring "insufficient data" items: which input to collect.
4. Recommend spec changes ONLY where the log supports them, each with a version and a date.
5. Write desk-review.html, self contained, no network calls: a table per specialist, the Brier trend
   by month, the override record, using only the numbers above.
</task>

<trap>Changing a specialist after one bad outcome scores the result, not the decision. Change a spec only
on a repeated reasoning error.</trap>

<stop>Under 10 scored entries: report the numbers, say calibration cannot be judged yet, recommend no
spec change.</stop>

<output_format>Scores with working, the per specialist table, the input wish list, proposed changes
with evidence, then desk-review.html.</output_format>
<constraints>Work from the data source selected in prompt 01. Never edit a past entry.</constraints>
<review_gate>I approve every spec change before it is made.</review_gate>
Click to copy
<role>Python developer setting up an open source research fund. Claude Opus 5.5. Run in Claude Code.
Simulated broker only; it cannot place a real order.</role>

<task>
This runs ai-hedge-fund (https://github.com/virattt/ai-hedge-fund, MIT): Graham, Buffett and Munger
agents plus a post earnings drift model; plain code blends their views into a simulated book.

One line at a time, output shown. From the README:
  uv tool install aihf        (or: pipx install aihf)
  aihf
Bare aihf asks for keys (saved to ~/.hedge-fund/.env) and copies the example desk to
~/.hedge-fund/mandates/. Quit it, then run one cycle:
  aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT --model claude-opus-5-5 --out first-run.json
Always pass --model: an installed build can carry a different default model than the repo.
The app builds funds from four strategies (Deep Value, Earnings Drift, Fundamental L/S, Inflections);
Fundamental L/S runs all five investor agents.
Keys: Anthropic, and Financial Datasets for the data (paid; see financialdatasets.ai/pricing).

PASS: first-run.json exists; every agent has a signal or a reasoned abstention per ticker; the summary
line names strategies, signal count and NAV. Say how many abstained and why.
</task>

<trap>The agents see filed ratios such as market cap and P/E, never prices or news. A strong "bullish"
is a read of the fundamentals table alone, not of the chart you are looking at.</trap>

<stop>Missing key: name it and stop. "Pending": rerun with an earlier --date. A skipped ticker: say
which and why; keep it in the report.</stop>

<output_format>Per agent per ticker: signal, confidence, one reasoning line; then weights.</output_format>
<constraints>Research only. Never add a broker, an order step or any trading library.</constraints>
<review_gate>I read the reasoning before the weights.</review_gate>
Click to copy
<role>Senior portfolio manager who treats the fund's book as one input. Claude Opus 5.5.</role>

<task>
Read first-run.json from prompt 16 (Claude Code), or the signals I paste (Claude app).
1. Per agent per ticker: signal, confidence, and the two filed figures its reasoning rests on, with
   filing dates, from the "user" field of ~/.hedge-fund/cache/llm/<prompt_key>.json (prompt_key is in
   the signal's metadata).
2. Where agents disagree on a ticker, name the figure that would settle it.
3. Map the agents to my prompt 07 specialists: which of MY factors did none cover, and which agent
   judged something I never use?
4. Tag every concern: CHANGES THE DECISION, WORTH A QUESTION, or EXPLAINED BY CONTEXT. Agents that
   disagree because they apply different philosophies are EXPLAINED BY CONTEXT.
5. State the simulated weights, ask for MY decision, size, probability and horizon, and write a prompt
   10 log entry with the fund's weight as one field.
</task>

<trap>A clean simulated book anchors. Make your call before you read the weights.</trap>

<stop>A figure or filing date not in the snapshot, or signals pasted alone: write NOT SHOWN, never supply
a date. An abstention is an open question, not a vote. A run on another model is not comparable: stop,
keep it out of the log.</stop>

<output_format>Agent lines, the open disputes, the coverage map, tagged concerns, then the log entry.</output_format>
<constraints>Work from the data source selected in prompt 01. You make the call.</constraints>
<review_gate>I sign the log entry.</review_gate>
Click to copy
<role>Quant researcher checking a simulated fund's history before anyone trusts it. Claude Opus 5.5.
Run in Claude Code, after prompt 16 passes (example fund) or prompt 13 passes (my desk).</role>

<task>
The README line is: aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT --backtest
Add --model and --out (both are run.py flags) and pick the path:
- Example fund, from prompt 16's install: aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT
  --backtest --start {{START}} --date {{END}} --model claude-opus-5-5 --out backtest.json
- My desk: my desk_ agents exist only in my clone, so the installed aihf fails "unknown model". Run it
  in the ai-hedge-fund folder: poetry run aihf ~/.hedge-fund/mandates/my-desk.yaml (same flags; uv
  path: drop "poetry run"). --model must equal prompt 13's.
1. Cutoff. Anthropic's models overview lists Claude Opus 5.5's training data cutoff as Jun 2026 (T1,
   platform.claude.com/docs/en/about-claude/models/overview). Set {{START}} after it. The default
   window, 78 weeks before --date, sits mostly before it. If {{START}} is before the cutoff, label every
   return IN SAMPLE and make no benchmark claim.
2. Cost. First run: two tickers, {{START}} a few weeks before {{END}}. Agents call my Anthropic key per
   ticker when a new filing changes the snapshot; a price specialist calls the paid data key on every
   rebalance date. Check usage in the Claude Console, then widen.
PASS: backtest.json exists and the summary prints cycles, pending, return vs benchmark, Sharpe, max
drawdown. It fills at the next close; clamped weight stays in cash.
Report, working shown, all figures T2:
3. total_return_pct and benchmark_return_pct are FRACTIONS (0.123 = 12.3%; the summary prints percent).
   Excess = the two subtracted.
4. Tie: nav[-1] / capital - 1 must equal total_return_pct within 0.0001 (fund.py computes it that way).
5. Clamps by limit, the cash they left, and n_pending with reasons.
6. Sharpe: mean daily return over its standard deviation, times the square root of 252.
Checked, normal: a long only fund trailing a rising benchmark while clamps hold cash.
</task>

<trap>Point in time covers the filings, not the model. The data layer cuts on filing_date, but each
agent's prompt names the company, so before the cutoff the model can score its memory. The simulated
broker charges no commission or slippage, and today's tickers are the survivors.</trap>

<stop>If step 4 does not tie, stop: the file is not the run you think. If a ticker abstained on more
than half the dates, name it and stop before any benchmark comparison. A model other than the one in
prompt 13 or 16 is not comparable: stop.</stop>

<output_format>Command, cutoff line, PASS line, one table (fund, benchmark, excess, Sharpe, max
drawdown, cycles, orders, clamps, pending), then the trap check.</output_format>
<constraints>Work from the data source selected in prompt 01. Simulated broker only.</constraints>
<review_gate>I read the cutoff line and trap check first.</review_gate>
Built on open source
ai-hedge-fund (open source, MIT)

The code is public and free. The setup instruction above installs and wires it for you. You never need to open this link.

From a working build to an operating system.

For fund managers, family office CIOs, RIAs and CFOs: run ai-hedge-fund, the open source AI hedge fund, on Claude, then add your own judgment as specialist agents

Path A · free

Run the build independently

The setup rail and every prompt above are free and stay free. The cost is your time, and the risk of wiring it wrong on live data.

Back to the prompts
Path B · done with you

Connect it to your operation

We would run the interviews with you, build your specialists against your real data, wire a point in time data loader for the factors ai-hedge-fund does not cover, and set up a decision log and review cadence that fits your books and records obligations. Done with you, then handed over so you own it.

Book a build call
data safety

Before you use live numbers

  • • Run last quarter's numbers first. Live data is not a test bed.
  • • Nothing here uploads to us. It runs in your own Claude account, on your own machine.
  • • A named human reviews and signs every output before it reaches a board, lender, or client.
  • • Wiring the open-source piece to real systems? Keep keys out of public code and add access control first — or have us do that part.
the fine print

Credit the original author

Prompts authored by consultance.ai. ai-hedge-fund is open source under the MIT licence by Virat Singh (github.com/virattt/ai-hedge-fund); no affiliation. Its investor agents are stylised personas, not the real investors. Market data comes from Financial Datasets under its own paid terms. Brian Kelly and Bracket22 are referenced from public CNBC reporting as the example that inspired the pack; no claim about what tools Bracket22 uses. Your decisions, notes and data go only to your own Claude account, your own tenant if you are on Team or Enterprise, and your own machine; we never see them. Educational guide, not investment, legal or compliance advice. ai-hedge-fund trades a simulated account only.

Bring this workflow into your operation.

Book a build callBack to the library

Want this wired into your stack instead of running it yourself? That is our AI deal desk and finance automation service.

Newsletter

New builds, as they ship

One short note when a new build ships: what it does, who it is for, and how to run it in your own Claude.

Free. Three short welcome emails over your first three days, then at most one email a week. Unsubscribe in one click.

More like this

Related builds

All builds
Claude Code Trading Agents for Robinhood coverFinance and data
Finance and data

Claude Code Trading Agents for Robinhood

For self-directed investors: run Claude Code trading agents on your Mac through Robinhood's MCP, with 12 prompts and an approval gate you test before any agent trades.

Setup guide
Finance and data
Finance and data

The 14 Agent Hedge Fund

For retail quants and finance founders: a 14 seat research org chart after TradingAgents, run by hand in Claude or built in Claude Code, with an evidence gate and a human sign off before any decision.

Setup guide
Finance and data
Finance and data

169 Finance AI Agents Directory

For CFOs, controllers, allocators and PE and IB teams: 169 named finance AI agents by desk, each linking to its free pack. The router picks your 3 to 6 and sends hard jobs to Fable 5.2.

Setup guide
Get the free kitBook a call

Share with your workflow owner.

Bring the relevant team into the conversation with the build and setup guide.

Forward by email
in one line

What is Build Your Own AI Agent Desk?

Build Your Own AI Agent Desk is a finance and data build in the consultance.ai AI Build Library. For fund managers, family office CIOs, RIAs and CFOs: run ai-hedge-fund, the open source AI hedge fund, on Claude, then add your own judgment as specialist agents. 18 prompts, and you keep the final call. It fits Anyone who makes the same kind of decision again and again, an entry, a sizing call, a manager approval, and wants their own method run by specialist agents that argue before they decide. Part one needs no install. Part two adds your specialists to ai-hedge-fund in Claude Code.. Setup difficulty is Technical, with 4 plain-English steps.

What does Build Your Own AI Agent Desk do?

For fund managers, family office CIOs, RIAs and CFOs: run ai-hedge-fund, the open source AI hedge fund, on Claude, then add your own judgment as specialist agents. 18 prompts, and you keep the final call.

Who is Build Your Own AI Agent Desk for?

It fits Anyone who makes the same kind of decision again and again, an entry, a sizing call, a manager approval, and wants their own method run by specialist agents that argue before they decide. Part one needs no install. Part two adds your specialists to ai-hedge-fund in Claude Code..

How hard is Build Your Own AI Agent Desk to set up?

Technical to set up — one guided setup instruction covering 4 plain-English steps, plus 18 ready-to-run prompts on the resource page.

How would consultance.ai build this out?

We would run the interviews with you, build your specialists against your real data, wire a point in time data loader for the factors ai-hedge-fund does not cover, and set up a decision log and review cadence that fits your books and records obligations. Done with you, then handed over so you own it.

What are the licensing terms?

Prompts authored by consultance.ai. ai-hedge-fund is open source under the MIT licence by Virat Singh (github.com/virattt/ai-hedge-fund); no affiliation. Its investor agents are stylised personas, not the real investors. Market data comes from Financial Datasets under its own paid terms. Brian Kelly and Bracket22 are referenced from public CNBC reporting as the example that inspired the pack; no claim about what tools Bracket22 uses. Your decisions, notes and data go only to your own Claude account, your own tenant if you are on Team or Enterprise, and your own machine; we never see them. Educational guide, not investment, legal or compliance advice. ai-hedge-fund trades a simulated account only.

Connect this build to your workflow.

Discuss how Build Your Own AI Agent Desk fits your systems, controls, and team. We define the integration, review process, and deployment requirements with you.

This build comes from our AI consulting and AI implementation practice — see the full AI in finance guide and how we work with CFO teams.

Book an audit