Overview
The agent types module defines interfaces for handling agent responses, citations, and content blocks. These types are used throughout the OneGlance system to structure AI agent outputs and manage source citations.AgentCitation
Represents a citation or reference within agent-generated content.The citation text to display
Optional URL the citation links to
Optional tooltip or title text for the citation
Optional accessibility label for screen readers
Visual style of the citation. Determines how it’s rendered in the UI.
Usage
Citations are used to link agent responses back to their source material:ContentBlock- as part of content block citationsExtractionResult- as inline citations in extracted content
ContentBlock
Represents a structured block of content with associated metadata and citations.The main text content of the block
HTML tag or identifier for the content block (e.g., “p”, “h1”, “ul”)
Optional array of citations associated with this content block
Usage
Content blocks structure agent responses into semantic chunks:ExtractionResult- array of content blocks from extraction
ExtractionResult
Complete result from an agent extraction operation, including the response text, structured content, citations, and sources.The raw text response from the agent
Structured content blocks parsed from the response
Citations that appear inline within the response text
Source documents or URLs referenced in the response. Each source contains a URL, title, and other metadata.
Whether to display a “Show Sources” button in the UI
Array of error messages encountered during extraction
Usage
This type represents the complete output from agent content extraction:- Agent response processing pipelines
- UI components that display agent-generated content
AskPromptResult
Result from executing a prompt against an AI model, including the response and associated metadata.Unique identifier of the user who submitted the prompt
Unique identifier of the workspace context
Unique identifier for this specific prompt
The original prompt text submitted to the AI model
The AI model’s response text
Sources cited in the response
Usage
- Prompt execution workflows
- Response storage and retrieval
Provider
Supported AI model providers.Provider type is a union of supported AI model provider identifiers:
"chatgpt"- OpenAI’s ChatGPT"claude"- Anthropic’s Claude"perplexity"- Perplexity AI"gemini"- Google’s Gemini"ai-overview"- Google AI Overview
Usage
- Model selection and filtering
- Analysis record identification
- Results aggregation by provider
AgentResult
Result wrapper for agent operations, indicating success or failure.Whether the agent operation succeeded or failed
Array of prompt results (may be empty if rejected)
Usage
- Multi-model prompt execution
- Error handling in agent workflows
ModelResult
Aggregates results from multiple AI model providers.Usage
- Multi-model analysis workflows
- Comparing responses across different AI providers
- Aggregating results for dashboard displays
Related Types
- Analysis Types - Analysis records that include agent results
- Entity Types - Competitor and brand entities