Skip to main content

LangChain tools for Relm - the CRM for LLMs and AI agents

Project description

langchain-relm

LangChain tools for Relm - the CRM for LLMs and AI agents.

Give a LangChain / LangGraph agent a real CRM: create and find contacts, companies and deals, log activities, and move deals through a pipeline - in a few typed tools. Relm's errors are RFC-9457 problem+json with valid_options and a suggestion, and this adapter passes them straight back to the model, so your agent self-corrects in one turn instead of crashing on a bad field or stage.

Install

pip install langchain-relm                                  # once it's on PyPI
# or install the latest straight from source:
pip install "git+https://github.com/98000m/langchain-relm.git"

Quickstart

Mint a free key (and a free test-mode key) at app.relmcrm.com, then:

from langchain_relm import get_relm_tools
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent

tools = get_relm_tools(api_key="relm_live_...")   # or set RELM_API_KEY
agent = create_react_agent(ChatOpenAI(model="gpt-4o"), tools)

agent.invoke({"messages": [(
    "user",
    "Add Maria Diaz (maria@acmelogistics.com) as a lead, create Acme Logistics "
    "as her company, and open a $18,500 deal for the annual plan.",
)]})

The agent calls relm_describe_schema to learn what exists, then creates the company, the contact and the deal - and if it sends a stage or type that doesn't exist, Relm hands back the valid options and it retries.

The tools

Tool What it does
relm_describe_schema The live contract: objects, fields, id prefixes, filters, enum values. Call it first.
relm_search Find a contact/company/deal by name, email or title.
relm_list List records of an object with an optional q filter.
relm_create_contact Create a person (email/phone/linkedin/name/company - at least one).
relm_create_company Create an account.
relm_create_deal Open a deal (value_cents is integer cents).
relm_log_activity Log a note/call/email/meeting/task on a contact and/or deal.
relm_move_deal Move a deal to another stage.

Direct client

Skip the tools and call the API yourself:

from langchain_relm import RelmClient

relm = RelmClient(api_key="relm_live_...")
relm.get("/schema")
relm.post("/contacts", {"email": "ada@example.com", "type": "lead"})

Notes

  • Test mode is free. A relm_test_ key writes to an isolated, unmetered dataset - rehearse there, then swap one string.
  • Native MCP + A2A too. Prefer MCP? Relm ships a native MCP server at https://api.relmcrm.com/mcp and an A2A endpoint - see the agent hub.
  • Docs: relmcrm.com/docs · OpenAPI: relmcrm.com/openapi.json

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

langchain_relm-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

langchain_relm-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_relm-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_relm-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for langchain_relm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 60261c1a29211bfed053465417ba041371d65c7716d754ca4063ca9d68e8537d
MD5 e9565cd6cbd41c8ae7a13fc893936818
BLAKE2b-256 7f509ff8f5a4d429fdefe1a88dd174bd2471b1a6540669997bb7883244396db3

See more details on using hashes here.

File details

Details for the file langchain_relm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_relm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for langchain_relm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b6c6a2bf84d65b9152c245c486e67219cacff65ba9def9552ef3c5c554fb50
MD5 b2bc8d4598bfda871621095ec5712fc5
BLAKE2b-256 a59de243c7bf7371ff4b24a1375710a2ed93ece9ec95da4a4052c59061159b36

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