Agent-assisted integration
Hand it to your agent
Use the instructions below to embed SpreadSpace in your loan page and receive
approved figures in your backend. When an analyst finalizes a spread,
SpreadSpace saves an immutable snapshot and sends spread.finalized. Your
receiver retrieves the snapshot by ID and stores it in your database. A later
spread.reopened event lets your application mark the figures as under revision.
Save the skill
Copy the SKILL.md block below to
.claude/skills/spreadspace-integration/SKILL.md (Claude Code), or paste it
into AGENTS.md or your rules file (Cursor, Codex, and similar tools). It
covers the embed and webhook integration.
Add the standing rules
Append the CLAUDE.md block to your own CLAUDE.md / AGENTS.md, so the
rules hold on every session rather than only the one that writes the code.
Put the API keys in your environment
Two key shapes, both from Settings → Live API. For the receiver, a key
from the Backend preset, which holds webhooks:read, webhooks:write
and spreads:read, as SPREADSPACE_API_KEY. For the mint, a key from the
Embed preset, which holds embed:write and the writes a session may
carry, with the origin of your loan page under Allowed origins, as
SPREADSPACE_EMBED_API_KEY. One key can hold both: start from the Embed
preset, add webhooks:read, webhooks:write and spreads:read, and set
both variables to it. Test-mode keys (ss_test_…) use seeded loans and
sample extraction results at no charge. Use live mode to process your own
documents.
Your agent can also read this page directly at
https://docs.spreadspace.app/get-started/agent-assisted-integration.md.
Every page here has a .md twin, and the index is at
/llms.txt.
SKILL.md
Save this as .claude/skills/spreadspace-integration/SKILL.md, or paste it into your agent’s rules file.
The standing rules
Add this block to your own CLAUDE.md / AGENTS.md, so the rules hold on every session, not just the one that writes the code.
What you’ll have
- The workspace on your loan page: your server mints a handle per load,
your page renders it with
<SpreadSpaceEmbed>, and refresh is handled. The API key stays on your server, and the session token stays inside the iframe. - Approved figures in your database:
spread.finalizedtriggers snapshot retrieval and storage, keyed bysnapshot_id. - Reopen handled:
spread.reopenedmarks that copy under revision until the next finalize arrives with a higher version. - “Finalized by” from your own users table, joined on
finalized_by_external_user_id, the id your server named when it minted the handle. - Replay and rotation handled: a redelivery is a no-op, and a rotated secret verifies through its 24-hour grace window.
- Stored results on your loan page: display the saved figures from your database.
Not covered here: hosting the frame without the React component (the React embed SDK page describes the protocol module for a hand-rolled frame), and production hardening on your side (secret storage, alerting, your own retries).