acp-sdk 0.8.0__tar.gz → 0.8.1__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 (48) hide show
  1. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/PKG-INFO +1 -1
  2. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/pyproject.toml +1 -1
  3. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/server.py +17 -21
  4. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/utils.py +2 -2
  5. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/.gitignore +0 -0
  6. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/.python-version +0 -0
  7. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/README.md +0 -0
  8. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/docs/_sidebar.md +0 -0
  9. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/docs/client.md +0 -0
  10. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/docs/index.html +0 -0
  11. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/docs/models.md +0 -0
  12. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/docs/server.md +0 -0
  13. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/pytest.ini +0 -0
  14. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/__init__.py +0 -0
  15. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/client/__init__.py +0 -0
  16. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/client/client.py +0 -0
  17. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/client/types.py +0 -0
  18. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/client/utils.py +0 -0
  19. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/instrumentation.py +0 -0
  20. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/models/__init__.py +0 -0
  21. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/models/errors.py +0 -0
  22. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/models/models.py +0 -0
  23. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/models/schemas.py +0 -0
  24. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/py.typed +0 -0
  25. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/__init__.py +0 -0
  26. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/agent.py +0 -0
  27. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/app.py +0 -0
  28. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/bundle.py +0 -0
  29. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/context.py +0 -0
  30. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/errors.py +0 -0
  31. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/logging.py +0 -0
  32. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/session.py +0 -0
  33. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/telemetry.py +0 -0
  34. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/server/types.py +0 -0
  35. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/src/acp_sdk/version.py +0 -0
  36. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/conftest.py +0 -0
  37. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/__init__.py +0 -0
  38. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/config.py +0 -0
  39. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/fixtures/__init__.py +0 -0
  40. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/fixtures/client.py +0 -0
  41. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/fixtures/server.py +0 -0
  42. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/test_suites/__init__.py +0 -0
  43. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/test_suites/test_discovery.py +0 -0
  44. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/e2e/test_suites/test_runs.py +0 -0
  45. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/unit/client/test_client.py +0 -0
  46. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/unit/client/test_utils.py +0 -0
  47. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/unit/models/__init__.py +0 -0
  48. {acp_sdk-0.8.0 → acp_sdk-0.8.1}/tests/unit/models/test_models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acp-sdk
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Agent Communication Protocol SDK
5
5
  Author: IBM Corp.
6
6
  Maintainer-email: Tomas Pilar <thomas7pilar@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "acp-sdk"
3
- version = "0.8.0"
3
+ version = "0.8.1"
4
4
  description = "Agent Communication Protocol SDK"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
@@ -186,23 +186,19 @@ class Server:
186
186
  return
187
187
 
188
188
  url = os.getenv("PLATFORM_URL", "http://127.0.0.1:8333")
189
- for agent in self._agents:
190
- request_data = {
191
- "location": f"http://{self._server.config.host}:{self._server.config.port}",
192
- "id": agent.name,
193
- }
194
- try:
195
- await async_request_with_retry(
196
- lambda client, data=request_data: client.post(
197
- f"{url}/api/v1/provider/register/unmanaged", json=data
198
- )
199
- )
200
- logger.info("Agent registered to the beeai server.")
201
-
202
- # check missing env keyes
203
- envs_request = await async_request_with_retry(lambda client: client.get(f"{url}/api/v1/env"))
204
- envs = envs_request.get("env")
205
-
189
+ request_data = {
190
+ "location": f"http://{self._server.config.host}:{self._server.config.port}",
191
+ }
192
+ try:
193
+ await async_request_with_retry(
194
+ lambda client, data=request_data: client.post(f"{url}/api/v1/providers/register/unmanaged", json=data)
195
+ )
196
+ logger.info("Agent registered to the beeai server.")
197
+
198
+ # check missing env keyes
199
+ envs_request = await async_request_with_retry(lambda client: client.get(f"{url}/api/v1/variables"))
200
+ envs = envs_request.get("env")
201
+ for agent in self._agents:
206
202
  # register all available envs
207
203
  missing_keyes = []
208
204
  for env in agent.metadata.model_dump().get("env", []):
@@ -216,7 +212,7 @@ class Server:
216
212
  logger.error(f"Can not run agent, missing required env variables: {missing_keyes}")
217
213
  raise Exception("Missing env variables")
218
214
 
219
- except requests.exceptions.ConnectionError as e:
220
- logger.warning(f"Can not reach server, check if running on {url} : {e}")
221
- except (requests.exceptions.HTTPError, Exception) as e:
222
- logger.warning(f"Agent can not be registered to beeai server: {e}")
215
+ except requests.exceptions.ConnectionError as e:
216
+ logger.warning(f"Can not reach server, check if running on {url} : {e}")
217
+ except (requests.exceptions.HTTPError, Exception) as e:
218
+ logger.warning(f"Agent can not be registered to beeai server: {e}")
@@ -35,7 +35,7 @@ async def async_request_with_retry(
35
35
  if e.response.status_code in [429, 500, 502, 503, 504, 509]:
36
36
  retries += 1
37
37
  backoff = backoff_factor * (2 ** (retries - 1))
38
- logger.warning(f"Request retry (try {retries}/{max_retries}), waiting {backoff} seconds...")
38
+ logger.debug(f"Request retry (try {retries}/{max_retries}), waiting {backoff} seconds...")
39
39
  await asyncio.sleep(backoff)
40
40
  else:
41
41
  logger.debug("A non-retryable error was encountered.")
@@ -43,7 +43,7 @@ async def async_request_with_retry(
43
43
  except httpx.RequestError:
44
44
  retries += 1
45
45
  backoff = backoff_factor * (2 ** (retries - 1))
46
- logger.warning(f"Request retry (try {retries}/{max_retries}), waiting {backoff} seconds...")
46
+ logger.debug(f"Request retry (try {retries}/{max_retries}), waiting {backoff} seconds...")
47
47
  await asyncio.sleep(backoff)
48
48
 
49
49
  raise requests.exceptions.ConnectionError(f"Request failed after {max_retries} retries.")
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