Getting started

Introduction

Give each of your users an AI agent, through one API.

01Your app02Fin API03Agent run04Results

Fin gives each of your users an AI agent that can chat, run tasks on its own and, with the user's signed approval, hold and trade funds. Your backend talks to Fin's REST API; your app keeps its own interface, login and users.

How an integration works

  1. Create the user with your own userId, using your API key.
  2. Sign them in. After your login verifies the user, your backend opens a Fin session naming the wallet or passkey they signed in with. Apps without a login can have the user sign a message instead.
  3. Chat. Send the user's message to start a run in their main conversation, and follow the agent's reply on the event stream or by reading the run.
  4. Approve actions. When the agent wants to do something that needs the user's OK, the run pauses; show the user the approval and send their decision. Anything that moves money also needs their wallet's signature on a message the API gives you.
  5. Fund the agent. The user creates the agent's wallet with one signature, deposits to it, and withdraws from it with a signed quote.

The quickstart walks through steps 1–3 with a real request for each.

Who owns what

ResourceWhat it is
PartnerYour company: its API keys, usage and limits.
UserYour customer, named by your userId.
AgentThe user's agent, created with them, with its own wallet.
SessionUp to an hour of access to one user, opened by your backend.
ConversationA chat thread. Every user has a main one.
RunThe agent working on one message.
AutomationA task the agent runs on its own.

Your app and Fin

Your app doesFin does
Log users in and show the interfaceRun the agent and keep every conversation
Keep the API key and session tokens on its serverCheck sessions and signatures
Show the user what they're approving and collect their signatureHand you the message to sign and enforce exactly what was signed
Send deposits from the user's own walletGive deposit addresses, send withdrawals and record receipts

Requests and responses are JSON, errors are problem details, lists are paged with a cursor, and live updates arrive as server-sent events.

Next

Fin documentation Built from the API contract · v1

Search all documentation