Proposal: AOT-safe domain operations as an Agent Framework integration #14290
CB (CristianBarragan)
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I’ve been exploring an idea around the boundary between AI agents and the .NET application runtime, and I’d be interested in feedback from the Agent Framework/Semantic Kernel community.
The idea is to use Foundgine as a strongly typed, Native-AOT-safe application/domain runtime underneath Agent Framework, rather than treating it as another competing AI framework.
Conceptually:
LLM
↓
Agent Framework
(reasoning / planning / orchestration)
↓
Generated typed tools
↓
Foundgine
(domain operations / state / business rules)
↓
.NET domain models
The interesting integration point would be source-generated domain operations exposed as agent tools.
For example, instead of an agent dynamically discovering a domain model through reflection, Foundgine could generate the tool definitions at build time:
Order.AdvanceFulfillment(orderId)
↓
source-generated tool definition
↓
Agent Framework
↓
agent invokes operation
↓
Foundgine validates invariants + executes + persists
This would potentially give an application:
Native AOT compatibility strongly typed tool contracts compile-time-generated schemas and metadata deterministic domain execution domain-level authorization and validation a clear boundary between AI reasoning and application rules.
I think there may also be an interesting middleware integration: Agent Framework determines what the agent wants to do, while Foundgine middleware determines whether that domain operation is valid and permitted to execute.
So the architectural separation becomes:
Agent Framework: reasoning, planning, orchestration and model interaction.
Foundgine: domain operations, application state, business rules and deterministic execution.
The question I’d like to explore is:
Would a compile-time-generated domain-tool adapter be a useful integration point between Agent Framework and Native-AOT .NET applications?
I’m building Foundgine from the ground up around this idea, including integration with EF Core annotations and strongly typed domain models. I’ve already implemented much of this approach, but I think there could be value in exploring whether this kind of integration could become an official or well-supported pattern within the .NET AI ecosystem.
I’m particularly interested in whether this is something the Agent Framework architecture could accommodate naturally, or whether there is already an existing abstraction that addresses this use case.
I’d really appreciate your thoughts, feedback, or suggestions. If this is interesting.
Foundgine:
GitHub: https://github.com/CristianBarragan/Foundgine
Documentation: https://cristianbarragan.github.io/Foundgine/docs-site/index.html
NuGet: https://www.nuget.org/packages?q=Foundgine
Feel free to reach out or comment here — I’d be very interested in discussing the architectural direction and potential integration points.
All reactions