Standard Context Pack v1
The Standard Context Pack v1 is the shared retail-domain vocabulary every Konstera tenant gets out of the box — no setup, no CRUD, no catalog ingestion required. Agents can reference these names directly on any tenant.
24 glossary terms + 24 ontology entities + 2 skills across three
language packages (Python, .NET, TypeScript). Published as
konstera-sdk-contexts on PyPI, Konstera.Sdk.Contexts on NuGet and
@konstera/sdk-contexts on npm.
Returns, tiers, pricing, inventory, orders, disputes and more.
customer, order, sku, ticket … with identity strategies.
Refund-eligibility evaluation and inbound-ticket triage.
For the full lifecycle (where context comes from on tenants beyond the pack), see Data catalogs.
Use the typed constants, not magic strings#
Each language package ships typed constants generated from the pack JSON. Reference the constants, not raw strings — typos fail at build time instead of install validation time.
from konstera_sdk_contexts import ContextTerms, ContextEntities, ContextSkills
async def handle(self, req, ctx):
# Glossary lookup by canonical name
term = await ctx.semantic.glossary_lookup(ContextTerms.REFUND_WINDOW_DAYS)
# Ontology lookup — canonical entity names
customer = await ctx.semantic.ontology_lookup(ContextEntities.CUSTOMER)
# Skills by canonical name
skill = await ctx.semantic.skills_get(ContextSkills.EVALUATE_REFUND_ELIGIBILITY)
import { ContextTerms, ContextEntities, ContextSkills } from "@konstera/sdk-contexts";
async handle(req: AgentRequest, ctx: AgentContext): Promise<AgentResponse> {
const term = await ctx.semantic.glossaryLookup(ContextTerms.REFUND_WINDOW_DAYS);
const customer = await ctx.semantic.ontologyLookup(ContextEntities.CUSTOMER);
const skill = await ctx.semantic.skillsGet(ContextSkills.EVALUATE_REFUND_ELIGIBILITY);
// ...
}
using Konstera.Sdk.Contexts;
public async Task<AgentResponse> HandleAsync(AgentRequest req, AgentContext ctx)
{
var term = await ctx.Semantic.GlossaryLookupAsync(ContextTerms.RefundWindowDays);
var customer = await ctx.Semantic.OntologyLookupAsync(ContextEntities.Customer);
var skill = await ctx.Semantic.SkillsGetAsync(ContextSkills.EvaluateRefundEligibility);
// ...
}
What's in v1#
Glossary (24 terms)#
Retail + customer-service domain concepts:
| Area | Terms |
|---|---|
| Returns & refunds | refund_window_days, return_condition_days, partial_refund_threshold_pct, shipping_refund_eligibility, restocking_fee_pct |
| Customer tiers | vip_tier, loyalty_points_balance, loyalty_points_pending |
| Pricing & margin | markdown_rate, margin_floor_pct, rrp_delta_pct |
| Inventory | stock_level_threshold, reorder_point, safety_stock_days |
| Order lifecycle | order_status, order_dispatch_sla_hours, order_delivery_eta_days |
| Chargeback & disputes | chargeback_window_days, dispute_evidence_sla_hours |
| Communication | preferred_contact_channel, escalation_tier |
| Payment | payment_terms_days, prepayment_threshold_usd |
| Audit | invocation_retention_days |
Each term carries a definition, synonyms, canonical unit (where applicable), and version.
Ontology entities (24)#
| Area | Entities |
|---|---|
| Customer-adjacent | customer, loyalty_member, household |
| Commerce | order, order_line_item, invoice, payment, return, refund, chargeback |
| Product | sku, product, product_variant, supplier |
| Fulfilment | warehouse, shipment, carrier, delivery |
| Communication | ticket, conversation, channel, message |
| Audit | invocation, approval |
Each entity carries:
Example: customer has identity.primary = {field: "email", capability: "customers.lookup_by_email"} + fallbacks for loyalty_id, phone.
See the Ontology deep-dive for the full shape.
Skills (2)#
6-step deterministic playbook: fetch customer → fetch order → check window → compute refund amount → check exceptions → emit decision + confidence + grounds.
Classify + prioritise a ticket: category / severity / channel / confidence.
Reference consumption of evaluate_refund_eligibility: see the
customer-service-agent in the
agents repo.
Versioning#
All three packages (NuGet, PyPI, npm) must share the same MAJOR.MINOR as
the pack JSON schema. Per the pack's own semver policy:
| Change | Bump |
|---|---|
| Adding a canonical name (new glossary term, skill, entity) | MINOR |
| Removing or renaming | MAJOR |
| Metadata-only (description, alias) | PATCH |
Current version: 1.0.0 across all three languages + the pack JSON. Enforced by CI (generator drift gate + cross-package version lockstep).
When to use pack constants vs. tenant-authored#
| Use pack constants when… | Use tenant-authored when… |
|---|---|
| The concept is universal retail (refund window, order status) | The concept is tenant-specific (a bespoke business metric) |
| You want portability across tenants | The tenant explicitly overrides a pack name (e.g. their vip_tier has different values) |
| You want typed autocomplete + typo detection at build time |
The pack is a baseline, not a replacement for tenant authoring.
ctx.semantic.glossary_lookup("vip_tier") returns the tenant's version if
they've overridden it, otherwise the pack version.