Core domain type definitions for the Embabel Agent Framework, providing foundational data classes and interfaces for agent-based AI workflows including content assets, research entities, and person types with Jackson serialization and PromptContributor capabilities.
Most domain types implement PromptContributor from embabel-common, enabling them to format their data for LLM prompts via contribution(): String.
interface PromptContributor : PromptElement {
fun promptContribution(): PromptContribution
fun contribution(): String
}Usage:
val blog = Blog(
title = "AI Ethics",
author = "Dr. Smith",
content = "AI systems must..."
)
val promptText = blog.contribution()
// Use promptText in LLM requestsContentAsset serves as a marker for content types with textual content, timestamps, and prompt contribution capabilities.
interface ContentAsset : HasContent, Timestamped, PromptContributorImplementing Types:
Blog - Blog postsResearchReport - Research reports with linked resourcesMany classes are open, allowing extension with additional properties:
open class NewsStory(...)
open class ResearchTopic(...)
open class ResearchReport(...)
open class RelevantNewsStories(...)Example Extension:
class CategorizedNewsStory(
url: String,
title: String,
summary: String,
val category: String,
val publishDate: Instant
) : NewsStory(url, title, summary)All types use Jackson annotations for JSON serialization:
@JsonClassDescription - Class-level descriptions for schema generation@JsonPropertyDescription - Property-level descriptions@JsonDeserialize - Implementation classes for interfacesHasContent
├── Summary
└── ContentAsset (extends Timestamped, PromptContributor)
├── Blog
└── ResearchReport (also extends InternetResources, HasInfoString)
PromptContributor
├── ContentAsset (see above)
├── NewsStory (also extends Page)
└── RelevantNewsStories
Person
└── PersonImpl
ResearchTopic (open class)
ResearchTopics (container for ResearchTopic)ContentAsset - Content with timestamp and prompt contributionPerson - Person with nameHasContent - Types with content: String propertyPage - Web pages with url and summaryInternetResources - Container for internet resourcesPromptContributor - Types that can contribute to promptsTimestamped - Types with timestamp: InstantHasInfoString - Types with formatted info stringscontribution()tessl i tessl/maven-com-embabel-agent--embabel-agent-domain@0.3.0