@sw4p/kit is the agent integration project for SW4P. It connects agent-facing tools and payment messages to the settlement engine.
The kit is a client layer. An agent describes the operation through an integration; SW4P handles the route and settlement lifecycle behind it. The application’s authority, funding, and execution rules determine what the agent may request.
Choose an Integration
The project is organised around several kinds of interaction:
These are different ways to express and follow an economic action. The appropriate integration depends on the client, the payment workflow, and the settlement service it connects to.
Tools and Responsibilities
The repository describes tool families for:- Balances and planning: balance information, portfolio information, and proposed changes.
- Quotes: estimated route and fee information before execution.
- Settlement requests: submission of a transfer or settlement instruction.
- Progress: status and task records for following the operation.
- Authorised purchases: cart proposals and execution under the associated authority.
Local and Remote Connections
The project describes both a local process connection and an HTTP transport. In a local setup, the agent client communicates with a kit process. In an HTTP setup, requests go to a service running the kit. The choice also affects state management. Use the selected version’s transport documentation for supported task behaviour, authentication, and connection settings.Working from Source
Start with the kit repository and select the source version you intend to use. Its README describes setup, configuration, and examples; package metadata defines the build scripts and exported modules. Before connecting an agent:- Choose the local or HTTP transport and the intended environment.
- Configure the required service credentials and participant addresses through the supported configuration path.
- Define what the agent may inspect, propose, and execute, including any spending limits and approvals.
- Follow the selected version’s setup and checks before relying on the connection.
Following an Operation
A client needs to retain the relationship between the original instruction, its authorisation, the settlement identifier, and the result. If execution is interrupted, the integration should use the operation’s recorded state to determine what happened. Repeating a request without understanding that state can differ from continuing the original operation. The SW4P overview explains the lifecycle from instruction and quote through confirmation, recovery, and reconciliation.Project References
- Source and issue tracking.
- Setup and interface reference.
- SW4P technical documentation.
- SW4P Earn for the allocation, claim, and payout model and current programme status.