Getting Started
Get up and running with the Metalogue SDK in 5 minutes.
Getting Started
Get up and running with Metalogue in 5 minutes.
Prerequisites
- Node.js 18+ / Python 3.9+ / Go 1.21+
- A Metalogue API key (get one here)
Installation
Choose your language:
TypeScript / Node.js
npm install @metalogue/sdk
# or
yarn add @metalogue/sdk
# or
pnpm add @metalogue/sdk
Python
pip install metalogue
# or
poetry add metalogue
Go
go get github.com/metalogue/metalogue-sdk-go
Quick Start
1. Initialize the Client
TypeScript:
import { MetalogueClient } from '@metalogue/sdk';
const client = new MetalogueClient({
apiKey: process.env.METALOGUE_API_KEY,
});
Python:
from metalogue import MetalogueClient
client = MetalogueClient(api_key=os.environ["METALOGUE_API_KEY"])
Go:
import metalogue "github.com/metalogue/metalogue-sdk-go"
client := metalogue.NewClient(os.Getenv("METALOGUE_API_KEY"))
2. Connect a Data Source
Add your first connector (e.g., Slack):
const connector = await client.createConnector({
connector_type: 'slack',
display_name: 'Company Slack',
credentials: { token: 'xoxb-your-slack-token' },
});
// Trigger initial sync
await client.syncConnector(connector.connector_id, true);
3. Query Your Data
Once synced, query across all connected sources:
const { results, reasoning, latencyMs } = await client.query(
'What was the decision on authentication architecture?',
{
limit: 10,
includeReasoning: true,
}
);
console.log(`Found ${results.length} results in ${latencyMs}ms`);
for (const result of results) {
console.log(`[${result.source}] ${result.content}`);
console.log(` Score: ${result.score}`);
console.log(` URL: ${result.url}`);
}
Core Concepts
Connectors
Connectors are data sources you connect to Metalogue. We support 41+ tools:
- Productivity: Slack, Notion, Google Workspace, Microsoft 365
- DevTools: GitHub, GitLab, Jira, Linear
- CRM: Salesforce, HubSpot, Pipedrive
- Support: Zendesk, Freshdesk, Intercom
Each connector syncs documents into the federated graph.
Federated Query
Queries search across all connected sources simultaneously:
const response = await client.query('quarterly report', {
sources: ['google-drive', 'notion'], // Optional: filter sources
dateRange: {
after: '2025-01-01',
before: '2025-12-31',
},
});
Ephemeral Context (Ghost Graph)
Results are assembled into an Ephemeral Context—a just-in-time relationship graph that:
- Connects related documents
- Respects token limits
- Enables multi-hop reasoning
Intent Ranking
Results are ranked using 5D intent vectors:
- Urgency - How time-sensitive is this?
- Emotional Weight - Rational vs emotional importance
- Action Likelihood - Browsing vs intent to act
- Social Dimension - Solo vs collaborative context
- Context Sensitivity - How context-dependent
Next Steps
Now that you're set up:
- Connect more sources - Add Notion, GitHub, and more
- Explore the API - See Sync, Query, Bridge
- Set up compliance - Configure Forget Request
- Deploy to production - Use our SDKs in your apps
Getting Help
- Documentation: You're here!
- GitHub: github.com/metalogue/metalogue
- Discord: Join our community
- Email: support@metalogue.xyz
