aspace://realm/example

The worked example

The claims-ops realm of the example company Acme Insurance holds three types, four producers of four kinds, one API with three operations of which two are listed, two apps, and one agent. It shows the better-together story at small scale: one realm, one use case, one fleet.

AgentSpaces 0.6.0Embabel agentsEmbabel realms
The realmWhat the import makesThe fleet for this use caseBack to the start
aspace://realm/fixture

The realm

The import document names the realm claims-ops, version 0.2.0, and the commit its files came from. It gives the realm the namespace https://acme.example/realm/claims-ops#. Its types are Policyholder, Claim (joined to its Policyholder), and Payment (joined to its Claim), each with an identity property. Its producers are claimsByHolder (remote, the operation listClaims), paymentDetail (api, getPayment), paymentsLedger (sql, the datasource ledger), and riskScore (compute, a risk score computed from a claim's key). Its one API, claims-api, is an OpenAPI document with listClaims, getPayment, and orderPayment, and it lists operation-ids: [listClaims, getPayment]. Its apps are claims-desk and ledger-view. Its agent triage carries its prompt file inline.

realm:name: claims-opsversion: 0.2.0 (the realm's own semver)commit: 4d2c8e1f... (a key of the import document)namespace: https://acme.example/realm/claims-ops# (a key of the import document)url: https://claims.acme.examplekeys:claims-api variable CLAIMS_API_KEYtypes:Policyholder (policyholderId, identity: true)Claim (claimId): policyholderId, amount; joins PolicyholderPayment (paymentId): claimId, amount; joins Claimproducers:claimsByHolder remote → listClaimspaymentDetail api → getPaymentpaymentsLedger sql → datasource ledger, IN (:keys)riskScore compute → a fleet package serves itapis:claims-api openapi, api-key, token-env CLAIMS_API_KEYoperation-ids: [listClaims, getPayment]document: { openapi: 3.0.3, paths: /claims, /payments/{id}, /payments }apps:claims-desk reads Claim, Paymentledger-viewagents:triage prompt triage.md, folded in as promptTextone document, folded by hand: the parts of a realm as top-level keys, each OpenAPI document inline under its API
The import document. What an import reads: the claims-ops realm folded by hand into one YAML document.
Which keys are the import document's ownWe folded this realm by hand into the legacy YAML form of Embabel's format. Four of its keys are the import document's own: the realm's namespace and commit, an app's reads, and an agent's promptText, which holds the agent's prompt file.
aspace://realm/made

What the import makes

claims-ops (the realm)PolicyholderClaimPaymentclaimsByHolder remotepaymentDetail apipaymentsLedger sqlriskScore computeclaims-api 3 operationsclaims-desk, ledger-viewtriage agentwhat reaches the group3 entry typesAssetCard listClaimsAssetCard getPaymentAssetCard paymentsLedgerAgentCards claims-ops/riskScoreFlowManifest 2 stages2 AppCardsprompt claims-ops/triageorderPayment is in the document but not in operation-ids, so the flow has two stages and not three
The worked example. Once a person approves the drafts, the claims-ops realm reaches one group as entry types, three AssetCards, one FlowManifest, a prompt, and two AppCards. The AgentCards for claims-ops/riskScore come once a fleet package serves that kind.
Realm part What reaches the group, once a person approves it
the types Policyholder, Claim, Paymentthree entry types, such as https://acme.example/realm/claims-ops#Claim
claimsByHolder and paymentDetailtwo AssetCards, listClaims and getPayment, from the REST connector
paymentsLedgerone AssetCard for the query, from the SQL connector
riskScorethe AgentCards of a fleet package that serves the agent kind claims-ops/riskScore, once such a package exists
claims-apithe FlowManifest realm-claims-ops-claims-api: two code stages on the lane claims-api, listClaims and getPayment; orderPayment is not listed, and so not a stage
the triage agent's prompt filethe prompt claims-ops/triage, in the group's prompt set
claims-desk and ledger-viewtwo AppCards with origin.ref claims-ops/claims-desk and claims-ops/ledger-view, origin.version 0.2.0, and the links app://claims-ops/claims-desk and app://claims-ops/ledger-view; the first carries realm.reads Claim,Payment
aspace://realm/fleet

The fleet for this use case

After approval the claims fleet holds these cards:

In the group Published by
two AssetCards, listClaims and getPaymentthe REST connector
one AssetCard, paymentsLedgerthe SQL connector
AgentCards for claims-ops/riskScorea fleet package's agents, once a package serves the kind
the FlowManifest realm-claims-ops-claims-apithe reconciler applies it, and its two stages run
two AppCardsthe issuer that ran the import
the AgentCards of your Embabel agentseach agent's peer, through embabel-agentspaces

An Embabel agent that maps its com.acme.claims package to the realm's namespace plans over these types. Each of those pieces has its own test, and no example runs the whole chain yet. The Embabel guide shows that agent from the Embabel side.