sonzai 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {sonzai-1.2.0 → sonzai-1.2.2}/PKG-INFO +1 -1
  2. {sonzai-1.2.0 → sonzai-1.2.2}/justfile +2 -1
  3. {sonzai-1.2.0 → sonzai-1.2.2}/pyproject.toml +1 -1
  4. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/__init__.py +1 -1
  5. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/_http.py +2 -2
  6. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/agents.py +60 -8
  7. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/memory.py +14 -8
  8. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/types.py +118 -16
  9. {sonzai-1.2.0 → sonzai-1.2.2}/uv.lock +1 -1
  10. {sonzai-1.2.0 → sonzai-1.2.2}/.gitignore +0 -0
  11. {sonzai-1.2.0 → sonzai-1.2.2}/LICENSE +0 -0
  12. {sonzai-1.2.0 → sonzai-1.2.2}/README.md +0 -0
  13. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/_client.py +0 -0
  14. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/_exceptions.py +0 -0
  15. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/providers.py +0 -0
  16. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/py.typed +0 -0
  17. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/__init__.py +0 -0
  18. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/custom_llm.py +0 -0
  19. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/custom_states.py +0 -0
  20. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/eval_runs.py +0 -0
  21. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/eval_templates.py +0 -0
  22. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/generation.py +0 -0
  23. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/instances.py +0 -0
  24. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/inventory.py +0 -0
  25. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/knowledge.py +0 -0
  26. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/notifications.py +0 -0
  27. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/personality.py +0 -0
  28. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/priming.py +0 -0
  29. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/project_config.py +0 -0
  30. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/project_notifications.py +0 -0
  31. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/sessions.py +0 -0
  32. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/voice.py +0 -0
  33. {sonzai-1.2.0 → sonzai-1.2.2}/src/sonzai/resources/webhooks.py +0 -0
  34. {sonzai-1.2.0 → sonzai-1.2.2}/tests/__init__.py +0 -0
  35. {sonzai-1.2.0 → sonzai-1.2.2}/tests/test_client.py +0 -0
  36. {sonzai-1.2.0 → sonzai-1.2.2}/tests/test_types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sonzai
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Python SDK for the Sonzai Mind Layer API
5
5
  Project-URL: Homepage, https://github.com/sonz-ai/sonzai-python
6
6
  Project-URL: Documentation, https://github.com/sonz-ai/sonzai-python#readme
@@ -85,6 +85,7 @@ _bump VERSION:
85
85
  perl -pi -e 's/^version = "[^"]+"/version = "{{VERSION}}"/' pyproject.toml
86
86
  perl -pi -e 's/^__version__ = "[^"]+"/__version__ = "{{VERSION}}"/' src/sonzai/__init__.py
87
87
  perl -pi -e 's{"User-Agent": "sonzai-python/[0-9]+\.[0-9]+\.[0-9]+"}{"User-Agent": "sonzai-python/{{VERSION}}"}g' src/sonzai/_http.py
88
+ uv lock --quiet
88
89
  echo "bumped to {{VERSION}}"
89
90
 
90
91
  _build:
@@ -92,7 +93,7 @@ _build:
92
93
  uv build
93
94
 
94
95
  _commit VERSION:
95
- git add pyproject.toml src/sonzai/__init__.py src/sonzai/_http.py
96
+ git add pyproject.toml uv.lock src/sonzai/__init__.py src/sonzai/_http.py
96
97
  git commit -m "release: v{{VERSION}}"
97
98
 
98
99
  _publish VERSION:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sonzai"
7
- version = "1.2.0"
7
+ version = "1.2.2"
8
8
  description = "Python SDK for the Sonzai Mind Layer API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -160,7 +160,7 @@ from .types import (
160
160
  WebhookRegisterResponse,
161
161
  )
162
162
 
163
- __version__ = "1.2.0"
163
+ __version__ = "1.2.1"
164
164
 
165
165
  __all__ = [
166
166
  # Clients
@@ -82,7 +82,7 @@ class HTTPClient:
82
82
  headers={
83
83
  "Authorization": f"Bearer {api_key}",
84
84
  "Content-Type": "application/json",
85
- "User-Agent": "sonzai-python/1.2.0",
85
+ "User-Agent": "sonzai-python/1.2.1",
86
86
  },
87
87
  timeout=httpx.Timeout(timeout, connect=10.0),
88
88
  follow_redirects=True,
@@ -246,7 +246,7 @@ class AsyncHTTPClient:
246
246
  headers={
247
247
  "Authorization": f"Bearer {api_key}",
248
248
  "Content-Type": "application/json",
249
- "User-Agent": "sonzai-python/1.2.0",
249
+ "User-Agent": "sonzai-python/1.2.1",
250
250
  },
251
251
  timeout=httpx.Timeout(timeout, connect=10.0),
252
252
  follow_redirects=True,
@@ -111,6 +111,8 @@ class Agents:
111
111
  generate_origin_story: bool | None = None,
112
112
  generate_personalized_memories: bool | None = None,
113
113
  initial_goals: list[dict[str, Any]] | None = None,
114
+ generate_avatar: bool | None = None,
115
+ capabilities: dict[str, Any] | None = None,
114
116
  ) -> Agent:
115
117
  """Create a new agent."""
116
118
  body: dict[str, Any] = {"name": name}
@@ -160,6 +162,10 @@ class Agents:
160
162
  body["generate_personalized_memories"] = generate_personalized_memories
161
163
  if initial_goals is not None:
162
164
  body["initial_goals"] = initial_goals
165
+ if generate_avatar is not None:
166
+ body["generate_avatar"] = generate_avatar
167
+ if capabilities is not None:
168
+ body["capabilities"] = capabilities
163
169
 
164
170
  data = self._http.post("/api/v1/agents", json_data=body)
165
171
  return Agent.model_validate(data)
@@ -660,9 +666,10 @@ class Agents:
660
666
  data = self._http.get(f"/api/v1/agents/{agent_id}/relationships", params=params)
661
667
  return RelationshipResponse.model_validate(data)
662
668
 
663
- def get_habits(
669
+ def list_habits(
664
670
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
665
671
  ) -> HabitsResponse:
672
+ """List habits for an agent."""
666
673
  params: dict[str, Any] = {}
667
674
  if user_id:
668
675
  params["user_id"] = user_id
@@ -671,6 +678,12 @@ class Agents:
671
678
  data = self._http.get(f"/api/v1/agents/{agent_id}/habits", params=params)
672
679
  return HabitsResponse.model_validate(data)
673
680
 
681
+ def get_habits(
682
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
683
+ ) -> HabitsResponse:
684
+ """.. deprecated:: Use :meth:`list_habits` instead."""
685
+ return self.list_habits(agent_id, user_id=user_id, instance_id=instance_id)
686
+
674
687
  def create_habit(
675
688
  self,
676
689
  agent_id: str,
@@ -740,9 +753,10 @@ class Agents:
740
753
  f"/api/v1/agents/{agent_id}/habits/{quote(habit_name, safe='')}", params=params
741
754
  )
742
755
 
743
- def get_goals(
756
+ def list_goals(
744
757
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
745
758
  ) -> GoalsResponse:
759
+ """List goals for an agent. Pass user_id to get combined agent-global + per-user goals."""
746
760
  params: dict[str, Any] = {}
747
761
  if user_id:
748
762
  params["user_id"] = user_id
@@ -751,6 +765,12 @@ class Agents:
751
765
  data = self._http.get(f"/api/v1/agents/{agent_id}/goals", params=params)
752
766
  return GoalsResponse.model_validate(data)
753
767
 
768
+ def get_goals(
769
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
770
+ ) -> GoalsResponse:
771
+ """.. deprecated:: Use :meth:`list_goals` instead."""
772
+ return self.list_goals(agent_id, user_id=user_id, instance_id=instance_id)
773
+
754
774
  def create_goal(
755
775
  self,
756
776
  agent_id: str,
@@ -936,10 +956,10 @@ class Agents:
936
956
  """Delete a constellation node."""
937
957
  self._http.delete(f"/api/v1/agents/{agent_id}/constellation/nodes/{node_id}")
938
958
 
939
- def get_breakthroughs(
959
+ def list_breakthroughs(
940
960
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
941
961
  ) -> BreakthroughsResponse:
942
- """Get breakthroughs for an agent."""
962
+ """List breakthroughs for an agent."""
943
963
  params: dict[str, Any] = {}
944
964
  if user_id:
945
965
  params["user_id"] = user_id
@@ -948,6 +968,12 @@ class Agents:
948
968
  data = self._http.get(f"/api/v1/agents/{agent_id}/breakthroughs", params=params)
949
969
  return BreakthroughsResponse.model_validate(data)
950
970
 
971
+ def get_breakthroughs(
972
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
973
+ ) -> BreakthroughsResponse:
974
+ """.. deprecated:: Use :meth:`list_breakthroughs` instead."""
975
+ return self.list_breakthroughs(agent_id, user_id=user_id, instance_id=instance_id)
976
+
951
977
  def get_wakeups(
952
978
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
953
979
  ) -> WakeupsResponse:
@@ -1400,6 +1426,8 @@ class AsyncAgents:
1400
1426
  generate_origin_story: bool | None = None,
1401
1427
  generate_personalized_memories: bool | None = None,
1402
1428
  initial_goals: list[dict[str, Any]] | None = None,
1429
+ generate_avatar: bool | None = None,
1430
+ capabilities: dict[str, Any] | None = None,
1403
1431
  ) -> Agent:
1404
1432
  """Create a new agent."""
1405
1433
  body: dict[str, Any] = {"name": name}
@@ -1449,6 +1477,10 @@ class AsyncAgents:
1449
1477
  body["generate_personalized_memories"] = generate_personalized_memories
1450
1478
  if initial_goals is not None:
1451
1479
  body["initial_goals"] = initial_goals
1480
+ if generate_avatar is not None:
1481
+ body["generate_avatar"] = generate_avatar
1482
+ if capabilities is not None:
1483
+ body["capabilities"] = capabilities
1452
1484
 
1453
1485
  data = await self._http.post("/api/v1/agents", json_data=body)
1454
1486
  return Agent.model_validate(data)
@@ -1932,9 +1964,10 @@ class AsyncAgents:
1932
1964
  data = await self._http.get(f"/api/v1/agents/{agent_id}/relationships", params=params)
1933
1965
  return RelationshipResponse.model_validate(data)
1934
1966
 
1935
- async def get_habits(
1967
+ async def list_habits(
1936
1968
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
1937
1969
  ) -> HabitsResponse:
1970
+ """List habits for an agent."""
1938
1971
  params: dict[str, Any] = {}
1939
1972
  if user_id:
1940
1973
  params["user_id"] = user_id
@@ -1943,6 +1976,12 @@ class AsyncAgents:
1943
1976
  data = await self._http.get(f"/api/v1/agents/{agent_id}/habits", params=params)
1944
1977
  return HabitsResponse.model_validate(data)
1945
1978
 
1979
+ async def get_habits(
1980
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
1981
+ ) -> HabitsResponse:
1982
+ """.. deprecated:: Use :meth:`list_habits` instead."""
1983
+ return await self.list_habits(agent_id, user_id=user_id, instance_id=instance_id)
1984
+
1946
1985
  async def create_habit(
1947
1986
  self,
1948
1987
  agent_id: str,
@@ -2012,9 +2051,10 @@ class AsyncAgents:
2012
2051
  f"/api/v1/agents/{agent_id}/habits/{quote(habit_name, safe='')}", params=params
2013
2052
  )
2014
2053
 
2015
- async def get_goals(
2054
+ async def list_goals(
2016
2055
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
2017
2056
  ) -> GoalsResponse:
2057
+ """List goals for an agent. Pass user_id to get combined agent-global + per-user goals."""
2018
2058
  params: dict[str, Any] = {}
2019
2059
  if user_id:
2020
2060
  params["user_id"] = user_id
@@ -2023,6 +2063,12 @@ class AsyncAgents:
2023
2063
  data = await self._http.get(f"/api/v1/agents/{agent_id}/goals", params=params)
2024
2064
  return GoalsResponse.model_validate(data)
2025
2065
 
2066
+ async def get_goals(
2067
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
2068
+ ) -> GoalsResponse:
2069
+ """.. deprecated:: Use :meth:`list_goals` instead."""
2070
+ return await self.list_goals(agent_id, user_id=user_id, instance_id=instance_id)
2071
+
2026
2072
  async def create_goal(
2027
2073
  self,
2028
2074
  agent_id: str,
@@ -2210,10 +2256,10 @@ class AsyncAgents:
2210
2256
  """Delete a constellation node."""
2211
2257
  await self._http.delete(f"/api/v1/agents/{agent_id}/constellation/nodes/{node_id}")
2212
2258
 
2213
- async def get_breakthroughs(
2259
+ async def list_breakthroughs(
2214
2260
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
2215
2261
  ) -> BreakthroughsResponse:
2216
- """Get breakthroughs for an agent."""
2262
+ """List breakthroughs for an agent."""
2217
2263
  params: dict[str, Any] = {}
2218
2264
  if user_id:
2219
2265
  params["user_id"] = user_id
@@ -2222,6 +2268,12 @@ class AsyncAgents:
2222
2268
  data = await self._http.get(f"/api/v1/agents/{agent_id}/breakthroughs", params=params)
2223
2269
  return BreakthroughsResponse.model_validate(data)
2224
2270
 
2271
+ async def get_breakthroughs(
2272
+ self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
2273
+ ) -> BreakthroughsResponse:
2274
+ """.. deprecated:: Use :meth:`list_breakthroughs` instead."""
2275
+ return await self.list_breakthroughs(agent_id, user_id=user_id, instance_id=instance_id)
2276
+
2225
2277
  async def get_wakeups(
2226
2278
  self, agent_id: str, *, user_id: str | None = None, instance_id: str | None = None
2227
2279
  ) -> WakeupsResponse:
@@ -38,6 +38,7 @@ class Memory:
38
38
  parent_id: str | None = None,
39
39
  include_contents: bool = False,
40
40
  limit: int = 50,
41
+ scope: str | None = None,
41
42
  ) -> MemoryResponse:
42
43
  """Get the memory tree for an agent."""
43
44
  params: dict[str, Any] = {"limit": limit}
@@ -49,6 +50,8 @@ class Memory:
49
50
  params["parent_id"] = parent_id
50
51
  if include_contents:
51
52
  params["include_contents"] = "true"
53
+ if scope is not None:
54
+ params["scope"] = scope
52
55
 
53
56
  data = self._http.get(f"/api/v1/agents/{agent_id}/memory", params=params)
54
57
  return MemoryResponse.model_validate(data)
@@ -122,16 +125,16 @@ class Memory:
122
125
  agent_id: str,
123
126
  *,
124
127
  user_id: str | None = None,
125
- category: str | None = None,
128
+ fact_type: str | None = None,
126
129
  limit: int | None = None,
127
130
  offset: int | None = None,
128
131
  ) -> FactListResponse:
129
- """List atomic facts for an agent, optionally filtered by category."""
132
+ """List atomic facts for an agent, optionally filtered by fact type."""
130
133
  params: dict[str, Any] = {}
131
134
  if user_id:
132
135
  params["user_id"] = user_id
133
- if category:
134
- params["category"] = category
136
+ if fact_type:
137
+ params["fact_type"] = fact_type
135
138
  if limit is not None:
136
139
  params["limit"] = limit
137
140
  if offset is not None:
@@ -272,6 +275,7 @@ class AsyncMemory:
272
275
  parent_id: str | None = None,
273
276
  include_contents: bool = False,
274
277
  limit: int = 50,
278
+ scope: str | None = None,
275
279
  ) -> MemoryResponse:
276
280
  params: dict[str, Any] = {"limit": limit}
277
281
  if user_id:
@@ -282,6 +286,8 @@ class AsyncMemory:
282
286
  params["parent_id"] = parent_id
283
287
  if include_contents:
284
288
  params["include_contents"] = "true"
289
+ if scope is not None:
290
+ params["scope"] = scope
285
291
 
286
292
  data = await self._http.get(
287
293
  f"/api/v1/agents/{agent_id}/memory", params=params
@@ -355,16 +361,16 @@ class AsyncMemory:
355
361
  agent_id: str,
356
362
  *,
357
363
  user_id: str | None = None,
358
- category: str | None = None,
364
+ fact_type: str | None = None,
359
365
  limit: int | None = None,
360
366
  offset: int | None = None,
361
367
  ) -> FactListResponse:
362
- """List atomic facts for an agent, optionally filtered by category."""
368
+ """List atomic facts for an agent, optionally filtered by fact type."""
363
369
  params: dict[str, Any] = {}
364
370
  if user_id:
365
371
  params["user_id"] = user_id
366
- if category:
367
- params["category"] = category
372
+ if fact_type:
373
+ params["fact_type"] = fact_type
368
374
  if limit is not None:
369
375
  params["limit"] = limit
370
376
  if offset is not None:
@@ -46,9 +46,13 @@ class ChatStreamEvent(BaseModel):
46
46
  full_content: str = ""
47
47
  finish_reason: str = ""
48
48
  continuation_token: str = ""
49
+ response_cookie: str = ""
49
50
  message_count: int = 0
50
51
  side_effects: dict[str, Any] | None = None
51
52
  external_tool_calls: list[ExternalToolCall] = Field(default_factory=list)
53
+ enriched_context: dict[str, Any] | None = None
54
+ build_duration_ms: int = 0
55
+ used_fast_path: bool = False
52
56
  error_message: str = ""
53
57
  error_code: str = ""
54
58
  is_token_error: bool = False
@@ -112,10 +116,34 @@ class AtomicFact(BaseModel):
112
116
  atomic_text: str = ""
113
117
  fact_type: str = ""
114
118
  importance: float = 0.0
119
+ confidence: float = 0.0
115
120
  supersedes_id: str = ""
116
121
  session_id: str = ""
122
+ source_id: str = ""
123
+ source_type: str = ""
124
+ sentiment: str = ""
125
+ entities: list[str] = Field(default_factory=list)
126
+ inferred_entities: list[str] = Field(default_factory=list)
127
+ topic_tags: list[str] = Field(default_factory=list)
128
+ agent_framing: str = ""
129
+ character_salience: float = 0.0
130
+ emotional_intensity: float = 0.0
131
+ relationship_relevance: float = 0.0
132
+ retention_strength: float = 0.0
133
+ temporal_relevance: str = ""
134
+ time_sensitive_at: str = ""
135
+ episode_id: str = ""
136
+ event_time: str = ""
137
+ evidence_message_ids: list[str] = Field(default_factory=list)
138
+ polarity_group_id: str = ""
139
+ hit_count: int = 0
140
+ miss_count: int = 0
141
+ mention_count: int = 0
142
+ last_confirmed: str = ""
143
+ last_retrieved_at: str = ""
117
144
  metadata: dict[str, Any] | None = None
118
145
  created_at: str | None = None
146
+ updated_at: str | None = None
119
147
 
120
148
 
121
149
  class MemoryResponse(BaseModel):
@@ -193,6 +221,12 @@ class PersonalityBehaviors(BaseModel):
193
221
  conflict_approach: str = ""
194
222
 
195
223
 
224
+ class TraitPrecision(BaseModel):
225
+ precision: float = 0.0
226
+ observation_count: int = 0
227
+ last_updated_at: str | None = None
228
+
229
+
196
230
  class PersonalityProfile(BaseModel):
197
231
  agent_id: str = ""
198
232
  name: str = ""
@@ -210,6 +244,7 @@ class PersonalityProfile(BaseModel):
210
244
  preferences: PersonalityPreferences = Field(default_factory=PersonalityPreferences)
211
245
  behaviors: PersonalityBehaviors = Field(default_factory=PersonalityBehaviors)
212
246
  emotional_tendencies: dict[str, float] = Field(default_factory=dict)
247
+ trait_precisions: dict[str, TraitPrecision] = Field(default_factory=dict)
213
248
  created_at: str | None = None
214
249
 
215
250
 
@@ -286,23 +321,31 @@ class MoodResponse(BaseModel):
286
321
 
287
322
  # Forward reference — MoodState is defined later in this module.
288
323
  mood: "MoodState" = Field(default_factory=lambda: MoodState())
289
- updated_at: str = ""
290
324
 
291
325
  model_config = {"extra": "allow"}
292
326
 
293
327
 
294
328
  class MoodHistoryEntry(BaseModel):
295
- """A single mood snapshot at a point in time."""
329
+ """A single mood history data point with flat dimensions and deltas."""
296
330
 
297
- # Forward reference — MoodState is defined later in this module.
298
- mood: "MoodState" = Field(default_factory=lambda: MoodState())
331
+ valence: float = 0.0
332
+ arousal: float = 0.0
333
+ tension: float = 0.0
334
+ affiliation: float = 0.0
335
+ label: str = ""
336
+ trigger_type: str = ""
337
+ trigger_reason: str = ""
338
+ delta_valence: float = 0.0
339
+ delta_arousal: float = 0.0
340
+ delta_tension: float = 0.0
341
+ delta_affiliation: float = 0.0
299
342
  timestamp: str = ""
300
343
 
301
344
  model_config = {"extra": "allow"}
302
345
 
303
346
 
304
347
  class MoodHistoryResponse(BaseModel):
305
- history: list[MoodHistoryEntry] = Field(default_factory=list)
348
+ entries: list[MoodHistoryEntry] = Field(default_factory=list)
306
349
 
307
350
  model_config = {"extra": "allow"}
308
351
 
@@ -312,8 +355,10 @@ class RelationshipData(BaseModel):
312
355
 
313
356
  user_id: str = ""
314
357
  love_score: float = 0.0
358
+ chemistry_score: float = 0.0
315
359
  narrative: str = ""
316
360
  last_update: str = ""
361
+ updated_at: str = ""
317
362
 
318
363
  model_config = {"extra": "allow"}
319
364
 
@@ -433,8 +478,18 @@ class InterestData(BaseModel):
433
478
  """A single agent interest with score."""
434
479
 
435
480
  topic: str = ""
436
- score: float = 0.0
481
+ score: float = 0.0 # Deprecated: use confidence instead.
437
482
  category: str = ""
483
+ agent_id: str = ""
484
+ user_id: str = ""
485
+ confidence: float = 0.0
486
+ engagement_level: float = 0.0
487
+ mention_count: int = 0
488
+ research_status: str = ""
489
+ research_findings: str = ""
490
+ last_mentioned_at: str = ""
491
+ created_at: str = ""
492
+ updated_at: str = ""
438
493
 
439
494
  model_config = {"extra": "allow"}
440
495
 
@@ -449,9 +504,17 @@ class DiaryEntry(BaseModel):
449
504
  """A single diary entry."""
450
505
 
451
506
  entry_id: str = ""
507
+ agent_id: str = ""
508
+ user_id: str = ""
509
+ date: str = ""
510
+ content: str = ""
452
511
  title: str = ""
453
- body: str = ""
512
+ body_lines: list[str] = Field(default_factory=list)
513
+ body: str = "" # Deprecated: use content instead.
514
+ mood: str = ""
515
+ topics: list[str] = Field(default_factory=list)
454
516
  tags: list[str] = Field(default_factory=list)
517
+ trigger_type: str = ""
455
518
  created_at: str = ""
456
519
 
457
520
  model_config = {"extra": "allow"}
@@ -515,7 +578,10 @@ class EvalTemplateListResponse(BaseModel):
515
578
 
516
579
  class EvalRun(BaseModel):
517
580
  id: str = ""
581
+ """SDK alias. The spec wire name is run_id."""
582
+ run_id: str = ""
518
583
  tenant_id: str = ""
584
+ project_id: str = ""
519
585
  agent_id: str = ""
520
586
  agent_name: str = ""
521
587
  status: str = ""
@@ -538,6 +604,7 @@ class EvalRun(BaseModel):
538
604
  evaluation_cost_usd: float = 0.0
539
605
  adaptation_template_id: str = ""
540
606
  adaptation_template_snapshot: Any = None
607
+ started_at: str | None = None
541
608
  created_at: str | None = None
542
609
  completed_at: str | None = None
543
610
 
@@ -718,21 +785,25 @@ class WakeupsResponse(BaseModel):
718
785
 
719
786
 
720
787
  class MoodState(BaseModel):
721
- """Snapshot of an agent's four-dimensional mood vector."""
788
+ """Snapshot of an agent's four-dimensional mood vector (valence-arousal-tension-affiliation)."""
722
789
 
723
- happiness: float = 0.0
724
- energy: float = 0.0
725
- calmness: float = 0.0
726
- affection: float = 0.0
790
+ valence: float = 0.0
791
+ arousal: float = 0.0
792
+ tension: float = 0.0
793
+ affiliation: float = 0.0
794
+ label: str = ""
727
795
 
728
796
  model_config = {"extra": "allow"}
729
797
 
730
798
 
731
799
  class MoodAggregateResponse(BaseModel):
732
- average: MoodState = Field(default_factory=MoodState)
733
- min: MoodState = Field(default_factory=MoodState)
734
- max: MoodState = Field(default_factory=MoodState)
735
- data_count: int = 0
800
+ valence: float = 0.0
801
+ arousal: float = 0.0
802
+ tension: float = 0.0
803
+ affiliation: float = 0.0
804
+ label: str = ""
805
+ user_count: int = 0
806
+ days_window: int = 0
736
807
 
737
808
  model_config = {"extra": "allow"}
738
809
 
@@ -1094,6 +1165,7 @@ class ScheduledWakeup(BaseModel):
1094
1165
  event_description: str = ""
1095
1166
  occasion: str = ""
1096
1167
  interest_topic: str = ""
1168
+ research_summary: str = ""
1097
1169
  executed_at: str | None = None
1098
1170
  created_at: str | None = None
1099
1171
 
@@ -1108,13 +1180,20 @@ class ScheduledWakeup(BaseModel):
1108
1180
  class AgentIndex(BaseModel):
1109
1181
  model_config = {"extra": "allow"}
1110
1182
  id: str = ""
1183
+ agent_id: str = ""
1111
1184
  tenant_id: str = ""
1112
1185
  name: str = ""
1113
1186
  bio: str = ""
1114
1187
  gender: str = ""
1115
1188
  avatar_url: str = ""
1116
1189
  status: str = ""
1190
+ is_active: bool = False
1117
1191
  project_id: str = ""
1192
+ instance_count: int = 0
1193
+ last_seen_at: str = ""
1194
+ owner_user_id: str = ""
1195
+ owner_display_name: str = ""
1196
+ owner_email: str = ""
1118
1197
  created_at: str = ""
1119
1198
 
1120
1199
 
@@ -1122,6 +1201,7 @@ class AgentListResponse(BaseModel):
1122
1201
  items: list[AgentIndex] = Field(default_factory=list)
1123
1202
  next_cursor: str | None = None
1124
1203
  has_more: bool = False
1204
+ total_count: int = 0
1125
1205
 
1126
1206
 
1127
1207
  # ---------------------------------------------------------------------------
@@ -1446,12 +1526,30 @@ class CustomToolDefinition(BaseModel):
1446
1526
  parameters: dict[str, Any] | None = None
1447
1527
 
1448
1528
 
1529
+ class PendingCapability(BaseModel):
1530
+ capability: str = ""
1531
+ context: str = ""
1532
+ model_config = {"extra": "allow"}
1533
+
1534
+
1449
1535
  class AgentCapabilities(BaseModel):
1450
1536
  model_config = {"extra": "allow"}
1451
1537
  webSearch: bool = False
1452
1538
  rememberName: bool = False
1453
1539
  imageGeneration: bool = False
1454
1540
  inventory: bool = False
1541
+ knowledgeBase: bool = False
1542
+ knowledgeBaseProjectId: str = ""
1543
+ voiceGeneration: bool = False
1544
+ voiceId: str = ""
1545
+ voiceTier: int = 0
1546
+ voiceUnlockedAt: str | None = None
1547
+ imageUnlockedAt: str | None = None
1548
+ musicGeneration: bool = False
1549
+ musicUnlockedAt: str | None = None
1550
+ videoGeneration: bool = False
1551
+ videoUnlockedAt: str | None = None
1552
+ pendingCapabilities: list[PendingCapability] = Field(default_factory=list)
1455
1553
  customTools: list[CustomToolDefinition] = Field(default_factory=list)
1456
1554
 
1457
1555
 
@@ -1649,6 +1747,9 @@ class KBAnalyticsRule(BaseModel):
1649
1747
  config: Any = None
1650
1748
  enabled: bool = False
1651
1749
  schedule: str = ""
1750
+ last_run_at: str = ""
1751
+ last_run_status: str = ""
1752
+ last_run_duration_ms: int = 0
1652
1753
  created_at: str = ""
1653
1754
  updated_at: str = ""
1654
1755
 
@@ -2991,6 +3092,7 @@ class UpdateCapabilitiesOptions(BaseModel):
2991
3092
  remember_name: bool | None = None
2992
3093
  image_generation: bool | None = None
2993
3094
  inventory: bool | None = None
3095
+ knowledge_base: bool | None = None
2994
3096
 
2995
3097
  model_config = {"extra": "allow"}
2996
3098
 
@@ -450,7 +450,7 @@ wheels = [
450
450
 
451
451
  [[package]]
452
452
  name = "sonzai"
453
- version = "1.1.4"
453
+ version = "1.2.1"
454
454
  source = { editable = "." }
455
455
  dependencies = [
456
456
  { name = "httpx" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes