Quickstart Guide¶
Get Adaptive Sentience running in 5 minutes.
Prerequisites¶
- Python 3.9+
- Git
- (Optional) Android device with ADB for mobile testing
Installation¶
1. Clone the Repository¶
2. Set Up Python Environment¶
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Running Your First Workflow¶
We'll run a simple 3-terminal setup: Gateway → Edge Node → Demo Script
Terminal 1: Start the Gateway¶
You should see:
Gateway is ready
The HTTP gateway is now accepting requests on port 8787
Terminal 2: Start an Edge Node¶
You should see:
Node is ready
The edge node has joined the mesh and is ready to execute tools
Terminal 3: Run a Demo Workflow¶
This demo will:
- Connect to the gateway
- Discover available tools on the edge node
- Execute a workflow with tool calls
- Display execution evidence including trace ID and execution path
Example output:
{
"ok": true,
"verified": true,
"result": {
"redacted_text": "Contact [REDACTED]",
"redactions": [{"type": "email", "start": 8, "end": 25}]
},
"execution_path": ["local:abc123"],
"degraded": false
}
Understanding What Just Happened¶
1. Tool Discovery¶
The gateway discovered available tools on your edge node using UDP multicast:
# Gateway asks: "What tools do you have?"
# Node responds: "I can do: pii_redact, summarize, validate_schema"
2. Workflow Execution¶
Your demo script sent a workflow request:
{
"target": { "kind": "local" },
"tool_name": "pii_redact",
"tool_args": { "text": "Contact john@example.com" },
"token": { "capabilities": ["tool:pii_redact"] }
}
3. Policy Enforcement¶
The runtime checked:
- ✅ Capability token has required permission
- ✅ Tool exists on the node
- ✅ Input schema is valid
- ✅ Node is trusted (or uses TOFU)
4. Execution Evidence¶
After execution, you received:
- Trace ID: Unique identifier for this execution
- Execution path: Which nodes handled the work
- Verified status: Cryptographic verification passed
- Results: Tool output with schema validation
Next Steps¶
Try Offline Operation¶
- Stop the edge node (Ctrl+C in Terminal 2)
- Run the demo again
- The gateway will queue the request
- Restart the node → Request delivers automatically
Store-and-Forward
Requests are stored in the gateway's mailbox and delivered when nodes come back online
Add More Nodes¶
Run additional edge nodes on different ports:
The gateway will automatically discover and use both nodes for failover.
Test the Android App¶
See Android Deployment for instructions on running the mobile app.
Explore the MCP Server¶
Connect with Claude Desktop or other MCP clients.
Common Issues¶
Port Already in Use¶
Solution: Use a different port:
Node Not Discovered¶
Symptoms: Gateway says "No nodes available"
Solutions:
- Check firewall: UDP port 9999 must be open for multicast
- Check network: Nodes must be on same LAN
- Manual targeting: Use
"target": {"node_id": "local:abc123"}
Permission Denied¶
Solution: Add the capability to your token:
What to Read Next¶
- Core Concepts - Understand the architecture
- Tool Contracts - Define custom tools
- Policy Enforcement - Add governance
- API Reference - Complete API docs
Getting Help¶
- GitHub Issues: Report a bug
- Email: sales@adaptivesentience.io
- Demos: Check the
/demosdirectory for more examples