Synthetic founder agent demo¶
Workstream E adds a narrow, deterministic ACQ Vantage-style demo agent. It is not a general autonomous-agent platform and does not call private systems or perform real side effects.
Flow¶
A founder supplies business context and metrics. The typed state machine then:
- records founder context;
- diagnoses the likely constraint using deterministic rules;
- retrieves synthetic playbook guidance from local demo data;
- drafts a next action with shared
RetrievedChunkcitations; - stops or escalates when high-risk side effects require human approval.
The runtime emits shared contracts:
AgentRunwithrun_id,trace_id, typedsteps,state,budgets,stop_reason, cost, and latency fields;AgentStepfor each state transition/tool call;TargetAnswerfor the cited recommendation;TraceRecordfor privacy-preserving observability.
Safety and bounded execution¶
The demo enforces bounded-loop controls via AgentBudget:
max_stepsmax_tool_callsmax_retrieved_playbooksmax_cost_usd(fixed at zero for the deterministic local demo)
Stop reasons use the shared StopReason contract: completed, budget_exhausted, max_steps, needs_human_approval, or error.
Tools are registered with typed specs containing:
- input/output validation fields;
- side-effect classification (
none,low,high); - auth scope;
- retry policy;
- human-approval requirements.
The high-risk approval path is intentionally synthetic. If the founder has less than six months of runway, the agent can recommend a cash-preservation action but stops at needs_human_approval unless a HumanApproval token is provided.
Deterministic replay¶
deterministic_run_id, deterministic_trace_id, and a stable pseudo-timestamp make repeated runs byte-stable for the same founder context and seed. This supports interview/demo replay without relying on an LLM or external services.
Example¶
from raghelm.agents import FounderContext, FounderMetrics, SyntheticFounderAgent
context = FounderContext(
company_name="Northstar DemoCo",
segment="vertical SaaS for field services",
business_model="subscription SaaS",
current_priority="where should the founder spend the next two weeks?",
metrics=FounderMetrics(
monthly_recurring_revenue=125_000,
month_over_month_growth_pct=6,
gross_margin_pct=78,
net_revenue_retention_pct=91,
monthly_logo_churn_pct=4.2,
qualified_pipeline_coverage=3.1,
sales_win_rate_pct=24,
runway_months=11,
),
)
result = SyntheticFounderAgent().run(context, seed="demo")
print(result.run.stop_reason)
print(result.answer.answer)
print([citation.chunk_id for citation in result.answer.citations])
Expected shape: the agent diagnoses retention as the likely constraint, cites the synthetic retention playbook, and proposes a two-week retention sprint before increasing acquisition spend.