π³ 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)¶
Cross-Platform (pipx)¶
Verify¶
βοΈ Phase 2: Configure Your Environment¶
1. Set Up LLM Access (SwitchAI)¶
You'll be prompted for:
- LLM Base URL: https://switchai.traylinx.com/v1
- API Key: Your SwitchAI API key
2. Verify Connection¶
π€ Phase 3: Create Your First Agent¶
1. Scaffold Project¶
2. Install Dependencies¶
3. Configure .env¶
Set your API key:
4. Test Locally¶
β 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_IDTRAYLINX_CLIENT_SECRETAGENT_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¶
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¶
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¶
π Next Steps¶
- Multi-Agent Collaboration β Build agent teams
- Secure A2A Communication β Cryptographic auth deep-dive
- Human-in-the-Loop β Add approval gates