Project Nexus
2026 Sebastián Samaruga.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Microservices Agentic Infrastructure (draft WIP):
Latest version available at:
https://github.com/sebxama/sebxama/raw/refs/heads/main/Objective.docx
See also:
https://sebxama.blogspot.com/2026/03/algebraic-embeddings.html
Microservices Agentic Infrastructure
This is an appendix of topics related the previous work to narrow the implementation to an LLM driven approach. Refer to the full document for context.
The idea is to generate dynamic Agents "system prompts" (declarative use cases business logic / behaviors descriptions) from Augmentation aggregated, aligned and activated metadata used for specifying a formal dynamic grammar (maybe using an "upper" grammar) whose possible productions are those of the textual description of the inferred use cases business logic (prompt) to be implemented by agents.
The system aggregates, aligns and activate (Augments) source integrated backends resources into intra / inter integrated application backends use cases. It does so by incrementally augmenting source integrated backends Resource "dumps" (schema and data) by semantic means for types, roles, context, matching discovery and link completion inference for later use-case driven metadata descriptions.
Example: Money Transfer system prompt activation grammar productions:
User selects source account.
User inputs amount to be transferred.
User selects destination account.
User confirms operation.
Source account balance decreases by amount.
Destination account balance increases by
amount.
Then, the Interaction of an use case instance (user prompts) system and user completions (dialog) are meant to be constrained by the use case roles actors and their state with possible productions within this context and an Interaction instance derived grammar.
Example: Money Transfer grammar constrained / guided dialog productions:
User: "I want to: " [options list] -> "transfer money”
User asks for / System lists available source accounts.
System: “Please tell me from which account”
System asks for the amount to be transferred.
System: "Please tell me how much to be transferred”
User asks for / System lists available destination accounts.
User: "Transfer amount from source account to destination account”
User confirms operation.
System performs balance transfer and emits receipt.
System: "The transference of amount from source to destination has been performed. Can I help you with something else?”
Architectural outline:
Resources (Pluggable Backends Ingestion / Sync Integrations)
Knowledge Graph: Resources Ingestion / Sync. Blackboard Pattern.
Message Broker. Resources CRUD Events / Schema Patterns.
Message Format: RDF Quads.
Message Events / Schema Patterns Listeners / Producers (Augmentation / Agents).
Listeners / Producers:
Events IO Context (incremental dialog across events).
Helper Services / Tools (Registry, Naming, Index).
Custom Embeddings.
Augmentation : Listener, Producer
Consumes KG CRUD Events. by Schema Patterns.
Publishes to Knowledge Graph.
Aggregates (entity types / roles, contexts)
Aligns contexts (ontology entity matching, links / attributes prediction, context roles)
Activates previous / running / possible behaviors (interactions: entities in roles in contexts / use cases types / instances)
Publishes augmentation results for further Augmentation.
Publishes aggregated / aligned activation use cases data, contexts and interactions (actors, roles and executions) metadata (events) for Agents to build system prompt (syntax, generative grammar productions constrained by metadata context parameters). Defines actor / roles behaviors in contexts (operations / transforms, business logic).
Agents : Listener, Producer
Consumes KG CRUD Events. by Schema Patterns.
Publishes to Knowledge Graph.
Structured Inputs / Outputs: Schema Patterns Signatures.
Workflows defined by IO Events Schema Patterns Signatures. Auto (on event) or manual (waiting user event).
Implements activation use cases over aligned context roles of aggregated data.
Have tools for accessing and modifying augmented Knowledge Graph data (events).
Consumes aggregated / aligned activation use cases data, contexts and interactions (actors, roles and executions) metadata (events) for Agents to build system prompt (syntax, generative grammar productions constrained by metadata context parameters). Defines actor / roles behaviors in contexts (operations / transforms, business logic).
Interactions: conversational contextual state dialog / exchange constrained by possible system prompt (grammar) productions and context state. Actual "prompts" querying / executing possible behaviors. Use case and context state driven possible prompt completions (choose from / input values).
Publishes interaction execution for further augmentation.
APIs: Exposes a Dynamic HATEOAS Interactions Endpoint. View past executions data and status and running / manual (waiting user event) executions. Start new possible executions.
Syndicated API Gateway: Agents Endpoints behaviors ordered according they workflows (executed, running, start new workflow).
Agents are instances of Augmentation use cases inference. They rely on Augmentation and helper Services (tools). And become "discoverable" tools for Augmentation and other agents.
Templates / Views / Transforms: Augmentation tools for building Agents context artifacts (prompts, tools, etc). Generative Grammar Tools: build “system prompts” (declarative use case business logic) and “interaction prompts” (use case interactions executions dialog completions grammars).
Example Use Cases
Integrated Systems (Backends from which Augmentation performs Aggregation, Alignment and Activation use case inferences):
Conference Registration System
Travel Agency System
Hotel Reservation System
Traveller Recreational Activities System
Local Transportation Service System
Inferred Use Cases (from integrated systems backends schema / data):
Register for Conference
Book Flight
Book Hotel Reservation
Book Recreational Activity
Airport Check-in / Travel
Hotel Check-in
Attend Recreational Activity
Attend Conference Sessions
Airport / Hotel / Activity / Conference Session from / to Transportation
Interactions (Use Case instances):
The user registers for Conference Sessions Attendance.
Travel Agency's system books a flight from user's source city to conference destination city.
User travels to conference’s city.
Hotel system books reservation for user in start / end conference's dates.
User check in into hotel for reservation dates.
Traveller Recreational Activities system appoints attendance to activity given user's preferences.
User attends to appointed recreational activities.
User attends to conference sessions.
Local Transportation service requested whenever necessary (from, to, distance).
All systems view an aligned entity for the same instances. User is: Traveller, Host, Attendant, Passenger.
All interactions (use case instances) perform declaratively generated use cases (roles) business logic (state transforms, updates, transitions).
Attendant registeredFor ConferenceSession
Traveller onBoard Flight
Host checkedIn Room
Tourist attending RecreationalActivity
Attendant listeningTo ConferenceSession
Passenger travelingWith TransportationService
All use case interaction details are inferred and defined into the agents specification:
Flight.destination : Conference.city
Conference, Flight, Hotel, Activity, Transportation Payments instantiated by User prompted available payment methods.
Data (actors: state), Context (roles: behavior), Interaction (instances: actor in roles). Reified n-ary relationships in given state.
Resource:
ID / URI
Occurrences : Statements / Resources (Types occurrences)
Map<Occurrence, Type(SK,PK,OK)>
Type : Resource (SK, PK, OK)
Occurrences
Map<Attribute, Set<Value>>
Statement : Resource
(Resource, Resource, Resource, Resource);
Resource Statements
Type Statements
Model Runtime
Graph Backend (Blackboard, CRUD Events)
TMRM (ISO Topic Maps), FCA, PrimeIDs. SICP Book.
Aggregation: type, context/role inference.
Alignment: link inference (data statements production). Ontology Matching (actor in context role inference).
Activation: Possible / Previous Contexts Interactions (contexts instances actors/roles). Type (behavior/relationship code statements production).
Augmentation Services Pipeline: consumes data, produces code (grammar productions) / executes code, produces data (grammar productions, constrained placeholders).
Streams (filter, map, reduce)
Completions: Classification, Regression, Clustering. Helpers.
Graph CRUD Events
Messages: Statements (Homoiconic Runtime Codats).
Messages as Data (Resources view): Infer Code Messages (Activation Function). Completion. If Message asserts :x :position :junior, inferred Code Messages: :x :position :semiSenior (:xPromotion reified relationship) available (grammar).
Messages as Code (Types view): Infer Data Messages (Perform Function). Completion. If Message asserts :x :employeeOf :y, inferred Data Messages with placeholders (reified relationship grammar) :xEmployment :position :choosePosition, :salary, etc.
Comments
Post a Comment