3ed8c571cf9234df4d0d6ccc2ae7821b7bbb5fab
Code
GitCaddy AI Service
AI-powered code intelligence service for GitCaddy. Provides code review, documentation generation, issue triage, and agentic workflows.
Features
- Code Review: AI-powered pull request and commit reviews with security analysis
- Code Intelligence: Explain code, suggest fixes, summarize changes
- Issue Management: Auto-triage issues, suggest labels, generate responses
- Documentation: Generate docs for code, commit messages
- Agentic Workflows: Multi-step AI workflows for complex tasks
- Chat Interface: Interactive AI assistant for developers
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ GitCaddy Server (Go) │
│ └── AI Client (gRPC) │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ GitCaddy AI Service (.NET 9) │ │
│ │ ├── gRPC API │ │
│ │ ├── MarketAlly.AIPlugin (Multi-provider AI) │ │
│ │ └── License Validation │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Quick Start
Prerequisites
- .NET 9.0 SDK
- Docker (optional)
- API key for Claude, OpenAI, or Gemini
Development
# Clone the repository
git clone https://git.marketally.com/gitcaddy/gitcaddy-ai.git
cd gitcaddy-ai
# Set environment variables
export Providers__Claude__ApiKey="your-api-key"
# Run the service
cd src/GitCaddy.AI.Service
dotnet run
Docker
# Set environment variables
export CLAUDE_API_KEY="your-api-key"
export GITCADDY_AI_LICENSE="your-license-key"
# Run with Docker Compose
docker-compose up -d
Configuration
Configuration is done via appsettings.json or environment variables:
{
"AIService": {
"DefaultProvider": "Claude",
"DefaultModel": "claude-sonnet-4-20250514",
"MaxTokens": 4096,
"Temperature": 0.7
},
"Providers": {
"Claude": {
"ApiKey": "sk-ant-...",
"Enabled": true
},
"OpenAI": {
"ApiKey": "sk-...",
"Enabled": true
}
},
"License": {
"LicenseKey": "your-license-key"
}
}
Environment variable format: AIService__DefaultProvider=Claude
API Reference
The service exposes a gRPC API defined in protos/gitcaddy_ai.proto.
Code Review
rpc ReviewPullRequest(ReviewPullRequestRequest) returns (ReviewPullRequestResponse);
rpc ReviewCommit(ReviewCommitRequest) returns (ReviewCommitResponse);
Code Intelligence
rpc SummarizeChanges(SummarizeChangesRequest) returns (SummarizeChangesResponse);
rpc ExplainCode(ExplainCodeRequest) returns (ExplainCodeResponse);
rpc SuggestFix(SuggestFixRequest) returns (SuggestFixResponse);
Issue Management
rpc TriageIssue(TriageIssueRequest) returns (TriageIssueResponse);
rpc SuggestLabels(SuggestLabelsRequest) returns (SuggestLabelsResponse);
rpc GenerateIssueResponse(GenerateIssueResponseRequest) returns (GenerateIssueResponseResponse);
Documentation
rpc GenerateDocumentation(GenerateDocumentationRequest) returns (GenerateDocumentationResponse);
rpc GenerateCommitMessage(GenerateCommitMessageRequest) returns (GenerateCommitMessageResponse);
Workflows & Chat
rpc StartWorkflow(StartWorkflowRequest) returns (stream WorkflowEvent);
rpc ExecuteTask(ExecuteTaskRequest) returns (ExecuteTaskResponse);
rpc Chat(stream ChatRequest) returns (stream ChatResponse);
Client Libraries
.NET Client
using GitCaddy.AI.Client;
var client = new GitCaddyAIClient("http://localhost:5051");
var response = await client.ReviewPullRequestAsync(new ReviewPullRequestRequest
{
RepoId = 1,
PullRequestId = 42,
PrTitle = "Add feature X",
Files = { new FileDiff { Path = "src/foo.cs", Patch = "..." } }
});
Console.WriteLine(response.Summary);
Go Client
import ai "git.marketally.com/gitcaddy/gitcaddy-ai/go/gitcaddy-ai-client"
client, err := ai.NewClient("localhost:5051")
if err != nil {
log.Fatal(err)
}
defer client.Close()
resp, err := client.ReviewPullRequest(ctx, &pb.ReviewPullRequestRequest{
RepoId: 1,
PullRequestId: 42,
PrTitle: "Add feature X",
Files: []*pb.FileDiff{{Path: "src/foo.go", Patch: "..."}},
})
Licensing
GitCaddy AI is licensed under the Business Source License 1.1 (BSL-1.1).
License Tiers
| Tier | Features |
|---|---|
| Standard | Code review, code intelligence, documentation, chat |
| Professional | + Issue management, agentic workflows |
| Enterprise | + Custom models, audit logging, SSO integration |
Trial Mode
Without a license key, the service runs in trial mode with Standard tier features for 30 days.
Development
Building
dotnet build
Testing
dotnet test
Generating Proto Files
For Go client:
cd go/gitcaddy-ai-client
go generate
Integration with GitCaddy Server
Add the AI client to your GitCaddy server configuration:
[ai]
ENABLED = true
SERVICE_URL = http://localhost:5051
Support
- Documentation: https://docs.gitcaddy.com/ai
- Issues: https://git.marketally.com/gitcaddy/gitcaddy-ai/issues
- Email: support@marketally.com
License
Copyright 2026 MarketAlly. All rights reserved.
Licensed under the Business Source License 1.1 (BSL-1.1).
Business Source License 1.1
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.
-----------------------------------------------------------------------------
Parameters
Licensor: MarketAlly LLC
Licensed Work: GitCaddy AI Service
The Licensed Work is (c) 2026 MarketAlly LLC
Additional Use Grant: You may make use of the Licensed Work, provided that
you do not use the Licensed Work for an AI Service.
An "AI Service" is a commercial offering that allows
third parties (other than your employees and contractors
acting on your behalf) to access the functionality of
the Licensed Work by means of AI-powered code
intelligence features.
Change Date: Four years from the date the Licensed Work is published.
Change License: MIT License
-----------------------------------------------------------------------------
Terms
The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.
Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.
If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.
All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.
You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.
Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.
This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.
MarketAlly LLC hereby grants you permission to use this License's text to
license your works, and to refer to it using the trademark "Business Source
License", as long as you comply with the Covenants of Licensor below.
-----------------------------------------------------------------------------
Covenants of Licensor
In consideration of the right to use this License's text and the "Business
Source License" name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:
1. To specify as the Change License the MIT License, or a license
that is no less permissive than the MIT License, as the Change License.
2. To either: (a) specify an Additional Use Grant that does not impose any
additional restriction on use of the Licensed Work beyond those set forth
in this License, or (b) insert the text "None" to indicate no Additional
Use Grant.
3. To specify a Change Date.
4. Not to modify this License in any other way.
-----------------------------------------------------------------------------
Notice
The Business Source License (this document, or the "License") is not an Open
Source license. However, the Licensed Work will eventually be made available
under an Open Source License, as stated in this License.
Description
Releases
5
Languages
C#
94.9%
Go
3.1%
Makefile
1.2%
Dockerfile
0.8%