Skip to main content

langchain-autom

LangChain integration for Autom, a SERP API that returns live search engine results as JSON.

It adds two components:

  • AutomSearch, a tool that agents call to search the web;
  • AutomSearchRetriever, a retriever that returns the results as LangChain documents.

Both work with Google (the default), Bing, Brave, DuckDuckGo and Yahoo.

Installation

pip install -U langchain-autom

Get an API key at app.autom.dev and set it in the environment:

export AUTOM_API_KEY="your-api-key"

You can also pass api_key=... to either component.

Search tool

from langchain_autom import AutomSearch

tool = AutomSearch(max_results=5)
tool.invoke({"query": "latest LangChain release"})
{
    "query": "latest LangChain release",
    "results": [{"title": "...", "url": "https://...", "content": "...", "position": 1}, ...],
}

The model sets query, and optionally time_range (day, week, month or year) to keep only recent pages.

You set the other options when you create the tool:

Option Default Description
engine google google, bing, brave, duckduckgo or yahoo
max_results 5 Results returned to the model, 1 to 10
country Two-letter country code, such as us (Google only)
language Language code of the results, such as en (Google only)
location City or region to search from, such as Paris, France (Google only)
timeout 60 Seconds to wait for Autom

API errors are returned to the model as text instead of raising, and the key never appears in them. Autom reports a rate limit as HTTP 401 with "Rate limit exceeded"; the tool says "rate limit exceeded" in that case.

With an agent

from langchain.agents import create_agent
from langchain_autom import AutomSearch

agent = create_agent("openai:gpt-4.1-mini", tools=[AutomSearch()])
agent.invoke({"messages": [{"role": "user", "content": "What changed in Python 3.13?"}]})

Retriever

from langchain_autom import AutomSearchRetriever

retriever = AutomSearchRetriever(k=5, engine="brave")
docs = retriever.invoke("retrieval augmented generation")

Each document's page_content is the result snippet. Its metadata holds title, url and position, plus date and source when Autom returns them. The retriever takes the same options as the tool, with k in place of max_results and a fixed time_range.

Both components have async versions (ainvoke).

Development

pip install -e ".[test]"
pytest tests/unit_tests                      # offline
AUTOM_API_KEY=... pytest tests/integration_tests  # live

License

MIT

Metadata

Release files for langchain-autom 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-autom 0.1.0
File Size Uploaded Provenance Actions
langchain_autom-0.1.0.tar.gz 9.2 kB Without provenance Details for langchain_autom-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-autom 0.1.0
File Interpreter ABI Platform Actions
langchain_autom-0.1.0-py3-none-any.whl Python 3 none any Details for langchain_autom-0.1.0-py3-none-any.whl

Total release size: 18.2 kB

Release files / langchain_autom-0.1.0.tar.gz

Download URL langchain_autom-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67af6c98e10fb9ec77322cab3270634582a89211323e80c383643e7ff83aa4d5
BLAKE2b-256 checksum
How to use checksums
eb759c56db65b61916e6f753a966eb1500202585e65308b171d94c996870b85b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / langchain_autom-0.1.0-py3-none-any.whl

Download URL langchain_autom-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9136cee589a3b4967e7ca2032e512be81e4e51837ee4b2f3823883b5ad44d607
BLAKE2b-256 checksum
How to use checksums
b81a22583b005f2a110da8f83dc3de47bc5173b1013c493a0fe55c5d72967cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for langchain-autom 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page