Skip to main content

txtai-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 txtai agents four tools that call Datacircle's open API, https://api.datacircle.dev/v1. Each tool is a plain Python function with type hints and a docstring. txtai reads each tool's name, description and arguments from the type hints and the docstring. You need no key and no account.

Tool What the tool gives Call
datacircle_list_apis Every GTM API on Datacircle, with the API's slug, number of plans, number of providers and best plan GET /apis
datacircle_best_plans 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 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 The APIs a provider sells, and the provider's rank on each API GET /providers/{slug}

Install

pip install txtai-datacircle "txtai[agent]" litellm

txtai-datacircle works with txtai 9.2 and later, on Python 3.10 and later. txtai-datacircle does not import txtai. You need litellm only for LiteLLM models, such as anthropic/claude-haiku-5-5.

Use the tools in an agent

Give the tools to an Agent:

from txtai import Agent
from txtai_datacircle import datacircle_tools

agent = Agent(model="anthropic/claude-haiku-5-5", tools=datacircle_tools(), max_steps=8)
print(agent("Who are the 3 best providers for the email-finder API?"))

The agent calls the tools with each step's arguments as JSON. Set method="code" and the agent writes Python that calls the tools as functions. Each tool returns a dict. The agent's code can read the dict's keys:

from txtai import Agent
from txtai_datacircle import datacircle_tools

agent = Agent(model="anthropic/claude-haiku-5-5", tools=datacircle_tools(), method="code", max_steps=8)
print(agent("Which provider is first for the email-finder API, and on which other APIs does it rank?"))

Use the Datacircle tools beside your own tools

Put the Datacircle tools in one list with your own tools and txtai's tools: tools=[*datacircle_tools(), my_tool, "websearch"].

To give the model only some of the tools, list their names: datacircle_tools(["datacircle_best_plans"]).

Use the tools in a txtai app

In a txtai app's YAML file, name each tool by the tool's import path:

llm:
  path: anthropic/claude-haiku-5-5

agent:
  gtm:
    max_steps: 8
    tools:
      - target: txtai_datacircle.datacircle_list_apis
      - target: txtai_datacircle.datacircle_best_plans
      - target: txtai_datacircle.datacircle_search_plans
      - target: txtai_datacircle.datacircle_provider

Then run the agent with Application("app.yml").agent("gtm", "Who is best for the email-finder API?"). Or serve the app with txtai's API: CONFIG=app.yml uvicorn "txtai.api:app". Then post to /agent:

curl -X POST http://localhost:8000/agent -H "Content-Type: application/json" \
  -d '{"name": "gtm", "text": "Who is best for the email-finder API?"}'

Call a tool yourself

You can call each tool without a model. You get the tool's answer as a dict:

from txtai_datacircle import datacircle_best_plans, run

print(datacircle_best_plans("email-finder", limit=3)["plans"])
print(run("datacircle_provider", {"slug": "Bright Data"}))

What the model reads

Each tool returns a dict. 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.

The tool returns {"error": "..."} with the API's message when the API gives no data, such as for an unknown slug. The error for an unknown API slug lists every valid slug. The tool checks each number from the model first. For a number out of range, the tool returns {"error": "..."} and makes no API call. If the network fails, the tool returns {"error": "..."} with the network error's message. The tool never raises an error. The agent keeps running. The model can call the tool again.

Network

Each tool call makes one HTTPS GET request to https://api.datacircle.dev/v1 and nothing else. The request holds only the tool's own arguments: no key and nothing from your chats. The API takes up to 60 calls a minute from one IP address. The API can ask the tool to wait. The tool then waits once, for a minute at most. Each call uses only Python's standard library. Nothing goes to disk.

Metadata

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

Built distribution (wheel)

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

Total release size: 23.8 kB

Release files / txtai_datacircle-0.1.0.tar.gz

Download URL txtai_datacircle-0.1.0.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cad97774a54b325990cfa797be7d93cdb2bb977bd67f9c379f62c3719283dddf
BLAKE2b-256 checksum
How to use checksums
d5e4fdd32feb1a47fdda7697df32f25c0801067d32a2048ea852d73ca74f3268
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 / txtai_datacircle-0.1.0-py3-none-any.whl

Download URL txtai_datacircle-0.1.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f78ccb9ea259d0bf8451418d540e462f7f82c8d1809e07f8c568eef5898fe06
BLAKE2b-256 checksum
How to use checksums
49c42a141c720b9f03dd4d1c2ee302b4add7090800b6fc7dbd96ac3b38b943fa
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 txtai-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