Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

salesforce-agentforce-0.1.9.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

salesforce_agentforce-0.1.9-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

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

Hashes for salesforce-agentforce-0.1.9.tar.gz
Algorithm Hash digest
SHA256 df1d8f6a5ee59f1fd34d148bfbc120fc0e64211c7fc24bbb43f516232bdb4151
MD5 c659bde5f9dfde1beeb276af5ef23195
BLAKE2b-256 171189bf72833ccb065e8119d7b2f556d62ecb2f1656d2ab434a015bfdde212e

See more details on using hashes here.

File details

Details for the file salesforce_agentforce-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for salesforce_agentforce-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 df5086ef621ca6271187498a56d16e705d361a79e9c8732ab46a14ada022a506
MD5 c382739011e04e612b731c20b4c2dfdb
BLAKE2b-256 a19e50f0ffbbf44ecad0b0c1df7110dc8849a03e3fd1d7ec251c310cc0073a70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page