asap-protocol 0.3.0__py3-none-any.whl → 0.5.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.
- asap/__init__.py +1 -1
- asap/errors.py +167 -0
- asap/examples/README.md +3 -0
- asap/examples/run_demo.py +9 -2
- asap/models/__init__.py +4 -0
- asap/models/constants.py +73 -0
- asap/models/entities.py +38 -2
- asap/models/envelope.py +7 -1
- asap/transport/__init__.py +3 -0
- asap/transport/circuit_breaker.py +193 -0
- asap/transport/client.py +588 -53
- asap/transport/middleware.py +6 -5
- asap/transport/server.py +80 -3
- asap/transport/validators.py +324 -0
- asap/utils/__init__.py +7 -0
- asap/utils/sanitization.py +139 -0
- {asap_protocol-0.3.0.dist-info → asap_protocol-0.5.0.dist-info}/METADATA +22 -5
- {asap_protocol-0.3.0.dist-info → asap_protocol-0.5.0.dist-info}/RECORD +21 -17
- {asap_protocol-0.3.0.dist-info → asap_protocol-0.5.0.dist-info}/WHEEL +0 -0
- {asap_protocol-0.3.0.dist-info → asap_protocol-0.5.0.dist-info}/entry_points.txt +0 -0
- {asap_protocol-0.3.0.dist-info → asap_protocol-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: asap-protocol
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Async Simple Agent Protocol - A streamlined protocol for agent-to-agent communication
|
|
5
5
|
Project-URL: Homepage, https://github.com/adriannoes/asap-protocol
|
|
6
6
|
Project-URL: Documentation, https://adriannoes.github.io/asap-protocol
|
|
@@ -49,9 +49,9 @@ Description-Content-Type: text/markdown
|
|
|
49
49
|
|
|
50
50
|
> A streamlined, scalable, asynchronous protocol for agent-to-agent communication and task coordination. Built as a simpler, more powerful alternative to A2A with native MCP integration and stateful orchestration.
|
|
51
51
|
|
|
52
|
-
**Quick Info**: `v0.
|
|
52
|
+
**Quick Info**: `v0.5.0` | `Apache 2.0` | `Python 3.13+` | [Documentation](docs/index.md) | [PyPI](https://pypi.org/project/asap-protocol/) | [Changelog](CHANGELOG.md)
|
|
53
53
|
|
|
54
|
-
⚠️ **Alpha Release**: ASAP Protocol is currently in **alpha** (v0.
|
|
54
|
+
⚠️ **Alpha Release**: ASAP Protocol is currently in **alpha** (v0.5.0). We're actively developing and improving the protocol based on real-world usage. Your feedback, contributions, and suggestions are essential to help us evolve and make ASAP better for the entire community. See our [Contributing](#contributing) section to get involved!
|
|
55
55
|
|
|
56
56
|
## Why ASAP?
|
|
57
57
|
|
|
@@ -62,6 +62,18 @@ Building multi-agent systems today suffers from three core technical challenges
|
|
|
62
62
|
|
|
63
63
|
**ASAP** provides a production-ready communication layer that simplifies these complexities. It introduces a standardized, stateful orchestration framework that ensures your agents can coordinate reliably across distributed environments.
|
|
64
64
|
|
|
65
|
+
### Security-First Design
|
|
66
|
+
|
|
67
|
+
v0.5.0 introduces comprehensive security hardening:
|
|
68
|
+
- **Authentication**: Bearer token authentication with configurable token validators
|
|
69
|
+
- **Replay Attack Prevention**: Timestamp validation (5-minute window) and optional nonce tracking
|
|
70
|
+
- **DoS Protection**: Built-in rate limiting (100 req/min), request size limits (10MB), and thread pool bounds
|
|
71
|
+
- **HTTPS Enforcement**: Client-side HTTPS validation in production mode
|
|
72
|
+
- **Secure Logging**: Automatic sanitization of sensitive data (tokens, credentials, nonces) in logs
|
|
73
|
+
- **Input Validation**: Strict schema validation with Pydantic v2 for all incoming requests
|
|
74
|
+
|
|
75
|
+
All security features are **opt-in** to maintain backward compatibility with existing deployments.
|
|
76
|
+
|
|
65
77
|
### Key Features
|
|
66
78
|
|
|
67
79
|
- **Stateful Orchestration**: Native task state machine with built-in snapshotting for durable, resumable agent workflows.
|
|
@@ -70,6 +82,7 @@ Building multi-agent systems today suffers from three core technical challenges
|
|
|
70
82
|
- **Observable Chains**: First-class support for `trace_id` and `correlation_id` to debug complex multi-agent delegation.
|
|
71
83
|
- **MCP Integration**: Uses the Model Context Protocol (MCP) as a tool-execution substrate, wrapped in a high-level coordination envelope.
|
|
72
84
|
- **Async-Native**: Engineered from the ground up for high-concurrency environments using `asyncio` and `httpx`. Supports both sync and async handlers with automatic event loop management.
|
|
85
|
+
- **Security-Hardened (v0.5.0)**: Authentication (Bearer tokens), replay attack prevention (timestamp + nonce validation), HTTPS enforcement, secure logging, and comprehensive input validation. All security features are opt-in for backward compatibility.
|
|
73
86
|
- **DoS Protection**: Built-in rate limiting (100 req/min), request size limits (10MB), and thread pool bounds to prevent resource exhaustion attacks.
|
|
74
87
|
|
|
75
88
|
💡 **Performance Note**: Pure Python codebase leveraging Rust-accelerated dependencies (`pydantic-core`, `orjson`, `python-ulid`) for native-level performance without build complexity.
|
|
@@ -110,13 +123,15 @@ from asap.transport.server import create_app
|
|
|
110
123
|
manifest = Manifest(
|
|
111
124
|
id="urn:asap:agent:echo-agent",
|
|
112
125
|
name="Echo Agent",
|
|
113
|
-
version="0.
|
|
126
|
+
version="0.5.0",
|
|
114
127
|
description="Echoes task input as output",
|
|
115
128
|
capabilities=Capability(
|
|
116
129
|
asap_version="0.1",
|
|
117
130
|
skills=[Skill(id="echo", description="Echo back the input")],
|
|
118
131
|
state_persistence=False,
|
|
119
132
|
),
|
|
133
|
+
# Development: HTTP localhost is allowed
|
|
134
|
+
# Production: Always use HTTPS (e.g., "https://api.example.com/asap")
|
|
120
135
|
endpoints=Endpoint(asap="http://127.0.0.1:8001/asap"),
|
|
121
136
|
)
|
|
122
137
|
|
|
@@ -147,6 +162,8 @@ async def main():
|
|
|
147
162
|
payload_type="task.request",
|
|
148
163
|
payload=request.model_dump(),
|
|
149
164
|
)
|
|
165
|
+
# Development: HTTP localhost is allowed (with warning)
|
|
166
|
+
# Production: Always use HTTPS (e.g., "https://api.example.com")
|
|
150
167
|
async with ASAPClient("http://127.0.0.1:8001") as client:
|
|
151
168
|
response = await client.send(envelope)
|
|
152
169
|
print(response.payload)
|
|
@@ -187,7 +204,7 @@ ASAP is ideal for:
|
|
|
187
204
|
- **MCP integration**: Agents that need to execute tools via Model Context Protocol
|
|
188
205
|
- **Production systems**: High-performance, type-safe agent communication
|
|
189
206
|
|
|
190
|
-
If you're building simple point-to-point agent communication, a basic HTTP API might suffice. ASAP shines when you need orchestration, state management
|
|
207
|
+
If you're building simple point-to-point agent communication, a basic HTTP API might suffice. ASAP shines when you need orchestration, state management and multi-agent coordination.
|
|
191
208
|
|
|
192
209
|
## Advanced Topics
|
|
193
210
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
asap/__init__.py,sha256=
|
|
1
|
+
asap/__init__.py,sha256=Mhc6RFW5rBP7ZrgHSJ4Lsha1ajo1WT7VWtEdGe_f9ng,169
|
|
2
2
|
asap/cli.py,sha256=JzMA3t2Gn94kunkn5bgAkl6ZgzgwGtL5QFcKLYqWZYA,6621
|
|
3
|
-
asap/errors.py,sha256=
|
|
3
|
+
asap/errors.py,sha256=pc4QQfseteEujGp3bDH-IiPpr-xh1N6DvDL5faiFY9M,11917
|
|
4
4
|
asap/schemas.py,sha256=c9MttEoI4mgXFHDFzphSRAJhw7cpy2rcnXH31jlo1sQ,6135
|
|
5
|
-
asap/examples/README.md,sha256=
|
|
5
|
+
asap/examples/README.md,sha256=0XSkQaP5mRYZPtzEf1gYu6HbZw84vrd77pYtx7doHHM,1002
|
|
6
6
|
asap/examples/__init__.py,sha256=LaEkmPQ4tpYrkLFjBE_aodjW3_XUcKWoFLGVFD5kuvo,56
|
|
7
7
|
asap/examples/coordinator.py,sha256=C5Ugi47PGwtbRao8eD29v2l_9tww2_sL-kXK5jQaWGw,5370
|
|
8
8
|
asap/examples/echo_agent.py,sha256=cmNjEx28jCNcU4waYFOZ8ZcHxth1znMOhmaGXIquJzA,2947
|
|
9
|
-
asap/examples/run_demo.py,sha256=
|
|
10
|
-
asap/models/__init__.py,sha256=
|
|
9
|
+
asap/examples/run_demo.py,sha256=GLbtcpggAZfoDSFXpXJf8kdn9jg4HVblg4h3_5u6jrM,4056
|
|
10
|
+
asap/models/__init__.py,sha256=c9TDscYv-_2U8OlEt7G-Il02flISgGbckZu4RtDwgDk,2643
|
|
11
11
|
asap/models/base.py,sha256=PvLkFinOzfU6DDJ4pXMku7PK_2Xsaprh055mJKbdPUA,2008
|
|
12
|
-
asap/models/constants.py,sha256=
|
|
13
|
-
asap/models/entities.py,sha256=
|
|
12
|
+
asap/models/constants.py,sha256=r-KekW8tmCpsYuUN9Fay-gGc-1T7T4S2pn8-MwO4qAI,3155
|
|
13
|
+
asap/models/entities.py,sha256=Ah2k-aXO9mDLcMUjJ88ZKhpcKiRr4KzQ4HWvMiCuBhY,17938
|
|
14
14
|
asap/models/enums.py,sha256=q8tnW10AT94hxDFoH1Psg1a1x4tzs47x12N7RTGLNRQ,1644
|
|
15
|
-
asap/models/envelope.py,sha256=
|
|
15
|
+
asap/models/envelope.py,sha256=3EZ7QGi9lVeNN4FAmChbRBgPIiIxQjB7jDkzN1oeXiM,4022
|
|
16
16
|
asap/models/ids.py,sha256=ttTebUohYD_7Gmyg1GRi1jnRtnLcAL2SiXuOi4vGtb0,1425
|
|
17
17
|
asap/models/parts.py,sha256=XiNvlEEqqb0W8cvvvLHYfzYzLULg7oFStMxm817-IZo,6939
|
|
18
18
|
asap/models/payloads.py,sha256=l0taURdWy09BASSJkiCrR6VixbqzD3HrFdVrFad7YqQ,14867
|
|
@@ -23,15 +23,19 @@ asap/observability/metrics.py,sha256=5yvXfvQ8FpigJ6pJ3vTQetSCQhPnoUCKywWigrxgnCI
|
|
|
23
23
|
asap/state/__init__.py,sha256=bV1oO86TReF48C5IaglNr8WHczzAWTpw3n7SyDw04nk,565
|
|
24
24
|
asap/state/machine.py,sha256=1Obl1BcwwU-Xz20MX-layuPh1BVzcI1Kiowl_CueuU4,2795
|
|
25
25
|
asap/state/snapshot.py,sha256=wPc2pnQD_EdPecEndbjIC9mXJep-LCJwtdazGMJSUJc,8654
|
|
26
|
-
asap/transport/__init__.py,sha256=
|
|
27
|
-
asap/transport/
|
|
26
|
+
asap/transport/__init__.py,sha256=VvtPh5Zr1R3-Y5DSj9NWUyvAdvfC_YRCw_mX1FDMQsg,2619
|
|
27
|
+
asap/transport/circuit_breaker.py,sha256=jnPYxaLJ1_ImbAeKa6RZigM2aBY1sx4Y3qzChn9lhiw,6305
|
|
28
|
+
asap/transport/client.py,sha256=wm_V-I4BUEaMr5ujRlD0l0QmjD2Z8ktQy502zS_79wY,42380
|
|
28
29
|
asap/transport/executors.py,sha256=0UH2cd5fVPGPGtnzmnFq1W8IF9BLjp5grCz3Oucj7CQ,5737
|
|
29
30
|
asap/transport/handlers.py,sha256=BGnAF-RDiZYjdh0V-AqmvqrAkCh_QfI0yO-x1wzxOGQ,15924
|
|
30
31
|
asap/transport/jsonrpc.py,sha256=Cnh6ahoXr4Dkmt2KqoXESDKKs_9MwfsgIjn-TDjpkEQ,5800
|
|
31
|
-
asap/transport/middleware.py,sha256=
|
|
32
|
-
asap/transport/server.py,sha256=
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
asap_protocol-0.
|
|
37
|
-
asap_protocol-0.
|
|
32
|
+
asap/transport/middleware.py,sha256=4WFg2_7NUJcT01VdOEa2UpkyFEcl_ZYcLDBuoYBfTaQ,23372
|
|
33
|
+
asap/transport/server.py,sha256=r0DmPoPyw6drR3W-FE39eWWGSbL42PltogZ3JC3dq3E,45878
|
|
34
|
+
asap/transport/validators.py,sha256=CmaRuBZFB1hzBDxDez3WFaR2Rkqotz3KtcoWzSrdGJM,11041
|
|
35
|
+
asap/utils/__init__.py,sha256=aWEjhGOgrzvBjvMVW1Dg5yJH_xixaOqrsilNdU7zz4A,206
|
|
36
|
+
asap/utils/sanitization.py,sha256=kIkuEuYXhTOxGNyychlBg4ffz4ylq_Tj_-WTi1mf-bg,4305
|
|
37
|
+
asap_protocol-0.5.0.dist-info/METADATA,sha256=LloHREQmhwaBilILZQacR514Ptv7HcRslu-LZfGkoDg,11197
|
|
38
|
+
asap_protocol-0.5.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
39
|
+
asap_protocol-0.5.0.dist-info/entry_points.txt,sha256=H_u_JamRG5mGQTXwnCFljBFep6lZPuln9NPLfgq1naM,39
|
|
40
|
+
asap_protocol-0.5.0.dist-info/licenses/LICENSE,sha256=JmjzvAfg8BUP_0y_hu4SQSUgnSniWe2eBS7x2WPTo2A,10771
|
|
41
|
+
asap_protocol-0.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|