Skip to content

Add Decision Fabric MVP for actor decisions - #18

Draft
rahamohebbi wants to merge 3 commits into
mainfrom
cursor/decision-fabric-mvp-f2a3
Draft

rahamohebbi wants to merge 3 commits into
mainfrom
cursor/decision-fabric-mvp-f2a3

Conversation

@rahamohebbi

@rahamohebbi rahamohebbi commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Actors can ask the runtime for a choice, score, or yes/no decision without calling Laya, rules, or an LLM themselves. Context.Decide / Decide sends the request to a decision actor. That actor routes it, normalizes the result, and returns latency, confidence, provider, and escalation metadata.

Routing:

  • Deterministic requests (matching rules, a single option, or caller-supplied option weights) go to RuleDecisionProvider.
  • Simple choice, score, and binary requests go to LayaDecisionProvider.
  • Complex requests, and any request with PreferAccurate, go to the OpenAI-shaped OpenAiDecisionProvider. Point that adapter at another OpenAI-compatible gateway via configuration; actors do not change.
  • Laya confidence below the threshold (default 0.70, or DecisionPolicy.MinimumConfidence) escalates to the LLM. The result sets Escalated, Provider (final), and PreviousProvider.
  • A failing or ineligible provider falls through to the next one that policy still allows.
  • Policy can prefer or require local, fast, cheap, or accurate engines, and can cap cost and latency or allow/block provider names.

Telemetry emits DecisionRequested, ProviderSelected, DecisionCompleted, DecisionEscalated, and DecisionFailed, plus agctor_decision_latency, agctor_decision_cost, agctor_decision_confidence, agctor_decision_escalations, and agctor_provider_failures on 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). IDecisionObserver and IDecisionProvider are the extension points.

Actor model

  • New behavior uses actors / messages rather than shared mutable workflow state (or explains why not)

ActorContext.Decide is a request/response message to the well-known decision actor (agctor.decisions). Providers run on that actor's mailbox. The runtime binds Context when it spawns an actor that implements IHasActorContext (Actor, BaseActor, Agent).

Tests

  • Unit tests updated (AgctorSDK.Core.Tests)
  • Integration tests updated when the change crosses process or HTTP/MCP boundaries
  • dotnet build Agctor.sln and the relevant dotnet test projects pass locally

dotnet build Agctor.sln succeeded.

  • dotnet test AgctorSDK.Core.Tests/AgctorSDK.Core.Tests.csproj — Passed: 224, Failed: 0, Skipped: 0
  • dotnet 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: 0

HTTP provider tests use a stub handler. No live API keys.

Docs and attribution

  • README / XML comments updated if a public API changed
  • CHANGELOG.md Unreleased section updated for user-visible changes
  • No secrets, local config, or build artifacts included
Open in Web Open in Cursor 

cursoragent and others added 3 commits October 2, 2026 00:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants