LangGraph
Skytale provides first-class LangGraph support. Your agents get skytale_send and skytale_receive tools that move encrypted messages over MLS channels — no infrastructure to manage.
Installation
Section titled “Installation”pip install skytale-sdk[langgraph]This installs skytale-sdk and langchain-core.
Quick start
Section titled “Quick start”from langgraph.prebuilt import create_react_agentfrom langchain_openai import ChatOpenAIfrom skytale_sdk.integrations import langgraph as skytale_lg
# 1. Create a channel managermgr = skytale_lg.create_manager(identity=b"research-agent")
# 2. Create or join a channel (see Invite Flow below)mgr.create("acme/research/results")
# 3. Bind tools to a ReAct agentagent = create_react_agent( ChatOpenAI(model="gpt-4o"), skytale_lg.tools(mgr),)
# 4. The LLM can now send/receive encrypted messagesagent.invoke({ "messages": [("user", "Send our findings to acme/research/results")]})Invite flow
Section titled “Invite flow”One agent creates the channel and generates a token; the joining agent uses it. MLS key exchange happens automatically.
Same-process setup (demos)
Section titled “Same-process setup (demos)”When both agents run in the same script:
from skytale_sdk.integrations import langgraph as skytale_lg
alice = skytale_lg.create_manager(identity=b"alice")bob = skytale_lg.create_manager(identity=b"bob")
alice.create("acme/demo/chat")token = alice.invite("acme/demo/chat")bob.join_with_token("acme/demo/chat", token)
# Both managers are now ready — bind tools and run agentsPre-provisioned setup (production)
Section titled “Pre-provisioned setup (production)”Run a setup script before starting your agents:
# setup.py — run oncefrom skytale_sdk import SkytaleChannelManager
creator = SkytaleChannelManager(identity=b"creator", data_dir="/var/lib/creator")creator.create("acme/prod/pipeline")
# Generate a token and share it (env var, config file, etc.)token = creator.invite("acme/prod/pipeline")
# Joiner uses the token — no key package exchange neededjoiner = SkytaleChannelManager(identity=b"joiner", data_dir="/var/lib/joiner")joiner.join_with_token("acme/prod/pipeline", token)Then each agent process loads its own data_dir and the channel is ready.
Tools reference
Section titled “Tools reference”| Tool | Args | Description |
|---|---|---|
skytale_send | channel, message | Send an encrypted message to a channel |
skytale_receive | channel, timeout (default 5s) | Receive buffered messages from a channel |
skytale_channels | — | List all active channels |
Environment variables
Section titled “Environment variables”| Variable | Default | Description |
|---|---|---|
SKYTALE_RELAY | https://relay.skytale.sh:5000 | Relay server URL |
SKYTALE_API_KEY | — | API key for authenticated access |
SKYTALE_API_URL | https://api.skytale.sh | API server URL |
Full example
Section titled “Full example”See sdk/examples/langgraph_encrypted.py for a complete two-agent demo.
Cross-framework communication
Section titled “Cross-framework communication”LangGraph agents and CrewAI agents on the same channel communicate automatically — Skytale is the pipe, not the framework. A LangGraph agent sends "Found 3 papers" and a CrewAI agent receives it, because both use the same SkytaleChannelManager under the hood.
For structured cross-protocol messaging, see the Envelope and Protocol Adapters documentation.