Skip to content

docs(api): applications endpoint docstrings + concept page#4232

Merged
mmabrouk merged 5 commits into
docs/age-3734-api-reference-epicfrom
docs/age-3734-applications-endpoints
May 11, 2026
Merged

docs(api): applications endpoint docstrings + concept page#4232
mmabrouk merged 5 commits into
docs/age-3734-api-reference-epicfrom
docs/age-3734-applications-endpoints

Conversation

@mmabrouk
Copy link
Copy Markdown
Member

Summary

Process notes

  • Pre-commit / gitleaks were not available in the sandbox where the agent worked. Commit was made with --no-verify. No secrets touched (docs + docstrings only). Hooks should be re-run locally before merge.
  • Agent died on API rate limit before pushing; this PR was opened from the salvaged worktree.

Related

  • Plan: tmp-docs-analysis/plan.md
  • Concept maps: tmp-docs-analysis/concept-map/runnables.md
  • Companion PRs (in flight): tracing, workflows, testsets, evaluations

Test plan

  • Endpoints exercised against eu.cloud.agenta.ai
  • Examples obfuscated; shapes match real responses
  • Reviewer: verify docstring wording on any endpoint with uncertainty
  • Reviewer: re-run pre-commit hooks locally before merge

- Add `docs/docs/reference/api-guide/05-applications.mdx` covering what an
  application is, versioning, invocation, deployment, simple vs structured
  endpoints, catalog, lifecycle, and an end-to-end worked example.
- Add docstrings to all 35 Applications FastAPI handlers (29 structured + 6
  simple), explaining what each endpoint does and when to pick it over a
  similar one.
- Add `Field(description=...)` to every field on the applications request and
  response models, including the catalog and simple-application models.
- Every endpoint was exercised against `eu.cloud.agenta.ai` before its
  docstring was written.
- Hooks skipped in sandbox; will be run locally before merge. No secrets
  in this PR (docs + docstrings only).
@linear
Copy link
Copy Markdown

linear Bot commented Apr 28, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

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

Project Deployment Actions Updated (UTC)
agenta-documentation Error Error May 11, 2026 7:07pm

Request Review

mmabrouk added 2 commits May 11, 2026 20:30
…plications-endpoints

Resolve conflict in api/oss/src/apis/fastapi/applications/models.py: response
envelopes now extend the new Support base class (from
oss.src.utils.exceptions) while keeping the documentation docstrings and
Field(description=...) introduced on this branch.

No conflicts elsewhere. Router and concept page pick up cleanly from main.
`POST /applications/variants/fork` now raises `400 Bad Request` when the
fork target is invalid (introduced in 77cb317 "workflow-related fork
issues"). Add a short note to the handler docstring so the generated
OpenAPI reflects the failure mode. No behavioral change.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c64a95b8-1181-42fd-8f40-fa3e854da26a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/age-3734-applications-endpoints

Comment @coderabbitai help to get the list of available commands and usage tips.

@mmabrouk
Copy link
Copy Markdown
Member Author

Reconciliation pass (wave 1)

Rebased onto the umbrella branch and ran the OpenAPI drift sweep. Live-API verification and inline review feedback are deferred to a later wave.

Umbrella merged in

a451ea3d9 — merge of docs/age-3734-versioning-guide into docs/age-3734-api-reference-epic (versioning concept page now landed in the umbrella).

Conflicts resolved

Single conflict file:

  • api/oss/src/apis/fastapi/applications/models.py — every response envelope (ApplicationResponse, ApplicationsResponse, variant + revision + simple + catalog responses) needed to extend the new Support base class introduced upstream by 9e168825a [chore] Add support ID/timestamp to suppressed exceptions. Resolution: keep the docstrings and Field(description=...) annotations from this branch, change the parent class from BaseModel to Support. No semantic change.

Other touched files in the merge applied cleanly (no overlap with the docs work).

OpenAPI drift sweep

Compared docs/docs/reference/openapi.json (latest umbrella spec) against the routes registered in api/oss/src/apis/fastapi/applications/router.py:

  • Endpoint count: 35 operations in spec, 35 routes in router. Operation IDs match 1:1.
  • No new endpoints, no removed endpoints, no renames.
  • Field changes: the only upstream change to application models/router since the branch was cut is Support (support_id, support_ts) on suppressed-exception payloads — a cross-cutting concern, not domain-specific, so it's not documented in the applications page or in per-field descriptions.
  • Behavior change worth noting: POST /applications/variants/fork now raises HTTPException(400) on VariantForkError (from 77cb317d9 [fix] workflow-related fork issues). Added a one-line note to the fork_application_variant docstring.

ag_config check

Per the AGE-3756 / 91d3b4a8c27f migration note, the documented payload shape on this branch is already data.parameters.{...}. Grepped both docs/docs/reference/api-guide/05-applications.mdx and api/oss/src/apis/fastapi/applications/ for ag_config — no matches.

Pushed

6532e6a22 on docs/age-3734-applications-endpoints.

Out of scope (deferred to verification wave)

  • Re-running each endpoint against eu.cloud.agenta.ai.
  • Applying any review comments (none yet on this PR).
  • Promoting draft → ready.

sidebar_position: 5
---

An **application** is a versioned resource that serves inference. It wraps a prompt template, model parameters, and JSON schemas for its inputs, outputs, and parameters. Every deployment in Agenta — a chatbot, a classifier, a structured-extraction endpoint — is an application.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would make it simple and then complex. An application can be a chat / completion. An application is versioned and wraps the parameters of the propmmt, that si...

something like this.

Also don't say every deployment in agenta is.. what does deployment mean even

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would also say that an application can be used in that it is invoked if its runnable or its configuratino used

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would also say custom workflows (and link) are application


## Catalog

Applications are created from a **template**. Templates describe the handler URI and the JSON schemas an application of that type uses. Built-in templates include `completion`, `chat`, `hook` (custom HTTP), and `code` (custom code).
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it's unclear what URI, json schema ..

I would before explain that application can be runned, and that the uri and json schema determine what are run

I would say also before somewhere taht agenta come with two application chat and completion

I would like to workflows also for core concept

mmabrouk added 2 commits May 11, 2026 21:04
Rewrites the intro to lead with the customer-facing model (chat /
completion endpoint), introduces the built-in application types up
front, and links custom workflows as another kind of application.
Splits the `data` payload section so `uri` + `schemas` are explained
as drivers of execution before the catalog is referenced. Removes
remaining em dashes.
@mmabrouk mmabrouk marked this pull request as ready for review May 11, 2026 19:06
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label May 11, 2026
@mmabrouk mmabrouk merged commit 1375626 into docs/age-3734-api-reference-epic May 11, 2026
14 of 15 checks passed
@dosubot dosubot Bot added the documentation Improvements or additions to documentation label May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-70ae.up.railway.app/w
Image tag pr-4232-f4ff67f
Status Failed
Railway logs Open logs
Logs View workflow run
Updated at 2026-05-11T19:21:06.531Z

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:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant