Enable Agent P
Agent P is included with Sonatype AI Developer. On a self-hosted instance, install an AI Developer license first. See Getting Started with AI Developer.
Before registering the GitHub App, set and force the instance’s base URL. This step requires the Edit System Configuration and Users permission, which is included in the System Administrator role. Agent P uses the configured URL in the GitHub App and to validate the audience of OIDC tokens from your CI environment.
Set and force the instance base URL
Set and force your instance’s base URL before creating the GitHub App or onboarding repositories. Agent P uses this URL:
In the GitHub App configuration, including its home page, callback, and setup URLs.
As the expected audience in the OIDC tokens sent by your CI environment. Your instance rejects tokens with a different audience.
Set and force the base URL with the REST API:
curl -u admin:admin123 -X PUT -H 'Content-Type: application/json' \\
-d '{"baseUrl":"https://your-iq-server.example.com/","forceBaseUrl":true}' \\
http://localhost:8070/api/v2/configForcing the base URL ensures the GitHub App uses the correct public address. Without this setting, the instance may use the address in your browser when you register the app. If you access the product through localhost or an internal hostname, GitHub may be configured to send users to an address they cannot reach.
Note
Changing the base URL after onboarding repositories breaks their Agent P workflows. Each workflow uses the base URL that was configured when the repository was onboarded as its token audience. Your instance rejects tokens addressed to a different URL. Set the correct base URL before connecting GitHub, and do not change it after onboarding repositories.
When a GitHub App gets a webhook
A GitHub App receives the webhook events Agent P needs only if it is registered under Root Organization > Source Control after AI Developer is active on the instance. An App registered earlier does not receive the required webhook, even after AI Developer is enabled.
IQ Server cannot add the webhook to an existing App. Delete the earlier App, then register a new one under Orgs and Policies > Root Organization > Source Control. The Agent P setup page displays a notice if it detects an App that was registered too early.
Confirm Agent P is available
Agent P (Preview) appears in AI Developer when AI Developer is licensed or enabled through opt-in and the Agent P launch feature is on. Set the instance’s base URL before registering the GitHub App; this setup is required to connect and run Agent P.
If Agent P does not appear:
Confirm that your license includes AI Developer or that someone has accepted the AI Developer opt-in terms. See Agent P in Sonatype AI Developer.
Confirm that your instance uses an external PostgreSQL database. AI Developer and Agent P are not available with the embedded H2 database.
Confirm the Agent P launch feature hasn't been turned off for your instance. An administrator can turn it back on with
POST /api/v2/config/features/iqAgentPLaunched.