Description
Add a new standalone example on top of libp2p.request_response that demonstrates a simple agent workflow using two one-shot request/response exchanges:
capability_query
store_intent
The example should be Filecoin-aligned in naming and semantics, but fully local to py-libp2p. It should not call Synapse SDK, Filecoin services, or any external providers.
Motivation
The new libp2p.request_response helper currently has a generic JSON example, but there is no higher-level example showing how to build an agent-style control plane on top of it.
This example should demonstrate:
- capability discovery
- structured task submission
- validation and rejection paths
- partial-success results
- deterministic, inspectable responses over real libp2p streams
Requirements
- add an example-local protocol module for message validation and deterministic simulation
- add a runnable demo that:
- starts a listener without
-d
- connects and sends
capability_query then store_intent with -d
- use a single protocol ID with a
"type" discriminator
- simulate Filecoin-aligned storage semantics:
- size validation
- metadata limits
- root vs session-key style authorization
- provider catalog with one unhealthy provider
complete, partial, and rejected result states
- register a console script for the example
- add docs page + examples index entry
- add focused tests for validation logic and host-to-host integration
Open questions
No response
Are you planning to do it yourself in a pull request ?
Yes
Description
Add a new standalone example on top of
libp2p.request_responsethat demonstrates a simple agent workflow using two one-shot request/response exchanges:capability_querystore_intentThe example should be Filecoin-aligned in naming and semantics, but fully local to py-libp2p. It should not call Synapse SDK, Filecoin services, or any external providers.
Motivation
The new
libp2p.request_responsehelper currently has a generic JSON example, but there is no higher-level example showing how to build an agent-style control plane on top of it.This example should demonstrate:
Requirements
-dcapability_querythenstore_intentwith-d"type"discriminatorcomplete,partial, andrejectedresult statesOpen questions
No response
Are you planning to do it yourself in a pull request ?
Yes