Skip to main content

langroid-datacircle

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website.

Our website: https://datacircle.dev

This package gives Langroid four tools that call Datacircle's public API, https://api.datacircle.dev/v1. You need no key and no account.

Tool Class Gives Call
datacircle_list_apis DatacircleListApisTool Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
datacircle_best_plans DatacircleBestPlansTool One API's plans, sorted by score out of 100, best first. Each plan comes with a rank and a price per 1,000 calls GET /apis/{slug}/best
datacircle_search_plans DatacircleSearchPlansTool Plans that match a provider or plan name, on all APIs or on one API. You can sort them by score, provider or price GET /plans
datacircle_provider DatacircleProviderTool The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

pip install langroid-datacircle

The package needs Langroid 0.59 or later and Python 3.11 or later.

Give the tools to an agent

import langroid as lr
from langroid_datacircle import datacircle_tools

agent = lr.ChatAgent(
    lr.ChatAgentConfig(
        name="Researcher",
        system_message="You find the best GTM APIs with Datacircle's tools.",
        handle_llm_no_tool="done",
    )
)
agent.enable_message(datacircle_tools())

task = lr.Task(agent, interactive=False)
result = task.run("Which email finder API is best for under $5 per 1,000?")
print(result.content)

Each tool is a ToolMessage class with its own handle(), so the agent needs no method of its own. The model picks a tool. The agent runs the tool and gives the model the tool's result. With handle_llm_no_tool="done", the task ends on the model's first answer that calls no tool.

By default, Langroid shows the model each tool's JSON format in the system message. To send the tools through the model's own function calling, set use_functions_api=True and use_tools=False in ChatAgentConfig. The tools work both ways.

To add the tools beside your own, list them: agent.enable_message([MyTool, *datacircle_tools()]).

To give only some of the tools, name them: datacircle_tools(["datacircle_best_plans"]). You can also pass the classes: agent.enable_message(DatacircleBestPlansTool).

Call a tool yourself

handle() returns a tool's output for the model, as JSON text:

from langroid_datacircle import DatacircleBestPlansTool

print(DatacircleBestPlansTool(slug="email-finder", limit=3).handle())

The functions list_apis, best_plans, search_plans and provider return each tool's output as Python dicts.

Tool output for the model

Each result is our API's answer as JSON text. Each plan comes with a rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and a page on datacircle.dev. That page lists every field.

You can give a provider's name in place of a slug. The tool turns Bright Data into bright-data.

Pass an unknown slug and the model gets {"error": ...} with the API's error message. The error message for an unknown API slug lists every valid slug. The model can then pick one and call the tool again. The tool checks each argument from the model before the API call. For a number out of range, Langroid sends the model an error message. The tool makes no API call.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and no other network calls. In an async task (task.run_async), the request runs in a thread, so the task keeps running. The request holds only the tool's own arguments. The API takes up to 60 calls a minute from one IP address. If the API says to wait, the tool waits up to a minute. The tool waits at most once per call. All plans are in one file at https://datacircle.dev/datacircle.json.

MIT license.

Metadata

Release files for langroid-datacircle 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 langroid-datacircle 0.1.0
File Size Uploaded Provenance Actions
langroid_datacircle-0.1.0.tar.gz 12.2 kB Without provenance Details for langroid_datacircle-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langroid-datacircle 0.1.0
File Interpreter ABI Platform Actions
langroid_datacircle-0.1.0-py3-none-any.whl Python 3 none any Details for langroid_datacircle-0.1.0-py3-none-any.whl

Total release size: 22.4 kB

Release files / langroid_datacircle-0.1.0.tar.gz

Download URL langroid_datacircle-0.1.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1b3b21e3ea49518c3f07eb65a2cc4f9218694d2a30fb6acd8daaf6ea94bc95dc
BLAKE2b-256 checksum
How to use checksums
664fc5783ae4f49b312e65ac0ea20b292467096a83492ebd7caf03d2c7b138c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

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

Download URL langroid_datacircle-0.1.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
140988900d33d8b4652e91fdeb9b27d62d75453b18366459c96f17f472bd4ddd
BLAKE2b-256 checksum
How to use checksums
09d7c0d63785fbcb3b761e6ed93c1a4919b578f3121620aa009d284620ddc69b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for langroid-datacircle 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