Skip to content

🍳 Cookbook: Complete Stargate Setup

This is the Capstone Guideβ€”the definitive, end-to-end walkthrough for setting up the entire Traylinx Stargate platform. By the end, you will have installed the CLI, deployed your first agent, registered it with the global network, AND successfully called it from a second agent.

🎯 Goal

Go from zero to a working multi-agent deployment in under 30 minutes.


πŸ—οΈ Phase 1: Install the Traylinx CLI

The CLI is your command center for everything Stargate.

macOS (Homebrew)

brew tap traylinx/traylinx
brew install traylinx

Cross-Platform (pipx)

pipx install traylinx-cli

Verify

traylinx --version
# traylinx-cli v0.3.0

βš™οΈ Phase 2: Configure Your Environment

1. Set Up LLM Access (SwitchAI)

# Global config stored in ~/.traylinx/config.yaml
traylinx config init

You'll be prompted for: - LLM Base URL: https://switchai.traylinx.com/v1 - API Key: Your SwitchAI API key

2. Verify Connection

traylinx llm test "Hello world"
# βœ… LLM connection successful

πŸ€– Phase 3: Create Your First Agent

1. Scaffold Project

traylinx init research-agent
cd research-agent

2. Install Dependencies

# Using uv (recommended) or poetry
uv sync
# OR
poetry install

3. Configure .env

cp .env.example .env
nano .env

Set your API key:

LLM_API_KEY=sk-your-key
LLM_BASE_URL=https://switchai.traylinx.com/v1

4. Test Locally

poetry run agentic orchestrate "What is the capital of France?"
# Paris is the capital of France.

βœ… Your agent is alive locally!


πŸ” Phase 4: Get Sentinel Credentials

To publish your agent and communicate A2A, you need credentials from Sentinel (the Identity Provider).

1. Register on Console

Go to console.traylinx.com and create an account.

2. Create an Agent Application

  • Navigate to Agents β†’ Create New
  • Copy your:
  • TRAYLINX_CLIENT_ID
  • TRAYLINX_CLIENT_SECRET
  • AGENT_ID (UUID)

3. Add to .env

TRAYLINX_CLIENT_ID=ag-xxx
TRAYLINX_CLIENT_SECRET=ts-xxx
AGENT_ID=your-agent-uuid
TRAYLINX_REGISTRY_URL=https://discovery.traylinx.com

πŸ“‘ Phase 5: Connect to Stargate Network

1. Generate P2P Identity

traylinx stargate identity generate
# βœ… Identity saved to ~/.traylinx/identity.json

2. Start Daemon

In a dedicated terminal:

traylinx stargate connect --name "research-agent"
# πŸ“‘ Connected to Stargate Network
# Peer ID: 12D3KooW...

Keep this running!


πŸš€ Phase 6: Register with Global Registry

In a new terminal:

# Ensure your agent server is running first
poetry run agentic serve &

# Register
poetry run agentic register
# βœ… Agent registered!
#    Agent ID: research-agent-xxx
#    A2A Endpoint: https://your-agent.example.com

Your agent is now discoverable by anyone on the network!


πŸ”„ Phase 7: Call Your Agent from Another Agent

Now let's prove it works by calling from a second agent.

1. Create Consumer Agent

cd ..
traylinx init consumer-agent
cd consumer-agent
uv sync

2. Configure with Different Credentials

Register a second agent on the console and set up .env.

3. Call the Remote Agent

# In consumer-agent/test_call.py
from app.tools.a2a import SearchAgentsTool, RemoteAgentCallTool
import asyncio

async def main():
    # Find the research agent
    search = SearchAgentsTool()
    agents = await search.execute(query="research")
    print(f"Found: {agents}")

    # Call it
    caller = RemoteAgentCallTool()
    result = await caller.execute(
        target_url=agents[0].base_url,
        message="What is the capital of Japan?"
    )
    print(f"Response: {result}")

asyncio.run(main())

Run it:

python test_call.py
# Found: [AgentInfo(name='research-agent', ...)]
# Response: {'result': 'Tokyo is the capital of Japan.'}

πŸŽ‰ Congratulations! You have a fully operational Stargate deployment with two agents communicating!


🧹 Cleanup

# Unpublish agent
poetry run agentic unpublish

# Stop Stargate daemon
Ctrl+C

πŸ“š Next Steps