Structured output is like Devin’s notepad - it updates its notes as it works, and you can check these notes anytime. Currently, you can’t force Devin to update its notes, but you can request to see what it has written so far.

Progress Updates

Get updates on Devin’s progress during long-running tasks

Application Integration

Pipe Devin’s analysis and outputs into your applications with consistent JSON.

Requesting Structured Output

To use structured output, include your desired JSON schema in the prompt when creating a session.

{
  "prompt": "Please analyze this PR and provide results in the following format:\n{
    "analysis": {
       "issues": [],
       "summary": {
          "total_issues": 0
      }
    }
  }"
}

This schema is ideal for code analysis tasks where you need a structured report of issues and a summary.

Retrieving Structured Output

Use this endpoint to retrieve the structured output from a session. The structured output is returned in the structured_output field.

When using the Devin web app, you can quickly view the structured output at any time by pressing ⌘ + I (Command+I).

Best Practices

  • Include schema definition in initial prompt
  • Define expected update frequency (e.g., “Please update structured output after you add each new component to the website”)
  • Document value types and formats clearly
  • Use clear, descriptive field names so Devin knows what to write
  • Include example values in your schema
  • Use 10-30 second intervals for polling to avoid overwhelming the Devin API
  • Stop polling when session completes or errors out

Remember that Devin updates structured output on its own schedule - you can’t force an update, but you can request to see the latest notes at any time.

For questions about using structured output or to report issues, email support@cognition.ai.