Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The Greptile SDK provides AIFunction tool wrappers compatible with Microsoft.Extensions.AI. These tools can be used with any IChatClient to give AI models codebase intelligence with natural language Q&A, code search, and repository indexing.
Available Tools
| Tool | Description |
|---|---|
AsQueryCodebaseTool() |
Ask natural language questions about a codebase and get AI-powered answers with source code references |
AsSearchCodebaseTool() |
Search a codebase for relevant code files, functions, and snippets without an AI explanation |
AsIndexRepositoryTool() |
Submit a repository for indexing (required before querying/searching) |
AsGetRepositoryStatusTool() |
Check the indexing status of a repository |
Usage Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Authentication
The Greptile API requires two tokens:
- Greptile API Key (required): Obtain from app.greptile.com
- GitHub/GitLab Token (optional): Personal access token for private repository access
1 2 | |
Repository Format
Tools that accept repositories use a comma-separated format: remote:branch:owner/repo
Examples:
- github:main:owner/repo
- gitlab:develop:org/project
- github:main:owner/repo1,github:main:owner/repo2 (multiple repos)