Skip to content

Ontology API

Strategos.Ontology is a type-safe semantic graph for domain modelling: Object Types, Properties, Links, Actions, Events, Lifecycles, and Interfaces declared in C# and validated at compile time by Roslyn source generators. Agents and dispatchers query the composed graph at runtime through IOntologyQuery. This section documents the public API surface for each package — for task-oriented walkthroughs see the Ontology guide.

PackageContainsUse when
LevelUp.Strategos.OntologyDomainOntology, fluent builders (IOntologyBuilder, IObjectTypeBuilder<T>, …), descriptor records, IOntologyQuery, IObjectSetProvider, IObjectSetWriter, expression nodes, IActionDispatcher, IEmbeddingProvider, IOntologySource, OntologyGraphYou define domain ontologies or write a runtime consumer (e.g. an MCP tool, a dispatcher decorator).
LevelUp.Strategos.Ontology.GeneratorsRoslyn incremental generator emitting validation diagnostics (AONT001AONT208) and the source-generated IOntologyQuery implementation.Always — referenced as an Analyzer by the core package’s consumers.
LevelUp.Strategos.Ontology.NpgsqlPgVectorObjectSetProvider, PgVectorOptions, schema-creation helpers. Implements IObjectSetProvider + IObjectSetWriter against PostgreSQL with the pgvector extension.You run similarity search against a PostgreSQL instance with pgvector.
LevelUp.Strategos.Ontology.EmbeddingsOpenAI-compatible IEmbeddingProvider implementation.You need a production embedding provider without writing your own.
LevelUp.Strategos.Ontology.MCPProgressive disclosure MCP integration (OntologyToolDescriptor, _meta envelope).You expose ontology actions over MCP.

The pages below are sourced directly from the .cs files under src/Strategos.Ontology/ and src/Strategos.Ontology.Npgsql/. Each page lists members with signatures, return types, and the XML-doc summary attached to the member.

For the broader architectural picture (Palantir concept mapping, source-generator pipeline, agent query interface), see Platform Architecture §4.14.