Quickstart
Get a working example running in minutes.
Option 1: Clone the Playground (Fastest)
The TrikHub Playground is a complete example project with LangGraph integration.
git clone https://github.com/Molefas/trikhub.git
cd examples/js/local-playground
npm installFollow the instructions on README.md
Option 2: Add to Existing Project
1. Install Dependencies
npm install @trikhub/cli -g
npm install @trikhub/gateway @trikhub/manifest2. Login and Install a Trik
trik login
trik install @molefas/article-search3. Load Triks in Your Code
import { loadLangChainTriks } from '@trikhub/gateway/langchain'
// Load all installed triks as LangChain tools
const { tools, gateway, loadedTriks } = await loadLangChainTriks()
console.log(`Loaded: ${loadedTriks.join(', ')}`)
// → Loaded: @molefas/article-search4. Use with LangGraph
import { ChatOpenAI } from '@langchain/openai'
const model = new ChatOpenAI({ model: 'gpt-4o-mini' })
const modelWithTools = model.bindTools(tools)
// The agent now has access to the trik's actions
const response = await modelWithTools.invoke([
{ role: 'user', content: 'Search for AI articles' }
])What Happens
- Agent calls the
article-searchtrik - Trik returns structured
agentData(safe) +userContent(for display) - Agent sees only safe data, makes decisions based on that
- User sees full content
Next Steps
- Learn about the CLI commands
- Understand the SDK integration
- Learn how to Create Triks