concept

Agent Persona Pattern

created 2026-05-04 ai · multi-agent · patterns · personas · prompt-engineering

Agent Persona Pattern

A multi-agent shape where each agent is a known person or school of thought made executable, not a generic role specialist. Surfaced by ai-hedge-fund‘s 14 investor personas (Buffett, Munger, Cathie Wood, Burry, Taleb, etc.). Generalizes far beyond finance.

The Anatomy of a Persona Agent

Three parts, all required:

  1. Identity / system prompt — “You are Warren Buffett. Look for moats, durable competitive advantages, owner earnings. Avoid debt-heavy businesses…” Anchors the LLM’s reasoning voice and priorities.
  2. Deterministic analysis pipeline — Python (or TS) functions that compute the signals this persona actually cares about. Buffett: ROE, debt ratio, FCF, intrinsic value. Burry: deep value metrics, FCF yield. Wood: R&D as % of revenue, disruption indicators. The metrics encode the philosophy — not just the prompt does.
  3. Structured output schema — every persona emits the same shape:
    class PersonaSignal(BaseModel):
        signal: Literal["bullish", "bearish", "neutral"]
        confidence: int  # 0-100
        reasoning: str
    Identical schema across personas means a downstream synthesizer can read all signals uniformly.

Why This Is Different from Role-Specialist Multi-Agent

Multi-Agent Finance Workflows catalogs role-based swarms: “macro analyst”, “sector analyst”, “synthesizer.” Personas are different in three ways:

Role specialistPersona
IdentityFunctional (“the macro analyst”)Particular (“Warren Buffett”)
Deterministic sideDomain tools (data sources)Philosophy-encoded metrics
Where the bias comes fromTool selectionBoth metric choice AND prompt voice
Adversarial?Optional (“bull/bear” pair)Built-in (Buffett vs Wood disagree by design)
Onboarding new agentsDefine a rolePick a real person + research their philosophy

The honest tradeoff: personas are more legible to humans (everyone knows what Buffett means) but harder to construct correctly (you need to faithfully encode the philosophy in metrics, not just the prompt).

When to Reach for This

The persona pattern works when your domain has:

  1. Well-known thought leaders or schools with distinguishable, ideally contradictory positions
  2. Quantifiable signals per persona — there are real metrics or rules that operationalize their philosophy
  3. A coordinator role that benefits from explicit disagreement among personas

When it fails:

  • Your domain has no famous figures (most internal business processes)
  • Personas converge in their conclusions (no useful disagreement to surface)
  • The metrics-per-persona work is more expensive than just prompting a generic agent N times with N different lenses

Cross-Domain Applications

Journalism (relevant to fajb-next)

  • “Bob Woodward agent” — investigative angle, source verification first
  • “Christiane Amanpour agent” — international/political framing
  • “Walt Mossberg agent” — consumer/tech relevance check
  • Coordinator agent reads all signals → headline strategy

The deterministic pipeline per persona could be: archive search filtered by their typical beat, source-verification function calibrated to their standards, etc.

RFP Evaluation (relevant to manzas)

  • “Cost-conscious procurement officer” — TCO obsessed
  • “Risk-averse legal counsel” — IP/liability focus
  • “Innovation-hungry CTO” — emerging-tech weighting
  • Each persona scores a vendor submission with their lens. Composite score = mean weighted by stakeholder importance.

This is an explicit, defensible scoring system that maps to real org politics.

Code Review

  • “Linus Torvalds agent” — performance, simplicity, no abstractions for hypothetical needs
  • “Ousterhout agent” — module design, deep modules, interface clarity
  • “Kent Beck agent” — testability, refactoring, code smells
  • Each emits a {rating, confidence, reasoning} per file/function

Design Review

  • “Dieter Rams agent” — minimalism, function-first
  • “Don Norman agent” — affordances, user mental model
  • “Edward Tufte agent” — data density, chart accuracy

Implementation Patterns Worth Stealing

Pydantic-Structured-Output as Coordination Glue

The single most reusable element. When every agent emits {signal, confidence, reasoning}, the synthesizer just reads state.signals[*] — no parsing, no string sniffing, no JSON-prefix detection. Compare to fajb-next/streaming-architecture|JB's JSON-prefix sniffing for control messages which is the failure mode this pattern avoids.

In TS: Zod schemas + withStructuredOutput() from LangChain.

Deterministic Pipeline → LLM Reasoning Split

Each agent’s signal is half-deterministic (metrics computed in code) and half-LLM (the reasoning narrative). This is more grounded than pure-LLM agents and more flexible than pure-deterministic rules. The LLM doesn’t fabricate the numbers — it interprets them in voice.

For non-finance domains, the equivalent of “metrics” might be: similarity scores, presence/absence of features, structured extractions from documents.

Parameterizable Team Composition

ai-hedge-fund‘s create_workflow(selected_analysts) lets the user pick which personas run. If you have 14 personas but only need 3 for this query, prune the graph at build time. Cost-control + relevance both win.

Honest Critique

  • Persona drift — if your prompt for “Warren Buffett agent” isn’t grounded in actual quotes/positions, you’re getting a generic LLM with a name attached. The deterministic-pipeline-encodes-the-philosophy bit is what makes it real.
  • Stakeholder politics — picking which personas to include is itself a political act. (“Why is there no Greta Thunberg agent in our investment committee?”) Document the team composition decision.
  • Persona freshness — Buffett’s positions evolve. Cathie Wood’s preferences change. A persona prompt written in 2024 may be stale in 2027. Treat persona definitions as code, version them, expect maintenance.