What is Fency
Fency is a flexible framework for getting AI features into production.
Fency is a flexible and developer-friendly framework for getting AI features into production. It currently supports any backend and webapps built on React (more webapp libraries coming soon).
How it works
Under the hood, Fency orchestrates three things: your data, access control, and the client-side experience.
Your backend
- Syncs data into Fency as Memories
- Creates Sessions with scoped access to specific memories
- Hands a short-lived client token to the frontend
Your webapp (using @fencyai/react)
- Calls your backend to fetch the scoped access client token
- Calls the Fency API to start agent tasks using the client token
- Streams responses and renders progress in real time
Core concepts
- Memories: Made for mirroring your data into Fency. Your backend creates and updates memories via the Fency API (
POST /v1/memories,PATCH /v1/memories/:id). Memories support text, URL, and file sources, and can be used for RAG, context injection, and more. - Sessions: Control access to memories and API usage. Your backend creates sessions with a secret key; the client receives a short-lived
clientToken. Sessions scope which memories can be accessed. Learn more in Sessions and client tokens. - Guardrails and allowed actions: Server-side limits attached to a session: which memories a task may see and which browser actions it may declare. The client token cannot widen them. Learn more in Guardrails and allowed actions.
- @fencyai/react SDK: Orchestrates the flow and renders progress in the webapp. It handles token fetching, session creation, streaming, and UI state — tying your backend, the Fency API, and React together. See React Integration for setup.
End-to-end flow
The diagram below shows how your backend syncs memories to Fency, then how the React SDK obtains a client token and makes API requests. See React Integration and Server Integration for implementation details.