# Twisp Documentation > Documentation for building financial systems with the Twisp Accounting Core and GraphQL API. Use the conceptual documentation to understand the accounting model, tutorials for implementation workflows, and reference pages for exact API behavior. ## Start Here - [Twisp](https://www.twisp.com/docs/index.md): The accounting engine for financial products. - [Introduction](https://www.twisp.com/docs/introduction.md): What is Twisp? - [Twisp for AI Agents](https://www.twisp.com/docs/introduction/agents.md): Start Twisp on your machine, connect your agent with one URL, and it can design, build, verify, and automate a ledger, with every call it makes recorded. - [The Accounting Core](https://www.twisp.com/docs/accounting-core.md): An accounting engine for building products that work with money. - [Twisp 101 Tutorial](https://www.twisp.com/docs/tutorials/twisp-101.md): Work through the steps in this tutorial to learn how to start building on the Twisp accounting core. - [API Reference](https://www.twisp.com/docs/reference/api.md): Key components and concepts for interacting with the API. ## Core Concepts - [Balances](https://www.twisp.com/docs/accounting-core/balances.md): With compute-on-write rollup calculations, balances always reflect the most up-to-date state of an account. - [Chart of Accounts](https://www.twisp.com/docs/accounting-core/chart-of-accounts.md): The chart of accounts is the basis for creating balance sheets, P&L reports, and for understanding the balances for the customer and business entities your business services. - [Encoded Transactions](https://www.twisp.com/docs/accounting-core/encoded-transactions.md): Design accounting logic with tran codes to create composable transaction types. - [Layered Accounting](https://www.twisp.com/docs/accounting-core/layered-accounting.md): Layers help clarify the true state of funds in accounts. - [Ledgers in Twisp](https://www.twisp.com/docs/accounting-core/ledgers-in-twisp.md): The accounting core is built upon a single source-of-truth ledger. - [Agents](https://www.twisp.com/docs/actions/agents.md): Run a model in a loop over the tools and skills you declare, bounded by policies, with every step recorded. - [Authority and Audit](https://www.twisp.com/docs/actions/authority-and-audit.md): Who each action runs as, how policies bound everything it reaches, and what Twisp records about every call. - [Actions](https://www.twisp.com/docs/actions.md): Capabilities you define once in the ledger, such as tools, skills, agents, and MCP servers, and run from triggers, calls, sessions, or outside agents, with every run recorded. - [MCP Servers](https://www.twisp.com/docs/actions/mcp-servers.md): Offer chosen tools, skills, and resources to agents running outside Twisp, with every request recorded and every call bounded by policies. - [Memory](https://www.twisp.com/docs/actions/memory.md): Keep what an agent learns beyond its context window, its turn, and its session, without leaking data about one subject into another. - [Models](https://www.twisp.com/docs/actions/models.md): Ask a built-in model typed questions about a state and get typed answers that code can act on. - [Native Tools](https://www.twisp.com/docs/actions/native-tools.md): The tools every Twisp tenant has without creating them: what each does, who can use it, when to reach for it, and how its calls are recorded. - [Preview and Replay](https://www.twisp.com/docs/actions/preview-and-replay.md): Run a change against real data without committing it, then compare it with recorded work before you publish. - [Sessions](https://www.twisp.com/docs/actions/sessions.md): Give an action a durable identity across many events, with ordered turns, an end, a clock, approvals, and held turns. - [Skills](https://www.twisp.com/docs/actions/skills.md): Reusable, versioned guidance that agents load when they need it, with the tools its procedure uses. - [Writing Starlark](https://www.twisp.com/docs/actions/starlark.md): Write, test, and debug Starlark tool programs: GraphQL calls, exact money math, nested tools, failures, idempotency, and output. - [Tools](https://www.twisp.com/docs/actions/tools.md): Typed, versioned programs that clients, agents, and other tools call inside their own transaction or start to run on their own. - [Triggers and Executions](https://www.twisp.com/docs/actions/triggers-and-executions.md): Run durable, retried work when a record in your ledger changes or on a schedule, with a full history of every invocation. - [Computation Engine](https://www.twisp.com/docs/infrastructure/computation-engine.md): The computation infrastructure supports protocol workflows and an extensive financial calculation runtime via CEL. - [Infrastructure](https://www.twisp.com/docs/infrastructure.md): Underneath the accounting core is a purpose-built ledger database and computation engine. - [The Twisp Financial Ledger Database](https://www.twisp.com/docs/infrastructure/ledger-database.md): The ledger database is an immutable, append only data structure that provides strong gaurantees about the lineage of data. - [Local Environment](https://www.twisp.com/docs/infrastructure/local-environment.md): The local environment helps streamline development and CICD integration testing with Twisp running on your own machine. - [Security and Auth](https://www.twisp.com/docs/infrastructure/security-and-auth.md): Security policies control access to encrypted resources. - [System Architecture](https://www.twisp.com/docs/infrastructure/system-architecture.md): Twisp is a purpose-built system that provides a mission-critical, high performance, core ledger for constructing and running financial products, empowering organizations to have complete control over their crucial financial data. - [Transaction Isolation and Consistency](https://www.twisp.com/docs/infrastructure/transaction-isolation-and-consistency.md): Twisp provides snapshot isolation and strong consistency to ensure correctness and prevent anomalies in ledger systems. - [A Short History of Twisp](https://www.twisp.com/docs/introduction/history.md): Why we did it. - [DIY Ledgers are a Problem](https://www.twisp.com/docs/introduction/no-diy-ledger.md): We built a ledger database and accounting engine (so that you don't have to). - [ACH Processor](https://www.twisp.com/docs/processors/ach.md): Understanding how the Twisp ACH processor works - [Processors](https://www.twisp.com/docs/processors.md): Processing financial protocols and payment networks - [Wire Processor](https://www.twisp.com/docs/processors/wire.md): Understanding how the Twisp wire processor sends and receives Fedwire wires ## Guides - [Branching Tenants and Managing Aliases](https://www.twisp.com/docs/guides/branching-and-aliasing.md): Create stable tenant aliases, copy configuration into branch tenants, and move an alias to a new branch. - [Building Financial Systems with the Twisp Accounting Core](https://www.twisp.com/docs/guides/building-financial-systems.md): Design, implement, and optimize a financial system using Twisp. Covers everything from defining the financial services to be provided, designing accounts and transactions, ensuring security and compliance, integrating with other... - [Effective Balances](https://www.twisp.com/docs/guides/effective-balances.md): Roll up balances by the effective date of activity to answer point-in-time, statement, and income-statement questions — even when transactions arrive late or are backdated. - [Handling ACH Returns](https://www.twisp.com/docs/guides/handling-ach-returns.md): Process and manage ACH returns effectively - [Guides](https://www.twisp.com/docs/guides.md): Use these how-to guides to build solutions for real-world financial systems using Twisp. - [Building Actions with a Coding Agent](https://www.twisp.com/docs/guides/mcp-action-builder.md): Install the action-builder MCP server template so a coding agent can read your actions and executions, validate the definitions it writes, and replay recorded work against them before a person publishes them. - [Connecting MCP Hosts](https://www.twisp.com/docs/guides/mcp-hosts.md): Connect Claude Code, Claude, and VS Code to an MCP server you built in Twisp by signing in as the Twisp user you already are. - [Modeling Banking on Twisp](https://www.twisp.com/docs/guides/neobanking-guide.md): Design and Implement bank-like core accounting on Twisp. - [Position-Based Accounting for Securities Trading with Twisp](https://www.twisp.com/docs/guides/position-accounting.md): Learn how to set up position-based accounting for securities trading using Twisp in this comprehensive guide. From designing a suitable chart of accounts and defining transaction codes, to posting transactions for trading activities and... - [Processing ACH Payments](https://www.twisp.com/docs/guides/processing-ach-payments.md): Process production ACH payments efficiently - [Reconciling ACH Files](https://www.twisp.com/docs/guides/reconciling-ach-files.md): Validate and reconcile ACH file processing - [Twisp in Your Agent Platform](https://www.twisp.com/docs/guides/your-agents.md): You run your own agents. Make Twisp the place they act on money, with every action bounded by policies you set, recorded with its reason, run in preview first, and tested against recorded traffic before a change ships. ## Tutorials - [Tutorials](https://www.twisp.com/docs/tutorials.md): These tutorials cover the skills needed to work with the Twisp accounting core with simple, step-by-step instructions and relevant examples. - [Setting Up Accounts](https://www.twisp.com/docs/tutorials/setting-up-accounts.md): In this tutorial, we will learn how to manage accounts using the GraphQL API. - [Posting Transactions](https://www.twisp.com/docs/tutorials/posting-transactions.md): In this tutorial, we will learn how to post transactions using the GraphQL API. - [Pulling Balances](https://www.twisp.com/docs/tutorials/pulling-balances.md): In this tutorial, we will learn how to query account balances using the GraphQL API. - [Ledger Invariants: Create and Attach Velocity Controls to Accounts](https://www.twisp.com/docs/tutorials/velocity.md): Build a no-overdraft control and a daily spending limit for wallet accounts, with GraphQL you can run as written. - [Running Actions Locally](https://www.twisp.com/docs/tutorials/actions.md): Create an action that reacts to journal changes, watch it run, read its results and history, then rerun, cancel, and retire it. - [Building Transactional Actions](https://www.twisp.com/docs/tutorials/advanced-actions.md): Build an action with GraphQL calls, conditional execution, atomic writes, and safe reruns. Observe rollback, choose retry boundaries deliberately, and call the action as a tool. - [Your First Agent](https://www.twisp.com/docs/tutorials/actions/first-agent.md): Build an agent with a tool and a skill, run it, read every call and model exchange it recorded, and watch a policy stop it from writing. - [A Long-Running Agent with Sessions](https://www.twisp.com/docs/tutorials/actions/sessions.md): Build an agent that watches each new account for fifteen minutes: start a session, resume it with entries, approve a tool call, answer a held turn, close a session, and see one end. - [Giving an Agent Memory](https://www.twisp.com/docs/tutorials/actions/agent-memory.md): Enable long-term memory on a session agent, watch it save, recall, search, and pin memories, and inspect and delete its records through the API. - [Classifying with a Model](https://www.twisp.com/docs/tutorials/actions/models.md): Ask the built-in typesafe_jev model typed questions, and wrap it in a tool that classifies a card purchase and records the decision on the transaction. - [Building an MCP Server](https://www.twisp.com/docs/tutorials/actions/mcp-server.md): Give a support team a narrow MCP server with one read-only tool and one tool that writes, connect to it, watch it run in preview mode, promote it to LIVE, and read back every request with its stated intent. - [Previewing and Replaying a Change](https://www.twisp.com/docs/tutorials/actions/preview-and-replay.md): Preview an agent that charges a fee, run it for real, then replay its recorded turn against a new version of the tool before you switch to it. - [Organizing with Account Sets](https://www.twisp.com/docs/tutorials/organizing-with-account-sets.md): In this tutorial, we'll explore how to use account sets to organize your chart of accounts. - [Building Tran Codes](https://www.twisp.com/docs/tutorials/building-tran-codes.md): In this tutorial, we will learn how to manage transaction codes using the GraphQL API. - [Working with Journals](https://www.twisp.com/docs/tutorials/working-with-journals.md): In this tutorial, we will learn how to add additional journals to handle a multi-journal ledger system. - [Making API Requests with cURL](https://www.twisp.com/docs/tutorials/api/making-api-requests-with-curl.md): In this tutorial, we will learn how to make requests against the Twisp GraphQL API using the curl command line tool. - [Querying Paginated Fields](https://www.twisp.com/docs/tutorials/api/querying-paginated-fields.md): In this tutorial, we will learn to handle cursor-paginated fields in the GraphQL schema. ## Reference - [Reference](https://www.twisp.com/docs/reference.md): Definitions of all components in the Twisp Accounting Core and GraphQL API. - [GraphQL API Reference](https://www.twisp.com/docs/reference/graphql.md): Documentation for the Twisp GraphQL API. - [Ledger Reference](https://www.twisp.com/docs/reference/ledger.md): A Twisp ledger is composed of accounts, account sets, balances, entries, journals, transactions, and tran codes. - [Velocity Controls](https://www.twisp.com/docs/reference/ledger/velocity-controls.md): Reference for velocity controls and limits within a Twisp ledger, including how a limit is checked and when it is not. - [ACH Reference](https://www.twisp.com/docs/reference/ach.md): The Twisp ACH processor handles configuration, file operations, ODFI origination, and RDFI receiving operations. - [API Requests via HTTPS](https://www.twisp.com/docs/reference/api/https-requests.md): Components of a GraphQL API request. - [Authentication](https://www.twisp.com/docs/reference/api/authentication.md): Authenticating requests against the Twisp API. - [Response Format](https://www.twisp.com/docs/reference/api/response-format.md): Requests to the Twisp GraphQL API return a consistent JSON response format. - [Pagination](https://www.twisp.com/docs/reference/api/pagination.md): When making queries which can potentially return high-cardinality lists, the Twisp API supports cursor-based pagination. - [Indexes](https://www.twisp.com/docs/reference/api/indexes.md): Queries against the ledger are done via database indexes. This document explains how to use them. - [Errors](https://www.twisp.com/docs/reference/api/errors.md): Error codes returned by the Twisp API when things don't go right. - [Transactional Operations](https://www.twisp.com/docs/reference/api/transactional-operations.md): Requests to the GraphQL API are executed in a single transaction context with all-or-nothing semantics. - [Extensions](https://www.twisp.com/docs/reference/api/extensions.md): The Twisp GraphQL API supplies additional metadata about operations through the "extensions" subdocument. - [Webhooks](https://www.twisp.com/docs/reference/api/webhooks.md): Subscribe to change events on ledger and ACH entities and receive them as signed HTTP requests. - [Actions Reference](https://www.twisp.com/docs/reference/actions.md): Actions, tools, skills, models, agents, sessions, memory, MCP servers, and the executions that record their work. - [Actions](https://www.twisp.com/docs/reference/actions/actions.md): Define actions, their CEL and schedule triggers, execution settings, publication, and policies. - [Tools](https://www.twisp.com/docs/reference/actions/tools.md): Define tools, call or start them, nest calls, use native tools, and pin tool versions. - [Starlark](https://www.twisp.com/docs/reference/actions/starlark.md): The Starlark runtime for tools and MCP programs: language, event, globals, values, failures, transactions, and limits. - [Skills](https://www.twisp.com/docs/reference/actions/skills.md): Define skills that supply reusable guidance, the tools they make available, and how agents load them. - [Models](https://www.twisp.com/docs/reference/actions/models.md): Call a built-in model with a state and typed questions, and get typed answers back. - [Agents](https://www.twisp.com/docs/reference/actions/agents.md): Define agents that run a model in a loop over their tools and skills, with every step recorded. - [Sessions](https://www.twisp.com/docs/reference/actions/sessions.md): Give an action a session: durable identity, ordered turns, an end, schedules, approvals, and held turns. - [Memory and History](https://www.twisp.com/docs/reference/actions/memory.md): Let an agent keep durable memories and search its session's earlier turns. - [Executions](https://www.twisp.com/docs/reference/actions/executions.md): Read executions, follow their lineage, preview calls, rerun, replay, and cancel. - [MCP Servers](https://www.twisp.com/docs/reference/actions/mcp.md): Expose a curated set of tools to agents running outside Twisp over the Model Context Protocol, with every request recorded as an execution and every call bounded by the requesting principal's and the server's policies. - [Limits and Errors](https://www.twisp.com/docs/reference/actions/limits-and-errors.md): Limits on actions, executions, and calls, and the errors the actions API returns. - [CEL Reference](https://www.twisp.com/docs/reference/cel.md): Embedded computation with the common expression language runtime. ## Optional - [Complete documentation corpus](https://www.twisp.com/docs/llms-full.txt): All published documentation in one large file. - [Concepts and architecture corpus](https://www.twisp.com/docs/llms-concepts.txt): Introduction, Accounting Core, actions, processors, and infrastructure documentation in one file. - [Guides corpus](https://www.twisp.com/docs/llms-guides.txt): Published solution guides for building financial systems with Twisp. - [Tutorials corpus](https://www.twisp.com/docs/llms-tutorials.txt): All published step-by-step Twisp tutorials in one file. - [Reference corpus](https://www.twisp.com/docs/llms-reference.txt): Ledger, API, actions, GraphQL, ACH, and CEL reference documentation in one file.