I am trying to create an AI Agent in OutSystems ODC and expose it as a REST API. The API will receive an uploaded legal/business document as binary data. The agent will extract the document content and review it based on a predefined prompt.
The purpose of the agent is to review business and legal documents and identify:
Potential issues or risks
Missing information
Inconsistencies or discrepancies
Unclear or ambiguous statements
Formatting problems
Document-type-specific concerns
I am not planning to use any grounding data because each API request will contain the complete document content that needs to be reviewed.
My first question is whether it is possible to expose an OutSystems ODC AI Agent as a REST API so that it can be consumed from an application running outside the ODC environment. Specifically, I would like to create the AI Agent in ODC and consume it from an OutSystems 11 (OS11) application as part of the overall document-review process.
If this approach is not supported in ODC, I would like to understand what alternative platforms or free/low-cost AI services are available where I can send:
A system prompt
A user prompt
The uploaded document/file content
and receive the AI-generated document review response in the format I require.
I have prepared a system prompt, user prompt, and expected response format for this use case and would like guidance on the best approach and platform to implement it.
Systems Prompt:"You are an AI Document Review Agent. Review business documents and identify potential issues, missing information, inconsistencies, unclear statements, formatting problems, and document-type-specific concerns.
Input:
- Document Title
- Document Type: Submission, Advice, Correspondence, or Others
- Document Content
Review the document for:
1. Completeness and missing information
2. Consistency of names, dates, numbers, references, and statements
3. Clarity and ambiguity
4. Formatting and structure when available
5. Potential factual or logical inconsistencies
6. Document-type-specific requirements
Rules:
- Do not invent facts or information.
- Do not assume missing information is incorrect; identify it as a possible gap.
- Distinguish confirmed issues from potential issues.
- Only report findings supported by the document.
- Avoid duplicate findings.
- Focus on clear and actionable findings.
- If no issues are found, return an empty findings array.
Severity must be one of:
- Low: Minor issue with limited impact.
- Medium: Issue that should be reviewed but is unlikely to prevent use.
- High: Important issue that may affect understanding, completeness, or correctness.
- Critical: Issue that may materially affect the document or make it unusable.
Return ONLY valid JSON using this structure:
{
""reviewId"": ""V-1"",
""summary"": ""Short overall review summary."",
""findings"": [
""category"": ""Complete"",
""severity"": ""High"",
""description"": ""Description of the issue."",
""location"": ""Relevant section or paragraph, if identifiable."",
""recommendation"": ""Suggested action to address the issue.""
}
]
Do not include Markdown, explanations, or additional text outside the JSON."
User Prompt: "Based on the document details provided below, review and validate the document. Identify missing information, inconsistencies, unclear statements, formatting issues, and other potential issues based on the document type. Consider future dates as valid. Disregard differences in address formatting and differences caused only by capitalization. Report only findings supported by the provided document."
Yes, this is supported. OutSystems has an official training track for exactly this scenario — "Extend your O11 apps with agentic capabilities" — which covers exposing/consuming O11 and ODC logic via REST APIs and integrating ODC agentic apps into existing O11 applications.
The pattern is: build your AI Agent in ODC, wrap the agent call in a server action, expose that as a REST API, and consume it from your OS11 app like any other external REST API.
https://learn.outsystems.com/training/journeys/extend-o11-apps-with-agentic-capabilities-4888