You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Phase D - agent conversations and narrative prompts
- Add conversation system for agent-agent and agent-NPC exchanges
- Add --fidelity flag: low (no convs), medium (2 turns), high (3 turns)
- Add talk_to action type to reasoning schema
- Add relationship_weights to ScenarioSpec for conversation priority
- Add conversations table to study DB with helper methods
- Integrate conversation phase into engine timestep loop
- Add available_contacts to reasoning prompts
- Export conversation stats and conversations.json in results
* feat: add social_posts table and helper methods to StudyDB
* feat: record social posts from sharing agents during timestep execution
* feat: add social feed to reasoning context and prompts
- Add social_feed field to ReasoningContext
- Build feed from recent posts beyond agent's direct network
- Render 'What People Are Saying Online' section in prompts
* feat: export social_posts.json in results
* docs: add Phase D conversations and social posts to capabilities
* docs: mark DayPhases as omitted in v2 architecture
* fix: remove unnecessary async markers from fidelity tests
* fix: remove unused pytest import
Copy file name to clipboardExpand all lines: docs/capabilities.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,41 @@ After simulation runs, you have:
234
234
235
235
---
236
236
237
+
## Agent Conversations
238
+
239
+
Agents can talk to each other. When reasoning, an agent can choose to initiate a conversation with someone in their network.
240
+
241
+
**Talk-to actions**: During reasoning, agents can request to talk to someone - a coworker, neighbor, partner, or family member. The request includes who they want to talk to and what topic they want to discuss.
242
+
243
+
**Multi-turn exchanges**: Conversations are full back-and-forth dialogues. The initiator speaks, the target responds, they go back and forth for 2-3 turns depending on fidelity settings. Each turn is a complete LLM call with the speaker's persona and context.
244
+
245
+
**State updates from conversations**: Conversations change minds. After talking, both participants get updated sentiment, conviction, and potentially position. These conversation-driven state changes override provisional reasoning state - a compelling conversation can shift someone more than passive exposure.
246
+
247
+
**Partner and NPC conversations**: Agents can talk to their partner (whether another full agent or an NPC spouse) or household dependents. NPC conversations work the same way, but only the initiator's state updates - NPCs don't have persistent state.
248
+
249
+
**Conflict resolution**: When multiple agents want to talk to the same target, priority determines who wins. Higher relationship weight wins - a partner request beats a coworker request. Deferred requests can execute in later timesteps.
250
+
251
+
**Fidelity control**: The `--fidelity` flag controls conversation depth:
252
+
-`low`: No conversations at all - just reasoning
253
+
-`medium` (default): 2 turns (4 messages), top 1 conversation per agent
254
+
-`high`: 3 turns (6 messages), up to 2 conversations per agent
255
+
256
+
---
257
+
258
+
## Social Feed and Public Discourse
259
+
260
+
Agents don't just see their direct network neighbors. They perceive broader public discourse.
261
+
262
+
**Public statements become posts**: When agents share (set `will_share=True`), their public statement gets recorded as a social post. These accumulate over timesteps, creating a timeline of what people are saying.
263
+
264
+
**Social feed beyond network**: In subsequent timesteps, agents see a "What People Are Saying Online" section in their prompts. This shows recent posts from the broader population - not just direct neighbors. It's like seeing trending takes on social media from strangers.
265
+
266
+
**Network vs. public**: Peer opinions come from direct network neighbors. The social feed comes from everyone else who's sharing. Agents experience both - personal network influence and ambient public discourse.
267
+
268
+
**Configurable lookback**: The feed pulls from recent timesteps (default: 3 timesteps back, 5 posts shown). This models the recency bias of social media - you see what's trending now, not old takes.
269
+
270
+
---
271
+
237
272
## Scenarios You Can Run Today
238
273
239
274
To make it concrete, here are scenarios that work right now with no additional development:
@@ -249,12 +284,13 @@ To make it concrete, here are scenarios that work right now with no additional d
249
284
- Professional networks processing industry disruption news
250
285
- Religious communities responding to doctrinal changes
251
286
- Parent networks reacting to school policy updates
287
+
- Couples having conversations that shift their positions
288
+
- Workplace discussions that change minds
289
+
- Social media dynamics where public discourse influences individuals
252
290
- Any population, any country, any event, any outcome structure
253
291
254
292
The constraints are:
255
-
- No agent-to-agent conversations (yet)
256
-
- No agents creating public social posts (yet)
257
-
- No runtime fidelity/cost tradeoffs beyond merged pass (yet)
293
+
- No runtime fidelity/cost tradeoffs beyond merged pass and fidelity levels (yet)
258
294
- No validation against historical ground truth (yet)
259
295
260
-
Those are Phases D, E, F, and G. What's here now is Phases A, B, and C - the core simulation engine with households, networks, timelines, and reasoning.
296
+
Those are Phases E and F. What's here now is Phases A through D - the core simulation engine with households, networks, timelines, conversations, and social posts.
Copy file name to clipboardExpand all lines: docs/simulation-v2-architecture.md
+4-63Lines changed: 4 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,55 +339,9 @@ Each timeline event:
339
339
340
340
For scenarios with no evolution (Netflix password sharing), the timeline is just the single t=0 event. No extra configuration needed.
341
341
342
-
#### Day Phases (New, Optional)
342
+
#### ~~Day Phases~~ (OMITTED)
343
343
344
-
Templates that structure the agent's timestep experience into life contexts. Optional — if omitted, the engine uses an improved flat prompt (still much better than current).
345
-
346
-
```yaml
347
-
day_phases:
348
-
defaults:
349
-
- phase: morning
350
-
condition: "true"
351
-
template: "I wake up and check my phone."
352
-
slots: [social_media_exposures, aggregate_mood]
353
-
- phase: work
354
-
condition: "employment_status in ['employed full-time', 'employed part-time', 'self-employed']"
355
-
template: "I head to work at my {occupation_sector} job."
condition: "social_media_usage in ['heavy/multiple times daily', 'moderate/daily']"
378
-
template: "Online this week..."
379
-
slots: [social_media_exposures, public_discourse]
380
-
```
381
-
382
-
Phase selection adapts to `timestep_unit`:
383
-
- Daily → morning/work/evening
384
-
- Weekly → this_week_at_work/home/online
385
-
- Monthly → this_month overview
386
-
- Hourly → single phase per timestep
387
-
388
-
Agent attributes determine which phases render. A retiree skips `work`. A student gets `school` instead. Night shift workers get a different `work` time slot. This is evaluated at prompt build time using the condition expressions.
389
-
390
-
If no `day_phases` defined in scenario YAML → engine uses sensible defaults based on timestep_unit.
344
+
**Decision:** Day phase templates are not implemented. The improved flat prompt structure (first-person voice, temporal awareness, named peers, local mood, social feed) provides sufficient narrative context without explicit morning/work/evening phase segmentation. The complexity of condition-based phase selection doesn't justify the marginal improvement over the current prompt design.
391
345
392
346
#### Outcome Tracks (New)
393
347
@@ -492,20 +446,7 @@ class TimelineEvent(BaseModel):
0 commit comments