Agentforce SDK
A Python SDK for interacting with the Agentforce API.
Connected app
You must create a Connected App for your Agentforce Agent(s) to use it with this SDK. Here are the instructions: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html
Installation
pip install salesforce-agentforce
Usage
from agentforce.agents import Agentforce
# Initialize the client
agentforce = Agentforce()
# Authenticate
agentforce.authenticate(
salesforce_org="your-salesforce-org",
client_id="your-client-id",
client_secret="your-client-secret"
)
# Start a session
session = agentforce.start_session(agent_id="your-agent-id")
# Send a message
agentforce.add_message_text("Hello, how can you help me?")
response = agentforce.send_message(session_id=session.sessionId)
# End the session
end_response = agentforce.end_session(session_id=session.sessionId)
Features
- Authentication with Salesforce
- Session management (start/end)
- Message sending (text and reply)
- Type-safe response objects
License
MIT
Metadata
Release files for salesforce-agentforce 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| salesforce-agentforce-0.1.9.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| salesforce_agentforce-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / salesforce-agentforce-0.1.9.tar.gz
| Download URL | salesforce-agentforce-0.1.9.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df1d8f6a5ee59f1fd34d148bfbc120fc0e64211c7fc24bbb43f516232bdb4151
|
|
BLAKE2b-256 checksum How to use checksums |
171189bf72833ccb065e8119d7b2f556d62ecb2f1656d2ab434a015bfdde212e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.2
|
Release files / salesforce_agentforce-0.1.9-py3-none-any.whl
| Download URL | salesforce_agentforce-0.1.9-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df5086ef621ca6271187498a56d16e705d361a79e9c8732ab46a14ada022a506
|
|
BLAKE2b-256 checksum How to use checksums |
a19e50f0ffbbf44ecad0b0c1df7110dc8849a03e3fd1d7ec251c310cc0073a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.2
|