Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Vaquill

Scalekit connector
Open markdown

The Vaquill connector lets your AI agent act in each user's Vaquill account. Each user connects their own Vaquill access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 28 tools.

Tools
28
What they doRead · write · destructive
28 · 0 · 028 read0 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Vaquill connection

    In AgentKit > Connections, create a Vaquill connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'vaquill'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Vaquill:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'vaquill_count_sections',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Vaquill credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • vaquill_browse_divisionsWalk the statutory tree one level at a time in statutory order: titles, chapters, parts, state codes, constitution articles or federal rule sets, down to the sections.Read-only

    Browse Divisions

    Walk the statutory tree one level at a time in statutory order: titles, chapters, parts, state codes, constitution articles or federal rule sets, down to the sections. Returns the children of the level you name, each with identifier, kind, label, sectionCount and isLeaf; leaf rows are sections with an actId. nextCursor continues long section lists. Costs 1 credit; empty levels are refunded. Use vaquill_browse_divisions to enumerate a code or find a state code identifier for search. Use vaquill_search_statutes to rank by relevance and vaquill_count_sections to size a scope first.

    Inputs

    corpus_typestringrequired
    Corpus to browse: USC, CFR, STATE, REGULATION, CONSTITUTION, STATE_CONSTITUTION or FEDERAL_RULES. With nothing else set it returns the top level (titles, a state's codes, the articles, the rule sets).one of USCCFRSTATEREGULATIONCONSTITUTIONSTATE_CONSTITUTIONFEDERAL_RULES
    act_statusstring
    List only sections with this status, for example repealed.one of abolisheddeletedexpiredin_forceinactivenon_precedentialnot_fundednot_yet_effectiveomittedproposedrecodifiedrecompiledrejectedrelocatedremovedrenumberedrepealedrescindedreservedrevokedsupersededterminatedtransferredunconstitutionalvacantvacatedvetoedwithdrawn
    articlestring
    Article to drill into: a constitution's article or amendment (Article III, Amendment XIV) or a New York code article, exactly as the listing returned it.
    chapterstring
    Chapter to drill into (USC and state codes), for example 21.
    codestring
    Code to drill into: a state code such as tx_pe (list them with corpus_type STATE and state) or a federal rule set such as frcp (list them with corpus_type FEDERAL_RULES).
    cursorstring
    nextCursor from the previous response, to continue a long list of sections. Omit for the first page.
    exclude_repealedboolean
    true leaves out sections whose status is affirmatively dead. Sections with no recorded status are kept. Default false.
    partstring
    CFR part to drill into, for example 240.
    statestring
    Two-letter state code, required for STATE, REGULATION and STATE_CONSTITUTION.one of alakasazarcacoctdedcflgaguhiidiliniakskylamemdmamimnmsmomtnenvnhnjnmnyncndmpohokorpaprriscsdtntxutvtvivawawvwiwy
    title_numberinteger
    USC or CFR title to drill into, for example 42.
  • vaquill_compare_section_across_statesFind the provisions in other states that address the same subject as a given state statute section.Read-only

    Compare Section Across States

    Find the provisions in other states that address the same subject as a given state statute section. Returns neighbors, at most one provision per state ranked by similarity (a 0 to 1 retrieval score, not a legal opinion), with actId, citation and title, plus statesCovered. Federal sections, regulations and court rules return a note and are refunded. Costs 6 credits. Use vaquill_compare_section_across_states for a multi-state comparison starting from one section. Use vaquill_search_statutes with several states when you have no starting section.

    Inputs

    act_idstringrequired
    The section's actId, taken from a search, resolve, browse or batch result, for example USC_T42_C21_S1983 (42 U.S.C. § 1983) or CFR_T17_P240_S240_10b5_1. Do not assemble ids from a citation: their chapter and code segments exist only in Vaquill's data. A plain citation such as 42 USC 1983 is also accepted and adds the 2-credit resolve charge; prefer vaquill_resolve_citation to turn a citation into an actId.
    limitinteger
    States to return, one provision each, 1 to 25. Default 5.
  • vaquill_count_sectionsCount the sections in a scope: a jurisdiction, corpus, state code, title, chapter, part, article or federal rule set, optionally by status.Read-only

    Count Sections

    Count the sections in a scope: a jurisdiction, corpus, state code, title, chapter, part, article or federal rule set, optionally by status. Returns count, isExact and the scope counted. Costs 1 credit; a scope matching nothing is refunded. Use vaquill_count_sections to size a job before browsing or bulk reading. It takes no text query; use vaquill_search_statutes to rank matches.

    Inputs

    act_statusarray
    Only sections carrying one of these publisher statuses, for example ["repealed"] to audit dead law or ["in_force"] for sections affirmatively marked current. Combining a dead status with exclude_repealed true is rejected with 422.
    articlearray
    One or more articles: a constitution's article or amendment label as vaquill_browse_divisions lists it (Amendment XIV, Article IV), or the article of a state code divided by articles (New York, for example 2-A). Needs corpus_type from the constitution or STATE/REGULATION families; STATE_CONSTITUTION also needs state.
    chapterarray
    One or more chapters within a title or state code, for example ["21"] for 42 U.S.C. Chapter 21. Chapter numbers repeat, so pair with title_number (USC) or code (state); an unpaired chapter is rejected.
    codearray
    Restrict to specific state codes by the identifier vaquill_browse_divisions returns for corpus_type STATE, for example tx_pe (Texas Penal Code) or ca_pen. With corpus_type FEDERAL_RULES a value can instead be a rule set such as frcp or fre. This is the only way to scope below a whole state.
    corpus_typearray
    Restrict to one or more corpora. USC is the US Code; CFR the Code of Federal Regulations; STATE state statutory codes; CONSTITUTION the US Constitution; STATE_CONSTITUTION state constitutions; FEDERAL_RULES the Federal Rules (FRCP, FRCrP, FRE, FRAP, FRBP); FEDERAL_LOCAL_RULES federal courts' own local rules; STATE_RULES state court rules; REGULATION state administrative regulations; EXECUTIVE_ACTION presidential documents; FEDERAL_REGISTER agency rules (final and proposed); AGENCY_GUIDANCE federal sub-regulatory guidance; STATE_AGENCY_GUIDANCE state insurance bulletins; STATE_AG_OPINION state attorney general opinions; SESSION_LAW, STATUTE_COMPILATION, SENTENCING_GUIDELINES, US_TAX_TREATY, AGENCY_ADJUDICATION and the point-in-time CFR_ANNUAL / USC_ANNUAL editions are also accepted. Pair state-scoped corpora with state. Omit for every corpus. Example: ["USC", "CFR"].
    exclude_repealedboolean
    true drops sections whose own status says they are no longer operative (repealed, renumbered, superseded, expired and similar). A section with no trustworthy status is kept, so the remainder is not guaranteed good law: read each result's goodLawStatus. Default false.
    partarray
    One or more CFR parts, for example ["240"] for 17 C.F.R. Part 240. Pair with title_number.
    statearray
    One or more jurisdictions as lowercase two-letter codes (the 50 states, dc, pr, gu, vi, as, mp), or federal for the US Code, CFR, Constitution and federal rules. An unknown value is rejected with 422. Omit to cover every jurisdiction. Example: ["ca", "ny"].
    title_numberinteger
    USC or CFR title number, for example 42 (public health and welfare) or 17 (SEC regulations). Only meaningful with USC or CFR.
  • vaquill_extract_citationsFind every distinct statute, regulation, court rule, constitution and register citation in a block of text and resolve each to the section it names.Read-only

    Extract Citations

    Find every distinct statute, regulation, court rule, constitution and register citation in a block of text and resolve each to the section it names. Returns one row per distinct citation with mentions, the resolved actId and section, or a missReason with candidates, plus counts, truncated (more than 200 citations found) and creditsConsumed (2 credits per distinct citation resolved; extraction alone is free). Case citations are not extracted. Long documents with many citations can be slow. Use vaquill_extract_citations to verify the citations in a brief, memo or model answer. Use vaquill_resolve_citations when you already have the citation strings.

    Inputs

    textstringrequired
    The text to read: a brief, memo, email or model answer, 1 to 200,000 characters. Longer text is rejected with 422, never truncated. The text is not stored.
    include_unresolvedboolean
    false drops citations that did not resolve from the list; counts and charges are unchanged. Default true.
    resolveboolean
    true (default) resolves each distinct citation at 2 credits each; false returns the extracted citations only, free of charge.
    statestring
    The document's own jurisdiction as a two-letter code, used for citations that name no state (Civil Rule 56.1, Gov. Code § 12940). Citations that name a state are always checked against that state.one of alakasazarcacoctdedcflgaguhiidiliniakskylamemdmamimnmsmomtnenvnhnjnmnyncndmpohokorpaprriscsdtntxutvtvivawawvwiwy
  • vaquill_get_coverageGet the coverage matrix: which corpora Vaquill holds for each jurisdiction and how many documents each has, with a legend of every corpusType and whether it can be browsed.Read-only

    Get Coverage

    Get the coverage matrix: which corpora Vaquill holds for each jurisdiction and how many documents each has, with a legend of every corpusType and whether it can be browsed. Returns data with per-jurisdiction corpora counts, state session-law coverage, and meta with totals and measuredAt. Free, but the unfiltered matrix is about 1 MB, so pass state. Use vaquill_get_coverage before searching to learn what is queryable where. Use vaquill_list_boards for how recently each source was refreshed.

    Inputs

    statestring
    Return only this jurisdiction (two-letter code or federal). Strongly recommended: the unfiltered matrix is about a megabyte and can be slow.one of federalalakasazarcacoctdedcflgaguhiidiliniakskylamemdmamimnmsmomtnenvnhnjnmnyncndmpohokorpaprriscsdtntxutvtvivawawvwiwy
  • vaquill_get_credit_balanceGet the API credits this key's account can spend right now, and its rate limits.Read-only

    Get Credit Balance

    Get the API credits this key's account can spend right now, and its rate limits. Returns creditsRemaining, usdRemaining, bySource (subscription credits expire, pay-as-you-go persist), nextExpiry, plan, totalPurchased, totalConsumed and rateLimit. Free. Use vaquill_get_credit_balance as a pre-flight check before credit-heavy calls. Use vaquill_get_pricing for what each endpoint costs.

    Inputs

    This tool takes no inputs.

  • vaquill_get_pricingGet Vaquill's credit pricing: the dollar value of a credit and the credit cost of every metered endpoint.Read-only

    Get Pricing

    Get Vaquill's credit pricing: the dollar value of a credit and the credit cost of every metered endpoint. Returns dollarPerCredit, minCredits, maxCredits and costs with endpoint, operation, credits, usdCost and description. Free. Use vaquill_get_pricing to estimate the cost of a research plan. Use vaquill_get_credit_balance for the credits left.

    Inputs

    regionstring
    Jurisdiction to price: US for the US primary-law API, IN for the India legislation API. Default US.one of USIN
  • vaquill_get_sectionGet one statute, regulation or rule section's metadata by actId.Read-only

    Get Section

    Get one statute, regulation or rule section's metadata by actId. Returns the section's citation, title, title and chapter hierarchy, breadcrumb, status and goodLawStatus, amendment history, and links to every available format (HTML, PDF, XML, text, DOCX) and the official source, but not its text. Costs 2 credits; a 404 is not charged. Use vaquill_get_section for one section's details. Use vaquill_get_section_text for the full text, vaquill_get_sections for up to 50 ids at once, and vaquill_resolve_citation to start from a citation.

    Inputs

    act_idstringrequired
    The section's actId, taken from a search, resolve, browse or batch result, for example USC_T42_C21_S1983 (42 U.S.C. § 1983) or CFR_T17_P240_S240_10b5_1. Do not assemble ids from a citation: their chapter and code segments exist only in Vaquill's data. A plain citation such as 42 USC 1983 is also accepted and adds the 2-credit resolve charge; prefer vaquill_resolve_citation to turn a citation into an actId.