Skip to content

doc(docs): Update documentation for v96.0 unified invoke API#4144

Merged
mmabrouk merged 3 commits intorelease/v0.96.2from
docs/update-v96-invoke-api
Apr 15, 2026
Merged

doc(docs): Update documentation for v96.0 unified invoke API#4144
mmabrouk merged 3 commits intorelease/v0.96.2from
docs/update-v96-invoke-api

Conversation

@mmabrouk
Copy link
Copy Markdown
Member

@mmabrouk mmabrouk commented Apr 14, 2026

Summary

  • Updates all documentation to reflect the v96.0 unified /v0/invoke endpoint, replacing the legacy /generate, /generate_deployed, /test, and /run endpoints
  • Updates config fetch examples from /api/variants/configs/fetch to /api/preview/applications/revisions/retrieve
  • Adds a changelog entry with a full migration guide (before/after examples for deployed invoke, chat, and draft testing)

Files changed

  • Proxy calls doc — new endpoint, request/response format, session tracking
  • Fetch prompt doc — updated REST API endpoint and request shapes, added selector key info
  • Multimodal content doc — updated all gateway examples
  • Concepts doc — added environment key resolution explanation
  • Quick start docs (x2) — updated JS/TS API examples
  • GitHub automations doc — updated curl command
  • Changelog — new v0.96.0 entry in main.mdx + detailed unified-invoke-api.mdx migration guide

Test plan

  • Verify docs build successfully (cd docs && npm run build)
  • Review code examples for correctness against actual API behavior
  • Check all internal links resolve properly

Open with Devin

Update all documentation to reflect the v96.0 API changes:
- Unified /v0/invoke endpoint replacing /generate, /generate_deployed, /test, /run
- New request format with data/references/selector structure
- New response format with data.outputs, trace_id, span_id, status
- Updated config fetch endpoint from /variants/configs/fetch to /preview/applications/revisions/retrieve
- Added changelog entry with full migration guide
- Added info boxes explaining the selector key concept
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Apr 14, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Apr 14, 2026 5:55pm

Request Review

@dosubot dosubot bot added the documentation Improvements or additions to documentation label Apr 14, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@mmabrouk mmabrouk requested a review from jp-agenta April 14, 2026 17:51
@mmabrouk mmabrouk enabled auto-merge April 14, 2026 17:52
@mmabrouk mmabrouk disabled auto-merge April 14, 2026 17:52
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 new potential issues.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment on lines +231 to +238
application_ref: {
slug: 'my-app'
},
environment_ref: {
slug: 'staging',
version: 1, // Optional: omit to fetch latest
id: null
version: 1 // Optional: omit to fetch latest
},
application_ref: {
slug: 'my-app',
version: null,
id: null
}
key: 'my-app.revision'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 API examples for environment-based retrieval send both application_ref and environment_ref, causing 400 error

The JS/TS and curl examples for fetching config by environment include application_ref alongside environment_ref + key. The API router (api/oss/src/apis/fastapi/applications/router.py:1198-1204) explicitly rejects this combination with a 400 error: "Provide either application refs or environment refs with key, not both." The SDK correctly sends only environment_ref + key for environment lookups (sdk/agenta/sdk/managers/shared.py:423-432), omitting application_ref entirely. Users following these doc examples will get 400 errors.

Affected code in JS/TS example
const requestData = {
    application_ref: {       // ← should NOT be included
      slug: 'my-app'
    },
    environment_ref: {
      slug: 'staging',
      version: 1
    },
    key: 'my-app.revision'
};

Should be:

const requestData = {
    environment_ref: {
      slug: 'staging',
      version: 1
    },
    key: 'my-app.revision'
};
Prompt for agents
In the 'Fetching by Environment Reference' section of 02-fetch-prompt-programatically.mdx, both the JS/TS example (around lines 231-238) and the curl example (around lines 255-262) include application_ref alongside environment_ref and key in the request body. The API at api/oss/src/apis/fastapi/applications/router.py:1198-1204 rejects requests that include both application refs and environment refs. Remove the application_ref field from these requests, keeping only environment_ref and key. The same issue also appears in:
- docs/docs/getting-started/02-quick-start.mdx (lines 295-301)
- docs/docs/prompt-engineering/01-quick-start.mdx (lines 183-189)
- docs/docs/prompt-engineering/integrating-prompts/05-github.mdx (lines 213-218)
All of these files need the same fix: remove application_ref when doing environment-based retrieval.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +183 to +189
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production',
id: null
slug: 'production'
},
application_ref: {
slug: 'testprompt',
id: null
}
key: 'testprompt.revision'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Quick-start JS/TS example sends application_ref with environment_ref, causing 400 error

Same issue as in the fetch-prompt docs: the JS/TS API example includes application_ref alongside environment_ref + key, which the API rejects at api/oss/src/apis/fastapi/applications/router.py:1198-1204. Users following this quick-start guide will get a 400 error.

Suggested change
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production',
id: null
slug: 'production'
},
application_ref: {
slug: 'testprompt',
id: null
}
key: 'testprompt.revision'
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production'
},
key: 'testprompt.revision'
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +295 to +301
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production',
id: null
slug: 'production'
},
application_ref: {
slug: 'testprompt',
id: null
}
key: 'testprompt.revision'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Getting-started JS/TS example sends application_ref with environment_ref, causing 400 error

Same issue: the JS/TS API example includes application_ref alongside environment_ref + key, which the API rejects at api/oss/src/apis/fastapi/applications/router.py:1198-1204. Users following this getting-started guide will get a 400 error.

Suggested change
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production',
id: null
slug: 'production'
},
application_ref: {
slug: 'testprompt',
id: null
}
key: 'testprompt.revision'
application_ref: {
slug: 'testprompt'
},
environment_ref: {
slug: 'production'
},
key: 'testprompt.revision'
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 212 to 219
"application_ref": {
"slug": "your-app-slug",
"version": null,
"id": null
"slug": "your-app-slug"
},
"environment_ref": {
"slug": "production",
"version": null,
"id": null
}
"slug": "production"
},
"key": "your-app-slug.revision"
}' > prompt-config.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 GitHub workflow curl example sends application_ref with environment_ref, causing 400 error

The GitHub Actions workflow example sends both application_ref and environment_ref + key in the curl command. The API at api/oss/src/apis/fastapi/applications/router.py:1198-1204 rejects this combination. CI workflows following this example will fail with a 400 error when trying to fetch the prompt config.

Suggested change
"application_ref": {
"slug": "your-app-slug",
"version": null,
"id": null
"slug": "your-app-slug"
},
"environment_ref": {
"slug": "production",
"version": null,
"id": null
}
"slug": "production"
},
"key": "your-app-slug.revision"
}' > prompt-config.json
"environment_ref": {
"slug": "production"
},
"key": "your-app-slug.revision"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@jp-agenta jp-agenta changed the base branch from main to release/v0.96.2 April 15, 2026 06:19
@mmabrouk mmabrouk merged commit 1b0a523 into release/v0.96.2 Apr 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant