datacircle

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Datacircle tools for Microsoft Agent Framework for Go

Find the best GTM APIs. We benchmark all the GTM APIs and we put the results on our website: https://datacircle.dev

This Go module gives Microsoft Agent Framework for Go agents four function tools on Datacircle's open API, https://api.datacircle.dev/v1. 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. Sort 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

go get github.com/waynehamadi/agent-framework-go-datacircle

It needs Microsoft Agent Framework for Go v0.1.0 or later, and Go 1.26.

Use the tools

import datacircle "github.com/waynehamadi/agent-framework-go-datacircle"

a := openaiprovider.NewChatCompletionsAgent(openai.NewClient(), openaiprovider.AgentConfig{
	Model:        "gpt-5",
	Instructions: "You help choose GTM APIs.",
	Config:       agent.Config{Tools: datacircle.NewTools(nil)},
})
resp, err := a.RunText(ctx, "Find the 3 best providers for the email-finder API.").Collect()

Every provider takes the tools the same way, in its agent.Config. To give them on one run only, pass each one with agent.WithTool.

Each tool has its own constructor: NewListAPIsTool, NewBestPlansTool, NewSearchPlansTool and NewProviderTool. Give a model only the ones it needs. Each one is a tool.FuncTool, so you can also call it yourself, or serve it on an MCP server with mcptool.AddTool:

res, err := datacircle.NewBestPlansTool(nil).Call(ctx, `{"slug":"email-finder","limit":3}`)

Each tool gives back a JSON object. Each plan comes with its rank, provider, plan, score, price per 1,000 (perThousand, in dollars) and its page on datacircle.dev. That page lists every field. A tool also takes a plain string as its first field, like an API's slug.

When the API gives no data, like for a slug it doesn't know, the tool's result is {"error": ...} with the API's own words, so the model can call again. A network failure is the call's error: the agent shows the model its text and the run goes on.

datacircle.Config sets the HTTPClient the tools use (a timeout, a proxy). nil uses http.DefaultClient.

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, no config, nothing from your chats. The API takes up to 60 calls a minute from one IP address. The tool waits once, for a minute at most, when the API asks the tool to wait. The module depends only on Microsoft Agent Framework for Go and golang.org/x/text, and stores nothing.

MIT license.

Documentation

Overview

Package datacircle gives agents of Microsoft Agent Framework for Go four function tools on Datacircle's open API: find the best GTM APIs.

The API needs no key: https://api.datacircle.dev/v1 (its spec: https://api.datacircle.dev/v1/openapi.json). More at https://datacircle.dev

Index

Constants

View Source
const (
	ListAPIsName    = "datacircle_list_apis"
	BestPlansName   = "datacircle_best_plans"
	SearchPlansName = "datacircle_search_plans"
	ProviderName    = "datacircle_provider"
)
View Source
const BaseURL = "https://api.datacircle.dev/v1"

BaseURL is the API's address.

View Source
const Version = "0.1.0"

Version is this module's version, sent in each call's User-Agent.

Variables

This section is empty.

Functions

func NewBestPlansTool

func NewBestPlansTool(cfg *Config) tool.FuncTool

NewBestPlansTool gives datacircle_best_plans: GET /apis/{slug}/best.

func NewListAPIsTool

func NewListAPIsTool(cfg *Config) tool.FuncTool

NewListAPIsTool gives datacircle_list_apis: GET /apis.

func NewProviderTool

func NewProviderTool(cfg *Config) tool.FuncTool

NewProviderTool gives datacircle_provider: GET /providers/{slug}.

func NewSearchPlansTool

func NewSearchPlansTool(cfg *Config) tool.FuncTool

NewSearchPlansTool gives datacircle_search_plans: GET /plans.

func NewTools

func NewTools(cfg *Config) []tool.Tool

NewTools gives the four tools, datacircle_list_apis, datacircle_best_plans, datacircle_search_plans and datacircle_provider, for an agent's Config.Tools or agent.WithTool on one run.

Types

type Config

type Config struct {
	BaseURL    string
	HTTPClient *http.Client
}

Config sets where the tools call. Its zero value, or nil, calls BaseURL with http.DefaultClient.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL