microsoft / microsoft/agent-framework

.NET: [Feature]: Add Salesforce Agentforce as a first-class agent provider in Microsoft Agent Framework

Open
#4,079 2 comments 0 reactions 0 assignees View on GitHub
.NET
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

### Description

#### Motivation / Why Are We Adding This?

Salesforce Agentforce is a widely adopted enterprise AI platform that allows organisations to build and deploy autonomous agents within the Salesforce ecosystem. Many enterprise customers operate in hybrid environments where Salesforce handles CRM, service, and sales workflows while other systems — powered by Azure, OpenAI, Anthropic, etc. — handle complementary AI workloads.

Today there is no straightforward way to include a Salesforce Agentforce agent in a multi-agent orchestration built with the Microsoft Agent Framework. Developers must write custom HTTP plumbing, manage OAuth token lifecycles, and manually translate between the Agentforce REST API and the framework's `AIAgent` abstraction.

By adding a dedicated provider, we:

1. **Lower the barrier to entry** — a few lines of configuration and the agent is ready.
2. **Enable cross-platform orchestration** — Agentforce agents can be composed alongside OpenAI, Anthropic, Copilot Studio, and other providers in workflows, A2A scenarios, and multi-agent patterns.
3. **Provide a consistent developer experience** — the same `RunAsync` / `RunStreamingAsync` API surface that works for every other provider also works for Agentforce.

### Code Sample

### Basic usage — single-turn conversation

```csharp
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.Agentforce;

// Configure with Salesforce credentials
var config = new AgentforceConfig(
myDomainHost: "your-org.my.salesforce.com",
consumerKey: "your-consumer-key",
consumerSecret: "your-consumer-secret",
agentId: "your-agent-id");

using var agent = new AgentforceAgent(config);

// Non-streaming
AgentResponse response = await agent.RunAsync("What can you help me with?");
Console.WriteLine(response);

// Streaming
await foreach (var update in agent.RunStreamingAsync("Tell me more."))
{
Console.Write(update);
}
```

### Language/SDK

.NET

Contributor guide

Open the contributing guide

Research direction

Start from the proposed AgentforceConfig and AgentforceAgent entry points, using the sample's RunAsync and RunStreamingAsync calls to define the provider surface. Done means Salesforce credentials and the agent ID can configure an agent that supports both non-streaming and streaming conversations through the framework's AIAgent abstraction.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.