---
title: Agiloft API Integration on Truto
slug: agiloft
category: E-Signature
canonical: "https://truto.one/integrations/detail/agiloft/"
---

# Agiloft API Integration on Truto



**Category:** E-Signature  
**Status:** Beta

## MCP-ready AI tools

Truto exposes 22 tools for Agiloft that AI agents can call directly.

- **create_a_agiloft_access_token** — Log in with the connected KB, login and password (EWLogin) and get a JWT access token (default lifetime 15 minutes, up to 60 via the token_expires_in global variable). The connector calls this at connect time and every 10 minutes. The credentials go in the query string; the request is sent with Content-Type text/plain and an empty body, as documented.
- **agiloft_action_buttons_execute** — Run an action button on a record (EWActionButton, asynchronous). Returns the record ID and a callback ID to poll with async_operations.lookup.
- **agiloft_async_operations_lookup** — Check the status of an asynchronous call such as action_buttons.execute (EWAsyncStatus). The status is the HTTP code: 200 completed, 201 queued, 202 in progress, 501 failed, 523 unknown callback ID.
- **list_all_agiloft_attachments** — List the files attached in a file field of a record (EWAttachInfo): position, name and size of each.
- **create_a_agiloft_attachment** — Attach a file to a file field of a record (EWAttach, PUT with the file content in the body). Returns the number of files now in the field.
- **get_single_agiloft_attachment_by_id** — Download one attached file from a file field of a record (EWRetrieve). The id is the file's 0-based position in the field (from attachments.list). The response body is the raw file with the content type it was attached with.
- **delete_a_agiloft_attachment_by_id** — Remove one attached file from a file field of a record (EWRemoveAttachment). The id is the file's 0-based position in the field (from attachments.list). Returns the number of files remaining.
- **agiloft_choice_lines_lookup_id** — Look up the internal ID of a choice-list value (EWGetChoiceLineId), for use in SQL where clauses such as record_ids.list. IDs change when a KB is copied or choice lists are recreated, so look them up at run time.
- **list_all_agiloft_record_ids** — Return the IDs of the records in a table that match a SQL where clause (EWSelect). The clause runs at the database level, so it uses database column names (from the Field Wizard) and choice-line IDs (see choice_lines.lookup_id) rather than labels; record order is not controllable. Security filters are applied automatically.
- **agiloft_record_locks_lookup** — Get the lock status of a record (EWLock GET): whether it is locked, by whom, and minutes until the lock expires.
- **agiloft_record_locks_lock** — Lock a record (EWLock PUT) for the connected user so others cannot edit it. The lock lasts for the KB's lock_expiration_time global variable.
- **agiloft_record_locks_unlock** — Unlock a record (EWLock DELETE). Admin-group users can pass `force` to release a lock held by another user.
- **create_a_agiloft_record_upsert** — Create or update a record (EWUpsert): if `match_query` matches no record a new one is created, if it matches exactly one that record is updated with the supplied fields, and if it matches several the call fails with 409. Returns the ID of the created or updated record.
- **list_all_agiloft_records** — List records in a table (EWSearch), optionally filtered by an ad hoc query and/or a saved search, returning the requested fields for each record. Pages are 0-based; pass `limit` to page (a limit of 0 returns all records on page 0). Without `field`, only the ID, type and record-ownership fields are returned.
- **get_single_agiloft_record_by_id** — Read one record (EWRead) by its ID and return all of its field values.
- **create_a_agiloft_record** — Create a record (EWCreate) in a table with the supplied field values and return the new record ID. Rules configured on the table run as part of the operation.
- **update_a_agiloft_record_by_id** — Update a record (EWUpdate) by ID with the supplied field values (only the fields sent are changed) and return the full record after the update.
- **delete_a_agiloft_record_by_id** — Delete a record (EWDelete) by ID, applying the chosen strategy to dependent (linked) records. If the strategy cannot be applied the delete fails and the error suggests alternatives.
- **agiloft_records_search** — Search records with a natural-language request (EWNLPSearch), e.g. "Active NDAs submitted last month". The tables searched are those the KB's chat search is configured for; results use the same format as records.list.
- **list_all_agiloft_saved_searches** — List the saved searches defined for a table (EWSavedSearch): name, label, ID and description. Use the label as `search` in records.list.
- **list_all_agiloft_tables** — List all tables in the KB (EWTable) with their labels and logical names and, unless skip_columns_info is true, their fields (name, label, type). Action buttons, related tables and embedded searches are not included.
- **get_single_agiloft_table_by_id** — Get one table (EWTable with `table`) by logical name, with all of its fields (name, label, type, linked-field sources). The id is the logical table name, e.g. `contract`.

## How it works

1. **Link your customer's Agiloft account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Agiloft.** The Proxy API is a 1-to-1 mapping of the Agiloft API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Embed CLM handoff in your CPQ or CRM** — Let sales teams push closed-won deals from your platform straight into Agiloft to kick off contract authoring and legal review. Your users stop re-keying deal data into a separate CLM and close faster.
- **Offer AI contract analysis on top of Agiloft** — Pull contract attachments out of Agiloft, run your AI models for clause extraction, risk scoring, or obligation mining, and write the structured results back onto the contract record. Position your product as the intelligence layer for the customer's existing CLM.
- **Replace the signature step with your e-signature flow** — For e-signature or identity verification SaaS, detect contracts pending signature in Agiloft, download the unsigned file, route it through your signing experience, and upload the executed PDF back to the original record — all without the customer leaving your app.
- **Power natural-language contract search in your product** — If you're building an AI assistant, Slack bot, or internal search tool, forward user queries to Agiloft's native language search and render contract results inside your UI. No need to replicate Agiloft's schema or build a query translator.
- **Sync vendor and risk data with procurement or VRM tools** — Keep vendor records, compliance status, and risk flags in sync between your procurement or VRM platform and Agiloft. Automatically update contract status or custom fields when a vendor is flagged, so legal never drafts against a non-compliant counterparty.

## What you can build

- **Deal-to-contract push with upsert** — Send finalized quote or opportunity data into Agiloft using record upsert with match queries, so the same contract or vendor is never duplicated across syncs.
- **One-click workflow triggers** — Expose Agiloft action buttons (e.g. 'Send for Legal Review', 'Generate PDF') as native actions in your UI and poll async operations until completion.
- **Bi-directional attachment sync** — List, download, upload, and delete contract attachments on specific Agiloft records to move redlines, signed PDFs, or AI-generated summaries between systems.
- **Record locking during external processing** — Lock an Agiloft contract while your app is signing, analyzing, or enriching it, then release it — preventing conflicting edits from users in Agiloft.
- **Natural-language contract search widget** — Embed a search box in your product that passes raw user queries to Agiloft's NLP search endpoint and renders the matching records inline.
- **Custom field writeback for enrichment** — Update Agiloft records with AI-extracted metadata, risk scores, or external system IDs by writing directly to the customer's custom fields on any table.

## FAQs

### How does authentication work for end users connecting their Agiloft account?

Truto handles the Agiloft access token creation flow on behalf of your end users, so you don't need to build or store credentials yourself. Your users authorize their Agiloft instance once and Truto manages token lifecycle for subsequent API calls.

### Can we work with customer-specific custom tables and fields?

Yes. Agiloft is schema-flexible, and Truto exposes endpoints to list all tables and inspect individual table definitions, so you can dynamically discover each customer's custom tables, fields, and choice lists at runtime rather than hardcoding them.

### How do we handle long-running Agiloft operations like PDF generation or workflow execution?

Agiloft action buttons often run asynchronously. You trigger them via the action button execute endpoint and then poll the async operations lookup endpoint until the job completes, so your integration can wait on results without blocking.

### How do we prevent conflicts when our app and Agiloft users edit the same contract?

Use the record lock endpoints to explicitly lock a record before you start processing (e.g. downloading for signature or enrichment) and unlock it when you're done. You can also check current lock state via the lock lookup endpoint.

### Can we avoid creating duplicate records when syncing from an external system?

Yes. The record upsert endpoint accepts a match query so Agiloft will update an existing record if one matches your criteria, or create a new one if not — ideal for syncing CRM, ERP, or procurement data.

### Does Agiloft support natural-language search via the API?

Yes. The records search endpoint accepts natural-language queries (e.g. 'Active NDAs submitted last month'), which is useful if you're building chat or AI search experiences on top of a customer's contract repository.

### What file operations are supported for contract documents?

You can list all attachments on a record, download a specific attachment by ID, upload new attachments to a record, and delete attachments — covering the full cycle of moving documents in and out of Agiloft.

## Related reading

- [Connect Agiloft to Claude: NLP Search and Record Lifecycle Operations](https://truto.one/blog/connect-agiloft-to-claude-nlp-search-and-record-lifecycle-operations/) — Learn how to connect Agiloft to Claude using a managed MCP server. This step-by-step guide covers handling Agiloft's JWT tokens, locks, and async operations.
- [Connect Agiloft to ChatGPT: Manage records, files and action buttons](https://truto.one/blog/connect-agiloft-to-chatgpt-manage-records-files-and-action-buttons/) — Learn how to connect Agiloft to ChatGPT using a managed MCP server. Execute action buttons, manage files, and automate record workflows via natural language.
- [Connect Agiloft to AI Agents: Automate Table Data and File Workflows](https://truto.one/blog/connect-agiloft-to-ai-agents-automate-table-data-and-file-workflows/) — Learn how to connect Agiloft to AI Agents using Truto's /tools endpoint. Fetch API tools, bind them to LangChain or Vercel, and automate enterprise workflows.
