# Integrate ResolveSignal into a system without an LLM

No LLM is required in the calling system. ResolveSignal performs the bounded
analysis. Your application supplies current structured evidence, pays one x402
quote, receives one typed recommendation, and retains execution authority.

## Choose an integration surface

- **Python:** use the reference package and Circle CLI payment adapter.
- **Any other language:** use the published JSON schemas and the HTTP/x402 flow.
- **Coding Agent:** give it the dedicated integration prompt. The prompt tells it
  to implement the same state machine in the repository's native language.

Download the [Python integration package](/integration/resolvesignal-python.zip),
[profile schema](/integration/profile-schema.json), and
[runtime schema](/integration/runtime-schema.json). The live
[`GET /v2/form`](https://resolvesignal.com/v2/form) response remains authoritative.
Start from the [example profile](/integration/profile.example.json) and
[example runtime evidence](/integration/runtime.example.json); replace every
example value with declarations and current evidence from your own system.

## Keep static policy separate from runtime evidence

Store these fields in a reviewed profile in your own repository:

- `objective`
- `policy`
- `capabilities`
- `locale`

Supply these fields for every call from current system data:

- `current_state`
- `observations`
- `facts`
- `previous_attempts`
- `observed_at`

The SDK merges both documents locally. ResolveSignal does not store a customer
profile. This keeps each purchase stateless and prevents stale runtime evidence
from being hidden inside configuration.

## Install the Python reference package

```bash
python -m pip install https://resolvesignal.com/integration/resolvesignal-python.zip
```

The package requires Python 3.12+, `httpx`, and `jsonschema`. A paid call through
the built-in adapter also requires an authenticated Circle Agent Wallet CLI on
Arc Mainnet. The package never asks for or stores a private key.

## Build and validate without payment

```bash
resolvesignal build \
  --profile config/resolvesignal-profile.json \
  --runtime run/current-evidence.json \
  --output run/request.json

resolvesignal validate \
  --profile config/resolvesignal-profile.json \
  --runtime run/current-evidence.json

resolvesignal check --base-url https://resolvesignal.com
```

`build` and `validate` are local. `check` only reads `/health` and `/v2/form`.
None of these commands creates a quote, calls a model, signs data, or spends USDC.

## Make one authorized paid call

```bash
resolvesignal call \
  --profile config/resolvesignal-profile.json \
  --runtime run/current-evidence.json \
  --payer 0xYOUR_AGENT_WALLET \
  --max-fee 0.06 \
  --recovery run/resolvesignal-recovery.json \
  --confirm-paid-call
```

The explicit flag prevents setup scripts and test suites from purchasing by
accident. The SDK validates the live contract and quote, writes recovery metadata,
invokes the payment adapter exactly once, and checks that the result is bound to
the quoted call and input hash. It never automatically purchases a replacement
call after an error or timeout.

The recovery file contains the request key, call ID, input hash, payer, vault,
amount, deadlines, and financial status. It does not contain business input or
output. Protect this file as a credential.

## Reconcile without another payment

```bash
resolvesignal reconcile \
  --base-url https://resolvesignal.com \
  --recovery run/resolvesignal-recovery.json
```

Use reconciliation after a network interruption or ambiguous paid response. Do
not run `call` again to discover the old call's status.

## Use the Python API

```python
import json
from pathlib import Path

from resolvesignal_integration import (
    CircleCliPayment,
    ResolveSignalClient,
    build_request,
)

profile = json.loads(Path("config/resolvesignal-profile.json").read_text())
runtime = json.loads(Path("run/current-evidence.json").read_text())
request = build_request(profile, runtime)

with ResolveSignalClient(
    "https://resolvesignal.com",
    CircleCliPayment(),
) as client:
    result = client.call(
        request,
        payer="0xYOUR_AGENT_WALLET",
        max_fee_usdc="0.06",
        recovery_path=Path("run/resolvesignal-recovery.json"),
        confirm_paid_call=True,
    )

action_id = result["result"]["decision"]["action_id"]
parameters = result["result"]["decision"]["parameters"]
```

Treat the returned action as a recommendation. Before execution, enforce your
own authorization and verify the returned `pre_execution` requirements. Then map
`action_id` only to an allowlisted local handler. Never execute arbitrary text.

## Implement another wallet or language adapter

The payment boundary needs three operations:

1. Sign the exact `QuoteAdmission` EIP-712 challenge for the payer.
2. Inspect the quoted `/pay` resource without settling it.
3. Execute one standard x402 v2 exact payment on Arc Mainnet with a hard fee cap.

Preserve the same invariants:

- HTTPS origin and same-origin pay resource.
- Protocol 2, backend `escrow_v3`, network `eip155:5042`.
- USDC `0x3600000000000000000000000000000000000000`, six payment decimals.
- Exact `call_id`, `input_hash`, payer, amount and initialized vault from the
  current quote.
- Durable recovery metadata written before the payment command.
- One payment invocation; no automatic retry after an ambiguous submission.
- At least 60 seconds plus network overhead for the synchronous paid response.
- No business payload or result in recovery logs.

## Integration acceptance checks

Before enabling production purchases, verify:

1. Invalid or incomplete input fails locally.
2. The read-only contract check succeeds.
3. A quote over the configured fee cap stops before payment.
4. A simulated payment adapter is invoked once under timeout and transport errors.
5. Results are accepted only when `call_id` and `input_hash` match.
6. Only allowlisted action IDs can reach business handlers.
7. Recovery state can reconcile a call without its business payload.
8. Paid end-to-end testing is performed only with separate authorization and a
   stated purchase count and maximum fee.

