Available

LangChain + AccountsOS

UK accounting tools for LangChain agents

Add AccountsOS tools to your LangChain agents and chains. Query transactions, manage VAT, track deadlines, and categorise expenses — all as native LangChain tools with full type safety.

13

Tools

2

SDKs

UK

Accounting

Typed

Schemas

LangChain agent example
from langchain.agents import create_tool_calling_agent
from langchain_openai import ChatOpenAI
from accountsos_langchain import AccountsOSToolkit

# Set up tools
toolkit = AccountsOSToolkit(api_key="sk_live_...")
tools = toolkit.get_tools()

# Create agent
llm = ChatOpenAI(model="gpt-4")
agent = create_tool_calling_agent(llm, tools, prompt)

# Run
agent.invoke({
    "input": "What's my VAT position for Q4?"
})

Available Tools

ToolScope
get_transactionsread
get_balanceread
get_vat_summaryread
get_deadlinesread
create_transactionwrite
update_transactionwrite
categorize_transactionwrite
list_categoriesread
create_deadlinewrite
search_documentsread
upload_documentwrite
get_dla_balanceread
get_invoicesread

Features

Native LangChain tool wrappers for all 13 AccountsOS endpoints

Python and JavaScript SDK support

Full type safety with Pydantic models and Zod schemas

Works with LangChain agents, chains, and LangGraph

Streaming support for real-time responses

Built-in retry logic and error handling

How It Works

1

Install the AccountsOS tools package

Install the LangChain-compatible tool package via pip or npm.

pip install accountsos-langchain # or npm install @accountsos/langchain
2

Initialise tools with your API key

Create the toolset with your API key. All 13 tools are registered automatically.

from accountsos_langchain import AccountsOSToolkit toolkit = AccountsOSToolkit( api_key="sk_live_..." ) tools = toolkit.get_tools()
3

Add to your agent

Pass the tools to any LangChain agent. The agent can now query and manage your books.

from langchain.agents import create_tool_calling_agent agent = create_tool_calling_agent( llm=llm, tools=tools, prompt=prompt )

Benefits

Native LangChain tool interface — no custom wrappers needed

Full type safety with Pydantic and Zod schemas

Works with any LLM that LangChain supports

Combine with other LangChain tools and chains

Built-in error handling and retry logic

Frequently Asked Questions

Does this work with LangGraph?

Yes. The AccountsOS tools work with LangChain agents, chains, and LangGraph. Use them in stateful graph workflows for complex accounting automation.

Which LLMs are supported?

Any LLM that LangChain supports — OpenAI, Anthropic Claude, Google Gemini, Mistral, Llama, and more. The tool schemas are provider-agnostic.

Is there a JavaScript version?

Yes. Install @accountsos/langchain via npm for LangChain.js. The API is identical to the Python version with TypeScript type definitions.

Can I use only specific tools?

Yes. The toolkit lets you select specific tools: toolkit.get_tools(include=['get_balance', 'get_transactions']). This limits what your agent can access.

Ready to connect LangChain?

AI-powered accounting for your UK limited company.

Get Started Free

Free during Early Access - No credit card - Cancel anytime