Track AI adoption and impact
Tracking AI adoption provides visibility into how engineering teams are leveraging AI coding agents and the impact these tools have on delivery outcomes. Without visibility into AI usage patterns, teams struggle to understand adoption rates, measure productivity gains, and identify which teams or services benefit most from AI assistance.
This guide helps engineering managers, platform engineers, and product leaders answer critical questions about AI adoption:
- Adoption: Which teams and services are using AI coding agents?
- Impact: How does AI assistance affect PR throughput and cycle time?
- Effectiveness: Are AI-assisted PRs delivering faster or higher quality outcomes?
By the end of this guide, you will have dashboards that track AI adoption metrics, enabling you to understand usage patterns, measure productivity impact, and make informed decisions about AI tool investments across your organization.
Common use cases
- Compare PR throughput and cycle time between AI-assisted and traditional workflows.
- Identify teams and services with the highest AI adoption rates.
- Track AI usage trends over time to understand adoption patterns.
Prerequisites
This guide assumes the following:
- You have a Port account and have completed the onboarding process.
- Port's GitHub integration is installed in your account.
- The
githubPullRequestandgithubRepositoryblueprints are already created (these are created when you install the GitHub integration).
Set up data model
We will update existing blueprints to support AI adoption tracking. The githubPullRequest and githubRepository blueprints should already exist from the GitHub integration installation.
Update the GitHub repository blueprint
We need to ensure the repository blueprint includes the language, visibility and last push property for better service identification.
-
Go to the Builder page of your portal.
-
Find the
githubRepositoryblueprint and click on it. -
Click on the
{...}button in the top right corner, and chooseEdit JSON. -
Copy and paste the following JSON schema:
GitHub repository blueprint (click to expand)
{
"identifier": "githubRepository",
"title": "Repository",
"icon": "Github",
"ownership": {
"type": "Direct"
},
"schema": {
"properties": {
"readme": {
"title": "README",
"type": "string",
"format": "markdown"
},
"url": {
"icon": "DefaultProperty",
"title": "Repository URL",
"type": "string",
"format": "url"
},
"defaultBranch": {
"title": "Default branch",
"type": "string"
},
"last_push": {
"icon": "GitPullRequest",
"title": "Last push",
"description": "Last commit to the main branch",
"type": "string",
"format": "date-time"
},
"visibility": {
"type": "string",
"title": "Visibility"
},
"language": {
"type": "string",
"title": "Language"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"service": {
"title": "Service",
"target": "service",
"required": false,
"many": false
}
}
} -
Click
Saveto update the blueprint.
Update the GitHub pull request blueprint
We need to add the created_by_ai_agent property to track AI-assisted PRs.
-
Go to the Builder page of your portal.
-
Find the
githubPullRequestblueprint and click on it. -
Click on the
{...}button in the top right corner, and chooseEdit JSON. -
Copy and paste the following JSON schema:
Updated GitHub pull request blueprint (click to expand)
{
"identifier": "githubPullRequest",
"title": "Pull Request",
"icon": "Github",
"schema": {
"properties": {
"status": {
"title": "Status",
"type": "string",
"enum": [
"merged",
"open",
"closed"
],
"enumColors": {
"merged": "purple",
"open": "green",
"closed": "red"
}
},
"closedAt": {
"title": "Closed at",
"type": "string",
"format": "date-time"
},
"updatedAt": {
"title": "Updated at",
"type": "string",
"format": "date-time"
},
"mergedAt": {
"title": "Merged at",
"type": "string",
"format": "date-time"
},
"createdAt": {
"title": "Created at",
"type": "string",
"format": "date-time"
},
"link": {
"format": "url",
"type": "string",
"title": "Link"
},
"leadTimeHours": {
"type": "number",
"title": "Lead Time Hours"
},
"pr_age": {
"icon": "DefaultProperty",
"type": "number",
"title": "PR Age"
},
"cycle_time": {
"type": "number",
"title": "Cycle Time"
},
"created_by_ai_agent": {
"type": "boolean",
"title": "Created By AI Agent",
"description": "Determines whether or not the PR was created by an AI agent such as copilot, claude or devin"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"repository": {
"title": "Repository",
"target": "githubRepository",
"required": false,
"many": false
}
}
}Properties to add for existing PR blueprintIf you're updating an existing pull request blueprint, make sure to add the
created_by_ai_agentproperty if it doesn't already exist. -
Click
Saveto update the blueprint.
Update integration mapping
Now we'll configure the GitHub integration to detect AI-assisted PRs and ingest the necessary data.
-
Go to your Data Source page.
-
Select the GitHub integration.
-
Add or update the following YAML block in the editor:
GitHub integration configuration (Click to expand)
resources:
- kind: repository
selector:
query: 'true'
teams: true
port:
entity:
mappings:
identifier: .full_name
title: .name
blueprint: '"githubRepository"'
properties:
readme: file://README.md
url: .html_url
defaultBranch: .default_branch
last_push: .pushed_at
visibility: .visibility
language: .language
- kind: pull-request
selector:
query: 'true'
closedPullRequests: true
port:
entity:
mappings:
identifier: .id|tostring
title: .title
blueprint: '"githubPullRequest"'
properties:
status: .status
closedAt: .closed_at
updatedAt: .updated_at
mergedAt: .merged_at
createdAt: .created_at
link: .html_url
created_by_ai_agent: .user.login | ascii_downcase | test("(copilot|claude|devin)")
leadTimeHours: >-
(.created_at as $createdAt | .merged_at as $mergedAt | ($createdAt
| sub("\\..*Z$"; "Z") | strptime("%Y-%m-%dT%H:%M:%SZ") | mktime)
as $createdTimestamp | ($mergedAt | if . == null then null else
sub("\\..*Z$"; "Z") | strptime("%Y-%m-%dT%H:%M:%SZ") | mktime end)
as $mergedTimestamp | if $mergedTimestamp == null then null else
(((($mergedTimestamp - $createdTimestamp) / 3600) * 100 | floor) /
100) end)
pr_age: >-
((now - (.created_at | sub("\\.[0-9]+Z$"; "Z") | fromdateiso8601))
/ 86400) | round
cycle_time: >-
if .merged_at then (((.merged_at | sub("\\.[0-9]+Z$"; "Z") |
fromdateiso8601) - (.created_at | sub("\\.[0-9]+Z$"; "Z") |
fromdateiso8601)) / 86400 | round) else null end
relations:
repository: .head.repo.full_nameAI agent detectionThe mapping uses a regex pattern to detect AI agents by checking if the PR creator's username contains "copilot", "claude", or "devin" (case-insensitive). You can customize this pattern to match your organization's AI agent naming conventions.
-
Click
Save & Resyncto apply the mapping.
Visualize metrics
Once the GitHub data is synced, we can create a dedicated dashboard in Port to monitor and analyze AI adoption and impact metrics.
Create a dashboard
- Navigate to your software catalog.
- Click on the
+ Newbutton in the left sidebar. - Select New dashboard.
- Name the dashboard AI Impact.
- Click
Create.
We now have a blank dashboard where we can start adding widgets to visualize AI adoption metrics.
Add widgets
In the new dashboard, create the following widgets:
Avg PR throughput (with AI) (click to expand)
-
Click
+ Widgetand select Number Chart. -
Title:
Avg PR Throughput (With AI). -
Select
Count entitiesChart type and choose Pull Request as the Blueprint. -
Select
countfor the Function. -
Add this JSON to the Dataset filter editor:
{
"combinator": "and",
"rules": [
{
"value": "merged",
"property": "status",
"operator": "="
},
{
"value": true,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Select
customas the Unit and inputprsas the Custom unit. -
Click
Save.
Avg PR throughput (without AI) (click to expand)
-
Click
+ Widgetand select Number Chart. -
Title:
Avg PR Throughput (Without AI). -
Select
Count entitiesChart type and choose Pull Request as the Blueprint. -
Select
countfor the Function. -
Add this JSON to the Dataset filter editor:
{
"combinator": "and",
"rules": [
{
"value": "merged",
"property": "status",
"operator": "="
},
{
"value": false,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Select
customas the Unit and inputprsas the Custom unit. -
Click
Save.
Avg PR cycle time (AI-assisted PRs) (click to expand)
-
Click
+ Widgetand select Number Chart. -
Title:
Avg PR Cycle Time (AI-assisted PRs). -
Select
Aggregate Property (All Entities)Chart type and choose Pull Request as the Blueprint. -
Select
cycle_timeas the Property. -
Select
averagefor the Function. -
Add this JSON to the Dataset filter editor:
{
"combinator": "and",
"rules": [
{
"value": "merged",
"property": "status",
"operator": "="
},
{
"value": true,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Select
customas the Unit and inputdaysas the Custom unit. -
Click
Save.
Avg PR cycle time (without AI assistance) (click to expand)
-
Click
+ Widgetand select Number Chart. -
Title:
Avg PR Cycle Time (Without AI Assistance). -
Select
Aggregate Property (All Entities)Chart type and choose Pull Request as the Blueprint. -
Select
cycle_timeas the Property. -
Select
averagefor the Function. -
Add this JSON to the Dataset filter editor:
{
"combinator": "and",
"rules": [
{
"value": "merged",
"property": "status",
"operator": "="
},
{
"value": false,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Select
customas the Unit and inputdaysas the Custom unit. -
Click
Save.
PR cycle time with AI weekly trend (click to expand)
-
Click
+ Widgetand select Line Chart. -
Title:
PR Cycle Time with AI Weekly Trend. -
Select
Aggregate Property (All Entities)Chart type and choose Pull Request as the Blueprint. -
Input
Avg Cycle Timeas the Y axis Title. -
Select
cycle_timeas the Property. -
Select
averagefor the Function. -
Add this JSON to the Additional filters editor:
{
"combinator": "and",
"rules": [
{
"value": "merged",
"property": "status",
"operator": "="
},
{
"value": [
"Claude",
"GitHub Copilot"
],
"property": "created_by",
"operator": "in"
}
]
} -
Input
Dateas the X axis Title. -
Select
createdAtfor Measure time by. -
Set Time Interval to
weekand Time Range toIn the past 30 days. -
Click
Save.
PRs created with AI (click to expand)
- Click
+ Widgetand select Pie chart. - Title:
PRs Created with AI. - Choose the Pull Request blueprint.
- Under
Breakdown by property, select the Created By AI Agent property. - Click Save.
Top services using AI (click to expand)
-
Click
+ Widgetand select Table. -
Title the widget Top Services Using AI.
-
Choose the Pull Request blueprint.
-
Add this JSON to the Initial filters editor:
{
"combinator": "and",
"rules": [
{
"value": true,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Click Save to add the widget to the dashboard.
-
Click on the
...button in the top right corner of the table and select Customize table. -
In the top right corner of the table, click on
Manage Propertiesand add the following properties:- Repository: The related repository name.
- Title: The title of the pull request.
- Status: The status of the pull request.
- Link: The URL to the pull request.
- Branch: The branch name (if available).
-
Click on the Group by any Column button in the top right corner and select Repository.
-
Click on the save icon in the top right corner of the widget to save the customized table.
Top teams using AI (click to expand)
-
Click
+ Widgetand select Bar Chart. -
Title:
Top Teams Using AI. -
Choose the Pull Request blueprint.
-
Under
Breakdown by property, select the Owning Team property (this is typically available via the repository relation). -
Add this JSON to the Additional filters editor:
{
"combinator": "and",
"rules": [
{
"value": true,
"property": "created_by_ai_agent",
"operator": "="
}
]
} -
Click Save.