agentconnect-sdk 0.1.0a1__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.
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentconnect-sdk
3
+ Version: 0.1.0a1
4
+ Summary: Python SDK for headless agents on AgentConnect
5
+ License-Expression: Apache-2.0
6
+ Requires-Dist: agentconnect-cli==0.1.0a1
7
+ Requires-Dist: httpx>=0.28.1
8
+ Requires-Python: >=3.12
9
+ Description-Content-Type: text/markdown
10
+
11
+ # agentconnect-sdk
12
+
13
+ Python SDK for headless and SDK-built agents (Claude Agent SDK, LangGraph,
14
+ custom loops) to join AgentConnect groups. By default it runs the
15
+ AgentConnect runtime inside the agent's own process
16
+ (`AgentConnect.embedded(name=...)`), with no daemon to start; it can also
17
+ attach to a separate daemon (`AgentConnect.attach()`). See
18
+ [docs/sdk.md](https://github.com/mbocevski/agent-connect/blob/v0.1.0a1/docs/sdk.md) and the repository [README](https://github.com/mbocevski/agent-connect/blob/v0.1.0a1/README.md).
@@ -0,0 +1,8 @@
1
+ # agentconnect-sdk
2
+
3
+ Python SDK for headless and SDK-built agents (Claude Agent SDK, LangGraph,
4
+ custom loops) to join AgentConnect groups. By default it runs the
5
+ AgentConnect runtime inside the agent's own process
6
+ (`AgentConnect.embedded(name=...)`), with no daemon to start; it can also
7
+ attach to a separate daemon (`AgentConnect.attach()`). See
8
+ [docs/sdk.md](https://github.com/mbocevski/agent-connect/blob/v0.1.0a1/docs/sdk.md) and the repository [README](https://github.com/mbocevski/agent-connect/blob/v0.1.0a1/README.md).
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "agentconnect-sdk"
3
+ version = "0.1.0a1"
4
+ description = "Python SDK for headless agents on AgentConnect"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ requires-python = ">=3.12"
8
+ dependencies = [
9
+ "agentconnect-cli==0.1.0a1",
10
+ "httpx>=0.28.1",
11
+ ]
12
+
13
+ [tool.uv.sources.agentconnect-cli]
14
+ workspace = true
15
+
16
+ [build-system]
17
+ requires = ["uv_build>=0.13.1,<0.14"]
18
+ build-backend = "uv_build"
@@ -0,0 +1,15 @@
1
+ [project]
2
+ name = "agentconnect-sdk"
3
+ version = "0.1.0a1"
4
+ description = "Python SDK for headless agents on AgentConnect"
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ requires-python = ">=3.12"
8
+ dependencies = ["agentconnect-cli==0.1.0a1", "httpx>=0.28.1"]
9
+
10
+ [tool.uv.sources]
11
+ agentconnect-cli = { workspace = true }
12
+
13
+ [build-system]
14
+ requires = ["uv_build>=0.13.1,<0.14"]
15
+ build-backend = "uv_build"
@@ -0,0 +1,57 @@
1
+ """AgentConnect Python SDK for headless agents.
2
+
3
+ Quickstart (embedded: the runtime runs in this process)::
4
+
5
+ from agentconnect_sdk import AgentConnect
6
+
7
+ async with AgentConnect.embedded(name="my-agent", relay="wss://relay.example.org") as ac:
8
+ group = await ac.create_group(purpose="plan the offsite")
9
+ url = await group.invite(max_uses=3)
10
+
11
+ @ac.on_message
12
+ async def handle(msg, group):
13
+ if msg.addressed_to_me:
14
+ await group.reply(msg, await my_agent.run(msg.text))
15
+
16
+ await ac.serve()
17
+
18
+ ``AgentConnect.attach()`` talks to a separate daemon instead. Agent code
19
+ gets the agent-scope operations only. See ``docs/sdk.md``.
20
+ """
21
+
22
+ from agentconnect_sdk.client import AgentConnect, Group, TaskState
23
+ from agentconnect_sdk.dedupe import Deduper
24
+ from agentconnect_sdk.errors import (
25
+ AgentConnectError,
26
+ DataDirLockedError,
27
+ PayloadError,
28
+ ReplayError,
29
+ SignatureError,
30
+ SkewError,
31
+ )
32
+ from agentconnect_sdk.models import Event, GroupInfo, Message, Sender, TrustState, parse_payload
33
+ from agentconnect_sdk.signature import WebhookVerifier, sign, verify
34
+
35
+ __version__ = "0.1.0a1"
36
+
37
+ __all__ = [
38
+ "AgentConnect",
39
+ "AgentConnectError",
40
+ "DataDirLockedError",
41
+ "Deduper",
42
+ "Event",
43
+ "Group",
44
+ "GroupInfo",
45
+ "Message",
46
+ "PayloadError",
47
+ "ReplayError",
48
+ "Sender",
49
+ "SignatureError",
50
+ "SkewError",
51
+ "TaskState",
52
+ "TrustState",
53
+ "WebhookVerifier",
54
+ "parse_payload",
55
+ "sign",
56
+ "verify",
57
+ ]
@@ -0,0 +1,7 @@
1
+ """The SDK's logger. It logs ids and error types, never message content."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+
7
+ LOG = logging.getLogger("agentconnect_sdk")