CoinGecko.Api.AiAgentHub 0.2.0-preview

This is a prerelease version of CoinGecko.Api.AiAgentHub.
dotnet add package CoinGecko.Api.AiAgentHub --version 0.2.0-preview
                    
NuGet\Install-Package CoinGecko.Api.AiAgentHub -Version 0.2.0-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoinGecko.Api.AiAgentHub" Version="0.2.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoinGecko.Api.AiAgentHub" Version="0.2.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="CoinGecko.Api.AiAgentHub" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoinGecko.Api.AiAgentHub --version 0.2.0-preview
                    
#r "nuget: CoinGecko.Api.AiAgentHub, 0.2.0-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoinGecko.Api.AiAgentHub@0.2.0-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoinGecko.Api.AiAgentHub&version=0.2.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CoinGecko.Api.AiAgentHub&version=0.2.0-preview&prerelease
                    
Install as a Cake Tool

CoinGecko.Api.AiAgentHub

Microsoft.Extensions.AI function tools backed by the CoinGecko REST API. Give any IChatClient-compatible agent CoinGecko capabilities in one line.

Install

dotnet add package CoinGecko.Api.AiAgentHub

Quickstart

using CoinGecko.Api;
using CoinGecko.Api.AiAgentHub;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddCoinGeckoApi(o => o.ApiKey = Environment.GetEnvironmentVariable("COINGECKO_API_KEY"));
using var sp = services.BuildServiceProvider();
var gecko = sp.GetRequiredService<ICoinGeckoClient>();

var tools = CoinGeckoAiTools.Create(gecko, new()
{
    Tools = CoinGeckoToolSet.CoinPrices | CoinGeckoToolSet.Trending | CoinGeckoToolSet.News,
});

IChatClient chat = /* OpenAIClient / AnthropicClient / Ollama / Azure — any IChatClient */;
var response = await chat.GetResponseAsync(
    "What's BTC at right now and what's trending?",
    new ChatOptions { Tools = tools.Cast<AITool>().ToArray() });

Console.WriteLine(response.Text);

Tool sets

Flag Tool name Notes
CoinPrices get_coin_prices Free
CoinSearch coin_search Free
MarketData get_top_markets Free
Trending get_trending Free
Categories get_categories Free
Nfts get_nft_collection Free
Derivatives get_derivatives Free
Onchain search_onchain_pools, get_onchain_token_prices Free; gated by IncludeOnchainTools
TopHolders get_top_token_holders Paid (Basic+); gated by IncludeOnchainTools; pass includePnl=true for average buy price + realized/unrealized PnL
News get_crypto_news Paid (Analyst+)

Preview status

Microsoft.Extensions.AI and CoinGecko's AI Agent Hub are both evolving rapidly. This package ships in 0.x and does not declare AOT compatibility (reflection-based AIFunctionFactory). A v0.2 source-gen alternative is planned.

License

MIT © msanlisavas

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-preview 64 4/28/2026
0.1.1-preview 59 4/21/2026
0.1.0-preview 54 4/21/2026