A Python SDK for interacting with the Agentforce Agents
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file salesforce-agentforce-0.1.9.tar.gz.
File metadata
- Download URL: salesforce-agentforce-0.1.9.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df1d8f6a5ee59f1fd34d148bfbc120fc0e64211c7fc24bbb43f516232bdb4151
|
|
| MD5 |
c659bde5f9dfde1beeb276af5ef23195
|
|
| BLAKE2b-256 |
171189bf72833ccb065e8119d7b2f556d62ecb2f1656d2ab434a015bfdde212e
|
File details
Details for the file salesforce_agentforce-0.1.9-py3-none-any.whl.
File metadata
- Download URL: salesforce_agentforce-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df5086ef621ca6271187498a56d16e705d361a79e9c8732ab46a14ada022a506
|
|
| MD5 |
c382739011e04e612b731c20b4c2dfdb
|
|
| BLAKE2b-256 |
a19e50f0ffbbf44ecad0b0c1df7110dc8849a03e3fd1d7ec251c310cc0073a70
|