applied-cli 0.5.58__tar.gz → 0.5.60__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.
- {applied_cli-0.5.58 → applied_cli-0.5.60}/PKG-INFO +1 -1
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/__init__.py +1 -1
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/cli.py +15 -4
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/client.py +0 -3
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/tools.py +17 -6
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/PKG-INFO +1 -1
- {applied_cli-0.5.58 → applied_cli-0.5.60}/pyproject.toml +1 -1
- {applied_cli-0.5.58 → applied_cli-0.5.60}/README.md +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/agent_scoped_flows.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/conversation_lookup.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/conversations.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/credentials.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/flow_helpers.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli/formatters.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/SOURCES.txt +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/dependency_links.txt +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/entry_points.txt +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/requires.txt +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/applied_cli.egg-info/top_level.txt +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/setup.cfg +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_agent_scoped_flows.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_audit_tools.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_benchmark_scenario_tools.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_cli.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_client.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_conversation_tools.py +0 -0
- {applied_cli-0.5.58 → applied_cli-0.5.60}/tests/test_flow_tools.py +0 -0
|
@@ -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
|
-
|
|
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"
|
|
@@ -1871,6 +1873,11 @@ def agent_update(
|
|
|
1871
1873
|
help="Escalation mode: default, email, sms, email_non_opening_hours, ticketing_integration",
|
|
1872
1874
|
),
|
|
1873
1875
|
auto_reply: bool = typer.Option(None, "--auto-reply", help="Enable auto-reply"),
|
|
1876
|
+
contact_context: str = typer.Option(
|
|
1877
|
+
None,
|
|
1878
|
+
"--contact-context",
|
|
1879
|
+
help="JSON array of contact context fields (e.g. '[\"name\", \"email\", \"order_id\"]')",
|
|
1880
|
+
),
|
|
1874
1881
|
metadata: str = typer.Option(
|
|
1875
1882
|
None, "--metadata", help="JSON metadata to set on the agent"
|
|
1876
1883
|
),
|
|
@@ -1878,18 +1885,22 @@ def agent_update(
|
|
|
1878
1885
|
) -> None:
|
|
1879
1886
|
"""Update an agent."""
|
|
1880
1887
|
metadata_dict = _parse_json_option(metadata, option_name="--metadata")
|
|
1888
|
+
contact_context_list = _parse_json_array_option(
|
|
1889
|
+
contact_context, option_name="--contact-context"
|
|
1890
|
+
)
|
|
1881
1891
|
client = get_client(shop_id=shop_id)
|
|
1882
1892
|
result = asyncio.run(
|
|
1883
1893
|
tools.agent_update(
|
|
1884
1894
|
client,
|
|
1885
1895
|
id,
|
|
1886
1896
|
name=name,
|
|
1887
|
-
|
|
1897
|
+
guidance=guidance,
|
|
1888
1898
|
model=model,
|
|
1889
1899
|
modality=modality,
|
|
1890
1900
|
agent_type=agent_type,
|
|
1891
1901
|
escalation_mode=escalation_mode,
|
|
1892
1902
|
auto_reply=auto_reply,
|
|
1903
|
+
contact_context=contact_context_list,
|
|
1893
1904
|
metadata=metadata_dict,
|
|
1894
1905
|
)
|
|
1895
1906
|
)
|
|
@@ -2066,7 +2077,7 @@ def agent_create(
|
|
|
2066
2077
|
"Customer Support", "--type", help="Type: Customer Support, Generic, etc."
|
|
2067
2078
|
),
|
|
2068
2079
|
model: str = typer.Option("GPT-4.1-mini", "--model", help="Model name"),
|
|
2069
|
-
|
|
2080
|
+
guidance: str = typer.Option("", "--guidance", help="Guidance instructions for the agent"),
|
|
2070
2081
|
escalation_mode: str = typer.Option(
|
|
2071
2082
|
"default",
|
|
2072
2083
|
"--escalation-mode",
|
|
@@ -2084,7 +2095,7 @@ def agent_create(
|
|
|
2084
2095
|
modality=modality,
|
|
2085
2096
|
agent_type=agent_type,
|
|
2086
2097
|
model=model,
|
|
2087
|
-
|
|
2098
|
+
guidance=guidance,
|
|
2088
2099
|
escalation_mode=escalation_mode,
|
|
2089
2100
|
auto_reply=auto_reply,
|
|
2090
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(
|
|
@@ -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
|
-
|
|
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: {
|
|
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,20 +6003,21 @@ async def agent_update(
|
|
|
5995
6003
|
client: AppliedClient,
|
|
5996
6004
|
agent_id: str,
|
|
5997
6005
|
name: str | None = None,
|
|
5998
|
-
|
|
6006
|
+
guidance: str | None = None,
|
|
5999
6007
|
model: str | None = None,
|
|
6000
6008
|
modality: str | None = None,
|
|
6001
6009
|
agent_type: str | None = None,
|
|
6002
6010
|
escalation_mode: str | None = None,
|
|
6003
6011
|
auto_reply: bool | None = None,
|
|
6012
|
+
contact_context: list | None = None,
|
|
6004
6013
|
metadata: dict | None = None,
|
|
6005
6014
|
) -> str:
|
|
6006
6015
|
"""Update an agent's properties."""
|
|
6007
6016
|
updates: dict = {}
|
|
6008
6017
|
if name is not None:
|
|
6009
6018
|
updates["name"] = name
|
|
6010
|
-
if
|
|
6011
|
-
updates["
|
|
6019
|
+
if guidance is not None:
|
|
6020
|
+
updates["guardrail"] = guidance
|
|
6012
6021
|
if model is not None:
|
|
6013
6022
|
updates["model"] = model
|
|
6014
6023
|
if modality is not None:
|
|
@@ -6019,6 +6028,8 @@ async def agent_update(
|
|
|
6019
6028
|
updates["escalation_mode"] = escalation_mode
|
|
6020
6029
|
if auto_reply is not None:
|
|
6021
6030
|
updates["auto_reply"] = auto_reply
|
|
6031
|
+
if contact_context is not None:
|
|
6032
|
+
updates["contact_context"] = contact_context
|
|
6022
6033
|
if metadata is not None:
|
|
6023
6034
|
updates["metadata"] = metadata
|
|
6024
6035
|
|
|
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
|
|
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
|