Repository navigation
Add Decision Fabric MVP for actor decisions - #18
Draft
rahamohebbi wants to merge 3 commits into
Draft
rahamohebbi wants to merge 3 commits into
rahamohebbi wants to merge 3 commits into
Conversation
Actors call Context.Decide. A decision actor routes choice, score, and binary requests to rules, Laya, or an OpenAI-shaped LLM, then escalates or falls back under DecisionPolicy. Co-authored-by: Raha Mohebbi <rahamohebbi@users.noreply.github.com>
Co-authored-by: Raha Mohebbi <rahamohebbi@users.noreply.github.com>
Co-authored-by: Raha Mohebbi <rahamohebbi@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Actors can ask the runtime for a choice, score, or yes/no decision without calling Laya, rules, or an LLM themselves.
Context.Decide/Decidesends the request to a decision actor. That actor routes it, normalizes the result, and returns latency, confidence, provider, and escalation metadata.Routing:
RuleDecisionProvider.LayaDecisionProvider.PreferAccurate, go to the OpenAI-shapedOpenAiDecisionProvider. Point that adapter at another OpenAI-compatible gateway via configuration; actors do not change.DecisionPolicy.MinimumConfidence) escalates to the LLM. The result setsEscalated,Provider(final), andPreviousProvider.Telemetry emits
DecisionRequested,ProviderSelected,DecisionCompleted,DecisionEscalated, andDecisionFailed, plusagctor_decision_latency,agctor_decision_cost,agctor_decision_confidence,agctor_decision_escalations, andagctor_provider_failureson an OpenTelemetry meter. Summaries are optional and short. Chain-of-thought is not stored.Deferred on purpose: decision memory, outcome tracking, analytics dashboards, a learned router, ensembles, and autonomy execution (
Execute).IDecisionObserverandIDecisionProviderare the extension points.Actor model
ActorContext.Decideis a request/response message to the well-known decision actor (agctor.decisions). Providers run on that actor's mailbox. The runtime bindsContextwhen it spawns an actor that implementsIHasActorContext(Actor,BaseActor,Agent).Tests
AgctorSDK.Core.Tests)dotnet build Agctor.slnand the relevantdotnet testprojects pass locallydotnet build Agctor.slnsucceeded.dotnet test AgctorSDK.Core.Tests/AgctorSDK.Core.Tests.csproj— Passed: 224, Failed: 0, Skipped: 0dotnet test AgctorSDK.Core.IntegrationTests/AgctorSDK.Core.IntegrationTests.csproj— Passed: 17, Failed: 0, Skipped: 3 (existing skips)dotnet test AgctorSDK.Host.IntegrationTests/AgctorSDK.Host.IntegrationTests.csproj— Passed: 40, Failed: 0, Skipped: 0HTTP provider tests use a stub handler. No live API keys.
Docs and attribution