acp-sdk 0.12.3__py3-none-any.whl → 0.13.0__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.
acp_sdk/models/models.py CHANGED
@@ -118,6 +118,33 @@ class CitationMetadata(BaseModel):
118
118
  description: Optional[str]
119
119
 
120
120
 
121
+ class TrajectoryMetadata(BaseModel):
122
+ """
123
+ Represents trajectory information for an agent's reasoning or tool execution
124
+ steps. This metadata helps track the agent's decision-making process and
125
+ provides transparency into how the agent arrived at its response.
126
+
127
+ TrajectoryMetadata can capture either:
128
+ 1. A reasoning step with a message
129
+ 2. A tool execution with tool name, input, and output
130
+
131
+ This information can be used for debugging, audit trails, and providing
132
+ users with insight into the agent's thought process.
133
+
134
+ Properties:
135
+ - message: A reasoning step or thought in the agent's decision process.
136
+ - tool_name: Name of the tool that was executed.
137
+ - tool_input: Input parameters passed to the tool.
138
+ - tool_output: Output or result returned by the tool.
139
+ """
140
+
141
+ kind: Literal["trajectory"] = "trajectory"
142
+ message: Optional[str] = None
143
+ tool_name: Optional[str] = None
144
+ tool_input: Optional[AnyModel] = None
145
+ tool_output: Optional[AnyModel] = None
146
+
147
+
121
148
  class MessagePart(BaseModel):
122
149
  name: Optional[str] = None
123
150
  content_type: Optional[str] = "text/plain"
@@ -127,7 +154,7 @@ class MessagePart(BaseModel):
127
154
 
128
155
  model_config = ConfigDict(extra="allow")
129
156
 
130
- metadata: Optional[CitationMetadata] = Field(discriminator="kind", default=None)
157
+ metadata: Optional[CitationMetadata | TrajectoryMetadata] = Field(discriminator="kind", default=None)
131
158
 
132
159
  def model_post_init(self, __context: Any) -> None:
133
160
  if self.content is not None and self.content_url is not None:
acp_sdk/server/server.py CHANGED
@@ -331,14 +331,14 @@ class Server:
331
331
  request_data = {
332
332
  "location": f"http://{host}:{self.server.config.port}",
333
333
  }
334
- await async_request_with_retry(lambda client, data=request_data: client.get(f"{url}/api/v1/providers"))
335
334
  try:
335
+ await async_request_with_retry(lambda client, data=request_data: client.get(f"{url}/api/v1/providers"))
336
336
  await async_request_with_retry(
337
337
  lambda client, data=request_data: client.post(
338
338
  f"{url}/api/v1/providers", json=data, params={"auto_remove": True}
339
339
  )
340
340
  )
341
- logger.info("Agent registered to the beeai server.")
341
+ logger.debug("Agent registered to the beeai server.")
342
342
 
343
343
  # check missing env keyes
344
344
  envs_request = await async_request_with_retry(lambda client: client.get(f"{url}/api/v1/variables"))
@@ -361,17 +361,17 @@ class Server:
361
361
  elif env.get("required"):
362
362
  missing_keyes.append(env)
363
363
  if len(missing_keyes):
364
- logger.error(f"Can not run agent, missing required env variables: {missing_keyes}")
364
+ logger.debug(f"Can not run agent, missing required env variables: {missing_keyes}")
365
365
  raise Exception("Missing env variables")
366
366
 
367
367
  except requests.exceptions.ConnectionError as e:
368
- logger.warning(f"Can not reach server, check if running on {url} : {e}")
368
+ logger.debug(f"Can not reach server, check if running on {url} : {e}")
369
369
  except (requests.exceptions.HTTPError, Exception) as e:
370
370
  try:
371
371
  error_message = e.response.json().get("detail")
372
372
  if error_message:
373
- logger.warning(f"Agent can not be registered to beeai server: {error_message}")
373
+ logger.debug(f"Agent can not be registered to beeai server: {error_message}")
374
374
  else:
375
- logger.warning(f"Agent can not be registered to beeai server: {e}")
375
+ logger.debug(f"Agent can not be registered to beeai server: {e}")
376
376
  except Exception:
377
- logger.warning(f"Agent can not be registered to beeai server: {e}")
377
+ logger.debug(f"Agent can not be registered to beeai server: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acp-sdk
3
- Version: 0.12.3
3
+ Version: 0.13.0
4
4
  Summary: Agent Communication Protocol SDK
5
5
  Author: IBM Corp.
6
6
  Maintainer-email: Tomas Pilar <thomas7pilar@gmail.com>
@@ -8,7 +8,7 @@ acp_sdk/client/types.py,sha256=_H6zYt-2OHOOYRtssRnbDIiwmgsl2-KIXc9lb-mJLFA,133
8
8
  acp_sdk/client/utils.py,sha256=2jhJyrPJmVFRoDJh0q_JMqOMlC3IxCh-6HXed-PIZS8,924
9
9
  acp_sdk/models/__init__.py,sha256=_XDSvUwlHeRsqUayAxHusJ5s8Z1jWXV1ZcUKlJakOt4,200
10
10
  acp_sdk/models/errors.py,sha256=rEyaMVvQuBi7fwWe_d0PGGySYsD3FZTluQ-SkC0yhAs,444
11
- acp_sdk/models/models.py,sha256=cSVVmj8tl1CuHUVK_sq7Fcnw8s-XEaOBCWlQTIf_7lo,10889
11
+ acp_sdk/models/models.py,sha256=0Zf4hmaQIAyhwB0qO8g46ijO6FJGSb84c60CazojvxE,11930
12
12
  acp_sdk/models/platform.py,sha256=qgQhBZZNPG9XLlytEZmuv1LTkejbklmlj7YpnpUV_DE,497
13
13
  acp_sdk/models/schemas.py,sha256=Vu3aO-6M0IW71I9thxAiphLGXXMvyZXFMJCdj7euUmc,915
14
14
  acp_sdk/models/types.py,sha256=tH79qqpW3DrPJggZD1KFlLtGE_ZKT6eLtwiR3p3x2QM,145
@@ -20,7 +20,7 @@ acp_sdk/server/errors.py,sha256=GSO8yYIqEeX8Y4Lz86ks35dMTHiQiXuOrLYYx0eXsbI,2110
20
20
  acp_sdk/server/executor.py,sha256=ktM1FCwixtbjsU60VM7PHxwF_Saz15M_9fNXN4mItrU,12607
21
21
  acp_sdk/server/logging.py,sha256=Oc8yZigCsuDnHHPsarRzu0RX3NKaLEgpELM2yovGKDI,411
22
22
  acp_sdk/server/resources.py,sha256=g9C2Xr_SyvAFsV1uHQLEe1H7CgLIjfQZ51Nj3n-w0f4,1174
23
- acp_sdk/server/server.py,sha256=HJOub1ynHiJTQrfKq_bq0r9aqgL1kQeboZH_ArZcuh0,14651
23
+ acp_sdk/server/server.py,sha256=3Nsru3u7FYjrSfRNNuCBHQWZlyk8HvLWnFFkmyODZmA,14648
24
24
  acp_sdk/server/telemetry.py,sha256=lbB2ppijUcqbHUOn0e-15LGcVvT_qrMguq8qBokICac,2016
25
25
  acp_sdk/server/types.py,sha256=gLb5wCkMYhmu2laj_ymK-TPfN9LSjRgKOP1H_893UzA,304
26
26
  acp_sdk/server/utils.py,sha256=O9GUZ8SKqk8P5Vo-N4BD7hXS3XuE7l8wifOhvKMX3ws,2715
@@ -32,6 +32,6 @@ acp_sdk/server/store/store.py,sha256=jGmYy9oiuVjhYYJY8QRo4g2J2Qyt1HLTmq_eHy4aI7c
32
32
  acp_sdk/server/store/utils.py,sha256=JumEOMs1h1uGlnHnUGeguee-srGzT7_Y2NVEYt01QuY,92
33
33
  acp_sdk/shared/__init__.py,sha256=vZuhdQ6lrWVdyYPmIyXpPvs5eMnzemhNek3gfYPA3Bc,138
34
34
  acp_sdk/shared/resources.py,sha256=3oPvevYv2B1YaHyoMH85B7fcHVyhgZDUaDCBVEflTlA,1592
35
- acp_sdk-0.12.3.dist-info/METADATA,sha256=RglEI7Eje0tSG0-insJiq7ZNwpnvrgm18FlRSRIUng8,1713
36
- acp_sdk-0.12.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
37
- acp_sdk-0.12.3.dist-info/RECORD,,
35
+ acp_sdk-0.13.0.dist-info/METADATA,sha256=xEVm9sg7kLKMgLmGOcnOoir8KFQUWovrY8YGq8JUx-I,1713
36
+ acp_sdk-0.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
37
+ acp_sdk-0.13.0.dist-info/RECORD,,