Learn how to effectively use structured output and interact with Devin sessions via API
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.
To use structured output, include your desired JSON schema in the prompt when creating a session.
Make sure to tell Devin to update the structured output whenever something relevant happens.
Copy
Ask AI
{ "prompt": "Review this PR and provide updates in this format. Please update the structured output immediately whenever you find new issues, have suggestions, or change your approval status:\n{ "issues": [ { "file": "src/App.tsx", "line": 42, "type": "bug", "description": "Memory leak in useEffect cleanup" } ], "suggestions": [ "Add error handling for API calls", "Split component into smaller parts" ], "approved": false }"}
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.