relai 0.3.4__py3-none-any.whl → 0.3.6__py3-none-any.whl

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.

Potentially problematic release.


This version of relai might be problematic. Click here for more details.

@@ -160,7 +160,7 @@ class Maestro:
160
160
  return str(agent_outputs)
161
161
 
162
162
  async def _evaluate(
163
- self, awaitables: list[Awaitable], criticos: list[Critico], verbose: bool = False, print_flag: str = ""
163
+ self, awaitables: list[Awaitable], criticos: list[Critico], verbose: bool = True, print_flag: str = ""
164
164
  ) -> tuple[list[dict[str, Any]], list[AgentLog]]:
165
165
  """
166
166
  Run and evaluate the current version of the agent through a set of awaitables.
@@ -169,7 +169,7 @@ class Maestro:
169
169
  awaitables (list[Awaitable]): A list of awaitables, each representing a run of the agent
170
170
  criticos (list[Critico]): A list of Critico objects, each corresponding to an awaitable
171
171
  verbose (bool): If True, additional information will be printed during evaluation.
172
- Defaults to False.
172
+ Defaults to True.
173
173
  print_flag (str): A string to be put next to the printed info when `verbose` is True.
174
174
  Used to distinguish printed info from different types of evaluations.
175
175
 
@@ -227,7 +227,7 @@ class Maestro:
227
227
  self,
228
228
  batch_size: int,
229
229
  sampler: ProportionalSampler,
230
- verbose: bool = False,
230
+ verbose: bool = True,
231
231
  group_id: str | None = None,
232
232
  pbar: tqdm | None = None,
233
233
  ) -> bool:
@@ -244,7 +244,7 @@ class Maestro:
244
244
  `batch_size` of them will be used for preliminary examinations.
245
245
  sampler (ProportionalSampler): Sampler to use for selecting setups.
246
246
  verbose (bool): If True, additional information will be printed during the iterate step.
247
- Defaults to False.
247
+ Defaults to True.
248
248
  group_id (str, optional): An optional group ID to associate all runs together. If not provided,
249
249
  a new UUID will be generated.
250
250
  pbar (tqdm, optional): A progress bar to display the progress of the iteration. Defaults to None.
@@ -376,7 +376,7 @@ class Maestro:
376
376
  batch_size: int = 8,
377
377
  explore_radius: int = 5,
378
378
  explore_factor: float = 0.5,
379
- verbose: bool = False,
379
+ verbose: bool = True,
380
380
  ):
381
381
  """
382
382
  Optimize the configs (parameters) of the agent.
@@ -392,7 +392,7 @@ class Maestro:
392
392
  while a lower value allocates more rollouts to ensure the discovered configs are thoroughly evaluated.
393
393
  Defaults to 0.5.
394
394
  verbose (bool): If True, related information will be printed during the optimization step.
395
- Defaults to False.
395
+ Defaults to True.
396
396
 
397
397
  Raises:
398
398
  ValueError: If the input parameters are not valid.
@@ -414,15 +414,16 @@ class Maestro:
414
414
  num_rounds: int = int(total_rollouts / (iterate_steps * group_size * 4 + select_steps * group_size))
415
415
  total_rollouts = num_rounds * (iterate_steps * group_size * 4 + select_steps * group_size)
416
416
 
417
- print("optimize_config settings:")
417
+ print("\n" + "=" * 30 + "optimize_config settings" + "=" * 30)
418
418
  print(" total_rollouts: ", total_rollouts)
419
419
  print(" (adjusted) batch_size: ", group_size * 2)
420
420
  print(" explore_radius: ", explore_radius)
421
421
  print(" explore_factor: ", explore_factor)
422
422
  print("-" * 60)
423
- print(" iterate_steps: ", iterate_steps)
424
- print(" select_steps: ", select_steps)
425
423
  print(" num_rounds: ", num_rounds)
424
+ print(" steps per round for config discovery: ", iterate_steps)
425
+ print(" steps per round for config evaluation: ", select_steps)
426
+
426
427
  print("=" * 80 + "\n\n")
427
428
 
428
429
  if num_rounds == 0:
@@ -577,7 +578,10 @@ class Maestro:
577
578
  if self.log_to_platform:
578
579
  await sync_to_platform()
579
580
  print(
580
- f"Results of round {round + 1}/{num_rounds} uploaded to RELAI platform, visualization id: {self.config_opt_viz_id}"
581
+ (
582
+ f"Results of round {round + 1}/{num_rounds} uploaded to RELAI platform, "
583
+ f"visualization id: {self.config_opt_viz_id}\n\n\n"
584
+ )
581
585
  )
582
586
 
583
587
  async def optimize_structure(
@@ -585,7 +589,7 @@ class Maestro:
585
589
  total_rollouts: int,
586
590
  description: Optional[str] = None,
587
591
  code_paths: Optional[list[str]] = None,
588
- verbose: bool = False,
592
+ verbose: bool = True,
589
593
  ) -> str:
590
594
  """
591
595
  Propose structural changes (i.e. changes that cannot be achieved by setting parameters alone) to
@@ -599,13 +603,13 @@ class Maestro:
599
603
  code_paths (list[str], optional): A list of paths corresponding to code files containing
600
604
  the implementation of the agent.
601
605
  verbose (bool): If True, additional information will be printed during the optimization.
602
- Defaults to False.
606
+ Defaults to True.
603
607
 
604
608
  Returns:
605
609
  str: Suggestion for structural changes to the agent.
606
610
  """
607
611
 
608
- print("optimize_structure settings:")
612
+ print("\n" + "=" * 30 + "optimize_structure settings" + "=" * 30)
609
613
  print(" total_rollouts: ", total_rollouts)
610
614
  print("=" * 80 + "\n\n")
611
615
 
@@ -674,6 +678,6 @@ class Maestro:
674
678
 
675
679
  if self.log_to_platform:
676
680
  uid = await sync_to_platform()
677
- print(f"Results uploaded to RELAI platform, visualization id: {uid}")
681
+ print(f"Results uploaded to RELAI platform, visualization id: {uid}\n\n\n")
678
682
 
679
683
  return suggestion
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: relai
3
- Version: 0.3.4
3
+ Version: 0.3.6
4
4
  Summary: An SDK for building reliable AI agents
5
5
  Author-email: RELAI <priyatham@relai.ai>, RELAI <wwx@relai.ai>
6
6
  License: Apache License
@@ -236,7 +236,7 @@ Dynamic: license-file
236
236
  </p>
237
237
 
238
238
 
239
- **RELAI** is an SDK for building **reliable AI agents**. It streamlines the hardest parts of agent development—**simulation**, **evaluation**, and **optimization**—so you can iterate quickly with confidence.
239
+ **RELAI** is a platform for building **reliable AI agents**. It streamlines the hardest parts of agent development—**simulation**, **evaluation**, and **optimization**—so you can iterate quickly with confidence.
240
240
 
241
241
  **What you get**
242
242
  - **Agent Simulation** — Create full/partial environments, define LLM personas, mock MCP servers & tools, and generate synthetic data. Optionally condition simulation on real samples to better match production.
@@ -373,7 +373,7 @@ async def main() -> None:
373
373
  batch_size=2, # Base batch size to use for individual optimization steps. Defaults to 4.
374
374
  explore_radius=1, # A positive integer controlling the aggressiveness of exploration during optimization.
375
375
  explore_factor=0.5, # A float between 0 to 1 controlling the exploration-exploitation trade-off.
376
- verbose=False, # If True, additional information will be printed during the optimization step.
376
+ verbose=True, # If True, additional information will be printed during the optimization step.
377
377
  )
378
378
  params.save("saved_config.json") # save optimized params for future usage
379
379
 
@@ -384,7 +384,7 @@ async def main() -> None:
384
384
  await maestro.optimize_structure(
385
385
  total_rollouts=10, # Total number of rollouts to use for optimization.
386
386
  code_paths=["stock-assistant.py"], # A list of paths corresponding to code implementations of the agent.
387
- verbose=False, # If True, additional information will be printed during the optimization step.
387
+ verbose=True, # If True, additional information will be printed during the optimization step.
388
388
  )
389
389
 
390
390
 
@@ -395,17 +395,17 @@ if __name__ == "__main__":
395
395
  ## Simulation
396
396
  Create controlled environments where agents interact and generate traces. Compose LLM personas, mock MCP tools/servers, and synthetic data; optionally condition on real events to align simulation ⇄ production.
397
397
 
398
- ➡️ Learn more: [Simulator](https://docs.relai.ai/simulator.html)
398
+ ➡️ Learn more: [Simulator](https://docs.relai.ai/api/simulator.html)
399
399
 
400
400
  ## Evaluation (Critico)
401
401
  Use code-based or LLM-based evaluators—or RELAI platform evaluators—and convert human reviews into benchmarks you can re-run in Simuation/CI pipeline.
402
402
 
403
- ➡️ Learn more: [Evaluator](https://docs.relai.ai/evaluator.html)
403
+ ➡️ Learn more: [Evaluator](https://docs.relai.ai/api/evaluator.html)
404
404
 
405
405
  ## Optimization (Maestro)
406
406
  Maestro is a holistic agent optimizer. It consumes evaluator/user feedback to improve prompts, configs, and even graph structure when prompt tuning isn’t enough. It can also select the best model, best tool, and best graph based on observed performance.
407
407
 
408
- ➡️ Learn more: [Maestro](https://docs.relai.ai/maestro.html)
408
+ ➡️ Learn more: [Maestro](https://docs.relai.ai/api/maestro.html)
409
409
 
410
410
  ## Links
411
411
 
@@ -13,7 +13,7 @@ relai/critico/critico.py,sha256=J1ek9v2J5WBnHnZknZEVppIrWGczVHxuRX7ghK6mpXM,7616
13
13
  relai/critico/evaluate.py,sha256=Bd-Hlsh2fz2AQ0SINoyqcdpdbWK2t8yrAPHv6UCueFY,31348
14
14
  relai/maestro/__init__.py,sha256=NVXy0v7yghGwGbtsPti4gQGtVA3vMgXdpIpiJUesqME,186
15
15
  relai/maestro/graph.py,sha256=SyY0rHzes3o5bSqlK66CQDUAeyChUhWJQM3FzJCBvfs,1850
16
- relai/maestro/optimizer.py,sha256=96rFxXN5bNDCSgOOPywbWk5AbbnJ6ncLK_Z2uh66sdU,29413
16
+ relai/maestro/optimizer.py,sha256=Fdr_BpXT7wl48u1NXQdSdH791JBLcim2DMiZdlvbwls,29606
17
17
  relai/maestro/params.py,sha256=-0Dtk23ClHJR6Q-PsaKr-GwUylz0-BIIquJF2eA-p-I,8925
18
18
  relai/maestro/utils.py,sha256=WIE3cR8EMDVfAJozEfngh8DfOQdRPZMxxtN-M1cMmxo,7276
19
19
  relai/mocker/__init__.py,sha256=JP2xlSG6Szc0tSEiZzCN6UXdE66uy7AmRn-p358xFVM,102
@@ -21,8 +21,8 @@ relai/mocker/base_mocker.py,sha256=BL4WYtdxWHZdKICfo9idW5i5MrkoxJDElcoeGk-jaJM,9
21
21
  relai/mocker/persona.py,sha256=q2A_lwYrp7H6sKkguMIPl7FQ_6pL4kTaxGBJ1kU2aGA,6678
22
22
  relai/mocker/tool.py,sha256=dHXkVcD9D6HMNlBj13V7GTgW_99a_-3tf9rC6iLDFn8,2229
23
23
  relai/schema/visual.py,sha256=Y6BP5CHxLU0e7sTfNjgKmG2GD0R9a8rvITusxd-d-UE,2443
24
- relai-0.3.4.dist-info/licenses/LICENSE.md,sha256=UNo7WT0mbmbUFjRGzRGaBtybmBPB7xd2ls9tfCkv0oc,10979
25
- relai-0.3.4.dist-info/METADATA,sha256=VYH3VpOpZUXP7K-EQzu_cfhUrLDBOk5bICMTDs72Z54,23531
26
- relai-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- relai-0.3.4.dist-info/top_level.txt,sha256=pRyA93fRj-HsukRNHyS4sHdvLO4TY8VvBMK44KcxRA4,6
28
- relai-0.3.4.dist-info/RECORD,,
24
+ relai-0.3.6.dist-info/licenses/LICENSE.md,sha256=UNo7WT0mbmbUFjRGzRGaBtybmBPB7xd2ls9tfCkv0oc,10979
25
+ relai-0.3.6.dist-info/METADATA,sha256=5kBjNEW1s9Hr9oGi_rrGfkcjBaktRlEAuICcCx4LlC4,23545
26
+ relai-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ relai-0.3.6.dist-info/top_level.txt,sha256=pRyA93fRj-HsukRNHyS4sHdvLO4TY8VvBMK44KcxRA4,6
28
+ relai-0.3.6.dist-info/RECORD,,
File without changes