Create agent job (v1)
Deprecated. Create an agent job to automate documentation updates, with automatic branch creation and pull request generation.
This endpoint creates an agent job based on provided messages and branch information. The job executes asynchronously and returns a streaming response with the execution details and results. If a branch doesn’t exist, the agent creates one. If files are edited successfully, a pull request is automatically created at the end of the job.Documentation Index
Fetch the complete documentation index at: https://mintlify-mintlify-vale-fixes-1773262443.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Rate limits
The agent API has the following limits:- 100 uses per Mintlify project per hour
Suggested usage
For best results, use the useChat hook from ai-sdk to send requests and handle responses.Authorizations
The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.
Path Parameters
Body
A list of messages to provide to the agent. A default system prompt is always prepended automatically, so you typically only need to include user messages.
The name of the Git branch that the agent should work on. If omitted, the agent generates a branch name based on the message content.
Control whether the pull request is created in draft or non-draft mode. When true, creates a draft pull request. When false (default), creates a regular pull request ready for review.
The AI model to use for the agent job. Use sonnet for faster, cost-effective processing. Use opus for more capable, but slower processing.
sonnet, opus Response
Agent job created successfully (streaming response). X-Session-Id Header is sent back in the response
Streaming response containing the agent job execution details and results.