Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The Braintrust SDK provides AIFunction tool wrappers compatible with Microsoft.Extensions.AI. These tools can be used with any IChatClient to give AI models access to Braintrust's prompt management and experiment tracking capabilities.
Available Tools
| Method | Tool Name | Description |
|---|---|---|
AsListProjectsTool() |
ListProjects |
Lists available projects |
AsListPromptsTool() |
ListPrompts |
Lists prompt templates, optionally filtered by project |
AsGetPromptTool() |
GetPrompt |
Retrieves a specific prompt by slug |
AsListExperimentsTool() |
ListExperiments |
Lists experiments, optionally filtered by project |
Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Tool Details
ListProjects
Returns a JSON array of projects with id and name fields.
1 | |
ListPrompts
Returns a JSON array of prompts with id, name, slug, description, and tags fields.
Accepts an optional projectName parameter to filter by project.
1 | |
GetPrompt
Returns a single prompt's details by slug, including id, name, slug, description,
tags, function_type, and created date.
1 | |
ListExperiments
Returns a JSON array of experiments with id, name, and created fields.
Accepts an optional projectName parameter to filter by project.
1 | |