applied-cli 0.5.59__tar.gz → 0.5.61__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 (27) hide show
  1. {applied_cli-0.5.59 → applied_cli-0.5.61}/PKG-INFO +1 -1
  2. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/__init__.py +1 -1
  3. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/cli.py +6 -4
  4. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/client.py +5 -6
  5. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/tools.py +14 -6
  6. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/PKG-INFO +1 -1
  7. {applied_cli-0.5.59 → applied_cli-0.5.61}/pyproject.toml +1 -1
  8. {applied_cli-0.5.59 → applied_cli-0.5.61}/README.md +0 -0
  9. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/agent_scoped_flows.py +0 -0
  10. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/conversation_lookup.py +0 -0
  11. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/conversations.py +0 -0
  12. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/credentials.py +0 -0
  13. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/flow_helpers.py +0 -0
  14. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli/formatters.py +0 -0
  15. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/SOURCES.txt +0 -0
  16. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/dependency_links.txt +0 -0
  17. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/entry_points.txt +0 -0
  18. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/requires.txt +0 -0
  19. {applied_cli-0.5.59 → applied_cli-0.5.61}/applied_cli.egg-info/top_level.txt +0 -0
  20. {applied_cli-0.5.59 → applied_cli-0.5.61}/setup.cfg +0 -0
  21. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_agent_scoped_flows.py +0 -0
  22. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_audit_tools.py +0 -0
  23. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_benchmark_scenario_tools.py +0 -0
  24. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_cli.py +0 -0
  25. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_client.py +0 -0
  26. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_conversation_tools.py +0 -0
  27. {applied_cli-0.5.59 → applied_cli-0.5.61}/tests/test_flow_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.59
3
+ Version: 0.5.61
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -4,6 +4,6 @@ from applied_cli import tools
4
4
  from applied_cli.client import AppliedClient
5
5
  from applied_cli.formatters import to_csv, to_json
6
6
 
7
- __version__ = "0.5.59"
7
+ __version__ = "0.5.61"
8
8
 
9
9
  __all__ = ["AppliedClient", "tools", "to_csv", "to_json", "__version__"]
@@ -1857,7 +1857,9 @@ def connector_types(
1857
1857
  def agent_update(
1858
1858
  id: str = typer.Argument(..., help="Agent ID"),
1859
1859
  name: str = typer.Option(None, "--name", help="Agent name"),
1860
- prompt: str = typer.Option(None, "--prompt", help="Guidance/guardrails text"),
1860
+ guidance: str = typer.Option(
1861
+ None, "--guidance", help="Guidance instructions for the agent"
1862
+ ),
1861
1863
  model: str = typer.Option(None, "--model", help="Model name"),
1862
1864
  modality: str = typer.Option(
1863
1865
  None, "--modality", help="Modality: Chat, Email, Call, SMS, All"
@@ -1892,7 +1894,7 @@ def agent_update(
1892
1894
  client,
1893
1895
  id,
1894
1896
  name=name,
1895
- prompt=prompt,
1897
+ guidance=guidance,
1896
1898
  model=model,
1897
1899
  modality=modality,
1898
1900
  agent_type=agent_type,
@@ -2075,7 +2077,7 @@ def agent_create(
2075
2077
  "Customer Support", "--type", help="Type: Customer Support, Generic, etc."
2076
2078
  ),
2077
2079
  model: str = typer.Option("GPT-4.1-mini", "--model", help="Model name"),
2078
- prompt: str = typer.Option("", "--prompt", help="Guidance/guardrails text"),
2080
+ guidance: str = typer.Option("", "--guidance", help="Guidance instructions for the agent"),
2079
2081
  escalation_mode: str = typer.Option(
2080
2082
  "default",
2081
2083
  "--escalation-mode",
@@ -2093,7 +2095,7 @@ def agent_create(
2093
2095
  modality=modality,
2094
2096
  agent_type=agent_type,
2095
2097
  model=model,
2096
- prompt=prompt,
2098
+ guidance=guidance,
2097
2099
  escalation_mode=escalation_mode,
2098
2100
  auto_reply=auto_reply,
2099
2101
  )
@@ -481,7 +481,6 @@ class AppliedClient:
481
481
  modality: str,
482
482
  agent_type: str = "Customer Support",
483
483
  model: str = "GPT-4.1-mini",
484
- prompt: str = "",
485
484
  escalation_mode: str = "default",
486
485
  auto_reply: bool = False,
487
486
  ) -> dict:
@@ -494,8 +493,6 @@ class AppliedClient:
494
493
  "escalation_mode": escalation_mode,
495
494
  "auto_reply": auto_reply,
496
495
  }
497
- if prompt:
498
- body["prompt"] = prompt
499
496
  return await self._request("POST", "/v1/agents/", body=body)
500
497
 
501
498
  async def update_agent(
@@ -577,11 +574,13 @@ class AppliedClient:
577
574
  comments: str | None = None,
578
575
  ) -> dict:
579
576
  """Create a topic or intent (property choice)."""
580
- body: dict[str, Any] = {"name": name}
577
+ body: dict[str, Any] = {
578
+ "name": name,
579
+ "field_id": None,
580
+ "color": color or "blue",
581
+ }
581
582
  if parent_id:
582
583
  body["parent_choice_id"] = parent_id
583
- if color:
584
- body["color"] = color
585
584
  if description:
586
585
  body["description"] = description
587
586
  if comments:
@@ -5966,7 +5966,7 @@ async def agent_create(
5966
5966
  modality: str,
5967
5967
  agent_type: str = "Customer Support",
5968
5968
  model: str = "GPT-4.1-mini",
5969
- prompt: str = "",
5969
+ guidance: str = "",
5970
5970
  escalation_mode: str = "default",
5971
5971
  auto_reply: bool = False,
5972
5972
  ) -> str:
@@ -5977,15 +5977,23 @@ async def agent_create(
5977
5977
  modality=modality,
5978
5978
  agent_type=agent_type,
5979
5979
  model=model,
5980
- prompt=prompt,
5981
5980
  escalation_mode=escalation_mode,
5982
5981
  auto_reply=auto_reply,
5983
5982
  )
5984
5983
  except AppliedAPIError as e:
5985
5984
  return _format_error(e)
5986
5985
 
5986
+ agent_id = agent.get("id")
5987
+
5988
+ # The create endpoint doesn't support guardrail, so set it via update
5989
+ if guidance:
5990
+ try:
5991
+ agent = await client.update_agent(agent_id, guardrail=guidance)
5992
+ except AppliedAPIError:
5993
+ pass # Agent was created, guidance just didn't apply
5994
+
5987
5995
  result = "# Created Agent\n"
5988
- result += f"id: {agent.get('id')}\n"
5996
+ result += f"id: {agent_id}\n"
5989
5997
  result += f"name: {agent.get('name')}\n"
5990
5998
  result += f"modality: {agent.get('modality')}\n"
5991
5999
  return result
@@ -5995,7 +6003,7 @@ async def agent_update(
5995
6003
  client: AppliedClient,
5996
6004
  agent_id: str,
5997
6005
  name: str | None = None,
5998
- prompt: str | None = None,
6006
+ guidance: str | None = None,
5999
6007
  model: str | None = None,
6000
6008
  modality: str | None = None,
6001
6009
  agent_type: str | None = None,
@@ -6008,8 +6016,8 @@ async def agent_update(
6008
6016
  updates: dict = {}
6009
6017
  if name is not None:
6010
6018
  updates["name"] = name
6011
- if prompt is not None:
6012
- updates["prompt"] = prompt
6019
+ if guidance is not None:
6020
+ updates["guardrail"] = guidance
6013
6021
  if model is not None:
6014
6022
  updates["model"] = model
6015
6023
  if modality is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.59
3
+ Version: 0.5.61
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "applied-cli"
3
- version = "0.5.59"
3
+ version = "0.5.61"
4
4
  description = "CLI and shared client library for Applied Labs AI support agents"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes