Repository navigation
Add AgentforceScorer function feature - #165
Draft
eyudashkin-cpu wants to merge 2 commits into
Draft
eyudashkin-cpu wants to merge 2 commits into
eyudashkin-cpu wants to merge 2 commits into
Conversation
|
Thanks for the contribution! It looks like @eyudashkin-cpu is an internal user so signing the CLA is not required. However, we need to confirm this. |
eyudashkin-cpu
force-pushed
the
feat/agentforce-scorer-w-24740772
branch
from
November 4, 2026 10:44
d34872b to
9751bdb
Compare
Author
|
@salesforce-cla recheck |
Add AgentforceScorerV1Request/AgentforceScorerV1Response Pydantic types for scoring an Agentforce session (session tracing detail view in, open-ended scorer outputs out), and an agentforce_scorer function template, so `datacustomcode init --code-type function --use-in-feature AgentforceScorer` scaffolds a typed scorer entrypoint with a generated test.json. init now rejects unknown function features instead of silently falling back to the chunking template. deploy infers AgentforceScorer from the entrypoint types and sends it via invokeOptions (v67.0), since the legacy functionInvokeOptions field only accepts UnstructuredChunking. W-24740772 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eyudashkin-cpu
force-pushed
the
feat/agentforce-scorer-w-24740772
branch
from
November 4, 2026 10:47
9751bdb to
eddbf8a
Compare
Matches the camelCase wire format used by the other scorer fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Adds
AgentforceScorer, a new function feature for scoring a single Agentforce session. The scorer receives the session tracing detail view and returns open-ended scorer outputs.Changes
function/feature_types/agentforce_scorer.pywithAgentforceScorerV1Request/AgentforceScorerV1Response, following thechunking.pyconventions (V1names,Field(description=...),extra="ignore").python_scorer_input: AgentforceScorerV1SessionTracingDetailView, made up ofsessionState,actors,metricsandruns. Each run hasmessagesand anagentLoop.steps.outputs: List[AgentforceScorerV1Output], where each output haslabel,valueandis_passed.message, stepinput/output/attributes) are capped at 100,000 characters.templates/function/agentforce_scorer/with a typedentrypoint.py,config.jsonandrequirements.txt.test.jsonis generated from the request model.constants.py: registers the template folder and maps both type names toAgentforceScorerfor deploy-time inference. Also addsFUNCTION_INVOKE_OPTIONS_FEATURESandFUNCTION_USE_IN_FEATURE_DEFAULT.init: unknown function features are now rejected. Before, a typo silently produced the chunking template.deploy:AgentforceScoreris sent asinvokeOptions: ["AgentforceScorer"], which routes to the v67.0 endpoint. The legacyfunctionInvokeOptionsfield only acceptsUnstructuredChunking.SearchIndexChunkingbehaves as before.Testing
tests/test_agentforce_scorer.py(8 tests) covers:initscaffolding,test.jsongeneration and feature inferenceinvokeOptionsfor the scorer,functionInvokeOptionsfor chunkinginit→run --test-withreturns{"outputs": [{"label": "user_turns", "value": "1", "is_passed": true}]}.deployagainst an org, which is blocked as described in the note above.W-24740772
🤖 Generated with Claude Code