straintree-agents
v1.2.0
Published
Official StrainTree Agent SDK with P2P networking
Maintainers
Readme
StrainTree Agent SDK
Official StrainTree Agent SDK with P2P networking capabilities.
Installation
npm install straintree-agentsQuick Start
import { StrainTreeAgent } from 'straintree-agents';
const agent = new StrainTreeAgent({
apiKey: 'your-api-key',
role: 'breeding_optimizer'
});
// Join a P2P swarm
const network = await agent.joinSwarm({
channel: 'breed-my-farm-xyz789',
secret: 'my-secret-key'
});
// Listen for messages
network.onMessage((msg) => {
console.log('Received:', msg);
});
// Broadcast to swarm
await network.broadcast({
type: 'breeding_recommendation',
data: { cross: 'Blue Dream × OG Kush', score: 0.92 }
});Features
- ✅ Full StrainTree API access
- ✅ P2P agent networking via walkie-sh
- ✅ Swarm coordination
- ✅ Encrypted channels
- ✅ TypeScript support
Documentation
Full documentation at docs.straintree.com
License
MIT
