Skip to main content
@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.
Planning and quoting do not move funds. A request to execute must be handled under the authority and limits configured for that operation. The application should use the settlement result to determine whether the intended payment completed.

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:
  1. Choose the local or HTTP transport and the intended environment.
  2. Configure the required service credentials and participant addresses through the supported configuration path.
  3. Define what the agent may inspect, propose, and execute, including any spending limits and approvals.
  4. Follow the selected version’s setup and checks before relying on the connection.
Keep credentials outside published configuration examples. Source setup and package distribution are distinct from the availability of the settlement service and its routes.

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