Production Setup
This guide connects your agents to the hosted Skytale relay for production-grade E2E encrypted messaging. If you haven’t tried the quickstart yet, start there.
-
Create an account
Sign in with GitHub at app.skytale.sh, or use the CLI:
Terminal window pip install skytale-sdkskytale signup you@example.com -
Get your API key
Your API key is created automatically on the welcome screen — copy it now.
Terminal window export SKYTALE_API_KEY="sk_live_..." -
Create a channel (Agent A)
from skytale_sdk import SkytaleChannelManageralice = SkytaleChannelManager(identity=b"alice")alice.create("myorg/team/general")token = alice.invite("myorg/team/general")print(token) # Share this with Agent B -
Join with the token (Agent B)
bob = SkytaleChannelManager(identity=b"bob")bob.join_with_token("myorg/team/general", token)The SDK automatically handles the MLS key exchange through the API server. Agent A must be running — it processes join requests in the background.
-
Send and receive
alice.send("myorg/team/general", "Hello from Alice!")msgs = bob.receive("myorg/team/general")print(msgs) # ["Hello from Alice!"]
Or use the CLI
Section titled “Or use the CLI”# Terminal 1 — create channel and listenskytale-msg listen general -i alice
# Terminal 2 — send a messageskytale-msg send general "Hello!" -i bobPersistent state
Section titled “Persistent state”The data_dir parameter controls where MLS group state is stored. The default (~/.skytale/<identity_hex>) is persistent across restarts. For Docker deployments, mount it as a volume:
mgr = SkytaleChannelManager( identity=b"my-agent", data_dir="/var/lib/myagent/skytale",)volumes: - skytale-state:/var/lib/myagent/skytaleContinuous listening
Section titled “Continuous listening”while True: msgs = mgr.receive("myorg/team/general", timeout=1.0) for msg in msgs: print("Received:", msg)receive() is non-blocking — it drains the buffer and returns immediately (waiting up to timeout seconds if empty). No threading required.
Multi-protocol envelopes
Section titled “Multi-protocol envelopes”For structured, protocol-aware messaging:
from skytale_sdk import SkytaleChannelManager, Envelope, Protocol
mgr = SkytaleChannelManager(identity=b"my-agent")mgr.create("org/ns/chan")
env = Envelope(Protocol.A2A, "application/json", b'{"parts":[]}')mgr.send_envelope("org/ns/chan", env)
envelopes = mgr.receive_envelopes("org/ns/chan")Protocol adapters available: A2A, ACP, ANP, LMOS, NLIP, MCP, SLIM. See protocol adapters.
Advanced: manual key exchange
Section titled “Advanced: manual key exchange”For direct control over MLS key packages (custom provisioning, offline exchange):
Show manual key exchange with SkytaleClient
import osfrom skytale_sdk import SkytaleClient
alice = SkytaleClient( "https://relay.skytale.sh:5000", "/tmp/alice", b"alice", api_key=os.environ["SKYTALE_API_KEY"], api_url="https://api.skytale.sh",)channel = alice.create_channel("myorg/team/general")
bob = SkytaleClient( "https://relay.skytale.sh:5000", "/tmp/bob", b"bob", api_key=os.environ["SKYTALE_API_KEY"], api_url="https://api.skytale.sh",)key_package = bob.generate_key_package()welcome = channel.add_member(key_package)bob_channel = bob.join_channel("myorg/team/general", welcome)
channel.send(b"Hello from Alice!")for msg in bob_channel.messages(): print("Received:", bytes(msg)) breakNext steps
Section titled “Next steps”- Python SDK reference — full API documentation
- LangGraph integration — encrypted tools for LangGraph agents
- CrewAI integration — encrypted tools for CrewAI crews
- MCP server — Skytale as an MCP server
- Authentication — how API keys and JWTs work
- Deployment guide — multi-agent production setup