canonical: https://jentic.com/apis/buddyyen/buddyyen

# Buddyyen Buddy API

This Buddy CI/CD spec exposes the api.buddy.works surface for managing pipelines, workspace environment variables, and reading commits on connected repositories. It covers the current authenticated user, workspace-level environment CRUD, pipeline CRUD per project, and commit listing and lookup. The spec is a leaner companion to Buddy's broader project and action API and is suited to teams who only need pipeline management and Git history access.

## For AI agents

Manage Buddy CI/CD pipelines and workspace environment variables, and read commits from connected repositories.

## Scope

Does not handle action management, project creation, or branch and tag administration - use for pipeline CRUD, environment variables, and commit lookup only.

## Capabilities

- Identify the authenticated Buddy user via /user for token validation
- Create, list, update, and delete workspace-level environment variables for use across pipelines
- Create and list CI/CD pipelines for a Buddy project under a workspace
- Update or delete a pipeline by ID to reconfigure or retire it
- List commits on a project's connected Git repository
- Look up a single commit by revision SHA

## Use cases

### Pipeline Configuration as Code

Manage Buddy pipelines from a versioned configuration file rather than the Buddy UI by scripting createPipeline, updatePipeline, and deletePipeline against `/workspaces/{workspace}/projects/{project_name}/pipelines.` The same script can sync pipeline definitions across many projects, ensuring identical lint, test, and deploy stages everywhere. Useful for platform engineering teams standardising CI on Buddy.

Example prompt: Read the local pipeline.yaml, then for each pipeline call createPipeline or updatePipeline against `/workspaces/{workspace}/projects/{project_name}/pipelines`

### Workspace Environment Variable Rotation

Rotate workspace-level environment variables (deploy keys, registry tokens, API secrets) on a schedule by calling listEnvironments to retrieve the current set, then updateEnvironment to replace each value with a freshly minted secret. The bearer-token auth model lets a rotation job run on a service account so secrets never appear in chat or pull requests.

Example prompt: Call listEnvironments for the workspace, then for each variable matching the rotation policy call updateEnvironment with the new value

### Commit-Driven Release Notes

Build release notes by listing commits on the main branch via `/workspaces/{workspace}/projects/{project_name}/repository/commits` and grouping them by author or conventional-commit type. getCommit on a revision SHA returns the full commit message and metadata for richer note generation. This pattern keeps release notes faithful to what was actually deployed.

Example prompt: Call listCommits with the main branch and a date range, then for each SHA call getCommit and group the messages by conventional-commit prefix

### AI Agent Pipeline Operations Through Jentic

Allow an AI agent to manage Buddy pipelines and environment variables on behalf of a developer without holding the Buddy access token. Through Jentic, the agent searches by intent, loads the relevant operation schema, and executes against `/workspaces/{workspace}`/* endpoints. The bearer token is stored in your Jentic One instance and injected at execution time so credentials stay out of the agent's context.

Example prompt: Use Jentic to search 'create a Buddy pipeline', load the createPipeline schema, and execute against `/workspaces/{workspace}/projects/{project_name}/pipelines`

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/user` | Get the currently authenticated Buddy user |
| POST | `/workspaces/{workspace}/environment` | Create a workspace environment variable |
| GET | `/workspaces/{workspace}/environment` | List workspace environment variables |
| POST | `/workspaces/{workspace}/projects/{project_name}/pipelines` | Create a pipeline on a project |
| GET | `/workspaces/{workspace}/projects/{project_name}/pipelines` | List pipelines on a project |
| PATCH | `/workspaces/{workspace}/projects/{project_name}/pipelines/{pipeline_id}` | Update a pipeline |
| GET | `/workspaces/{workspace}/projects/{project_name}/repository/commits` | List repository commits |
| GET | `/workspaces/{workspace}/projects/{project_name}/repository/commits/{revision}` | Get a commit by revision SHA |

## Key resources

- **User** — Identify the currently authenticated Buddy user
- **Environments** — Manage workspace-level environment variables shared across pipelines
- **Pipelines** — Create, list, update, and delete CI/CD pipelines on a project
- **Repository Commits** — List recent commits and look up a single commit by revision SHA

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 70 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/buddyyen/buddyyen/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Buddy by hand means learning its bearer token auth against api.buddy.works and passing the workspace and project name through each pipeline and environment call yourself. Through Jentic you install once, import Buddy from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Buddy puts the workspace and project in the URL path (`/workspaces/{workspace}/projects/{project_name}/...`), so a rule can pin your agent to one workspace or project: it can create and patch pipelines and read commits there and nothing else. You choose the operations it may call, so read-only commit lookup can be allowed without pipeline changes unless you add them.
- **Credential handling:** Your Buddy personal access token is stored once, encrypted, by your own Jentic One instance and injected as the Authorization: Bearer header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'update a Buddy pipeline' or 'read a commit', and Jentic returns the matching Buddy operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Buddy** — Broader Buddy spec covering projects, actions, branches, and tags in addition to pipelines
- **Bubble Data API** — Stores Buddy pipeline status records in a no-code Bubble app for stakeholder dashboards
- **Buffer API** — Schedules release announcements after a successful Buddy pipeline run

## FAQ

### What authentication does this Buddy API use?

Buddy uses OAuth 2.0 bearer tokens. Generate a personal access token in Buddy under My Profile > Access Tokens and send Authorization: Bearer <token> on every request. The /user endpoint is a quick way to validate the token returns the expected account. Through Jentic the access token is stored encrypted in the vault and injected at execution time.

### Can I create a Buddy pipeline with this spec?

Yes. POST to `/workspaces/{workspace}/projects/{project_name}/pipelines` with a body specifying name, on (e.g., ON_EVERY_PUSH), refs (branches), and priority. Use updatePipeline at `/workspaces/{workspace}/projects/{project_name}/pipelines/{pipeline_id}` to reconfigure an existing pipeline. Note this spec does not include the action-management endpoints - see the buddy.works spec for those.

### What are the rate limits for the Buddy API?

Buddy applies per-workspace rate limits that are not encoded in the spec. The API returns 429 responses when a client exceeds its share, and clients should back off before retrying. See buddy.works/docs/api for current per-plan limits.

### How do I rotate a Buddy environment variable through Jentic?

Install the SDK with pip install jentic, search for 'update Buddy environment variable', load the updateEnvironment schema, and execute it against `/workspaces/{workspace}/environment/{environment_id}` with the new value. Jentic injects the bearer token from the vault and returns the updated record.

### Can I read commits from this API?

Yes. GET `/workspaces/{workspace}/projects/{project_name}/repository/commits` returns the commit list, with query parameters for branch and limit. `/repository/commits/{revision}` returns a single commit by its SHA. These endpoints proxy to the underlying Git host that Buddy is connected to.

### How is this different from the buddy.works spec?

Both target api.buddy.works. The buddyyen spec covers the user identity endpoint, pipelines, environment variables, and commit lookup (13 operations). The buddy.works spec is broader and includes project, action, branch, and tag management (24 operations). Pick whichever covers the operations your workflow needs.

### Can I limit what my agent is allowed to do with the Buddy API?

Yes. Because Buddy puts the workspace and project in the URL path, your self-hosted Jentic One instance lets you write a rule that pins the agent to a single workspace or project, so it can only touch the pipelines and commits you name. You also choose which operations it may call: you can allow read-only commit lookup through listCommits and getCommit while withholding createPipeline, updatePipeline, and deletePipeline, and withhold the environment-variable writes too. Your own rules decide which operations and stored credentials the agent uses, so it can do nothing beyond what you have permitted.
