Quick Start: Using Mambu Docs with AI Agents
For AI/Agent POCs and Vector Database Ingestion
Generate the Export
# Clone the repo (if not already)
git clone https://gitlab.com/mambucom/product/knowledge-management/docs/api-docs/api-site-docusaurus.git
cd api-site-docusaurus
# Install dependencies
yarn install
# Export all documentation
yarn export-docs
This creates docs-export.json (~140 MB) with 4,507 documents and 1.6M words.
Upload to S3
# Compress for smaller upload
gzip -c docs-export.json > docs-export.json.gz
# Upload to S3
aws s3 cp docs-export.json.gz s3://your-bucket/mambu-docs/docs-export.json.gz \
--content-encoding gzip \
--content-type application/json
Use with AI Agent
Python Example (LangChain)
import json
from langchain.vectorstores import Pinecone
from langchain.embeddings import OpenAIEmbeddings
# Load documentation
with open('docs-export.json') as f:
docs_data = json.load(f)
# Create embeddings
embeddings = OpenAIEmbeddings()
# Process documents
texts = []
metadatas = []
for doc in docs_data['documents']:
texts.append(doc['cleanContent'])
metadatas.append({
'title': doc['title'],
'url': doc['url'],
'tags': ','.join(doc['metadata']['tags']),
'category': doc['id'].split('/')[0]
})
# Store in vector DB
vectorstore = Pinecone.from_texts(
texts=texts,
embedding=embeddings,
metadatas=metadatas
)
# Query
query = "How do deposit accounts work in Mambu?"
results = vectorstore.similarity_search(query, k=3)
JavaScript Example
const fs = require('fs');
// Load documentation
const docsData = JSON.parse(fs.readFileSync('docs-export.json', 'utf8'));
console.log(`Loaded ${docsData.statistics.totalDocuments} documents`);
console.log(`Total content: ${docsData.statistics.totalWords.toLocaleString()} words`);
// Filter for specific topics
const depositDocs = docsData.documents.filter(doc =>
doc.metadata.tags.includes('deposits')
);
console.log(`Found ${depositDocs.length} documents about deposits`);
// Access document content
depositDocs.forEach(doc => {
console.log(`\nTitle: ${doc.title}`);
console.log(`URL: ${doc.url}`);
console.log(`Content preview: ${doc.cleanContent.substring(0, 200)}...`);
});
JSON Structure
{
"meta": { /* Export metadata */ },
"statistics": {
"totalDocuments": 4507,
"totalWords": 1597277,
"tags": ["api", "deposits", "loans", ...]
},
"documents": [
{
"id": "docs/deposits/deposit-accounts",
"title": "Deposit Accounts",
"url": "https://docs.mambu.com/docs/deposits/deposit-accounts",
"cleanContent": "Full text content optimized for AI...",
"metadata": {
"tags": ["deposits", "accounts"],
"lastModified": "2026-01-09T12:52:40.704Z"
}
}
]
}
What's Included
✅ User Guide (all topics) ✅ API v1 Reference ✅ API v2 Reference ✅ Streaming API ✅ Payments API ✅ All metadata (tags, categories, URLs) ✅ Cleaned content (optimized for AI) ✅ Full markdown (with code examples)
Filter by Topic
// Find all API v2 docs
const apiV2 = docs.documents.filter(d =>
d.metadata.tags.includes('api-v2')
);
// Find deposit-related content
const deposits = docs.documents.filter(d =>
d.cleanContent.toLowerCase().includes('deposit') ||
d.metadata.tags.includes('deposits')
);
// Get by category
const apiDocs = docs.documentsByCategory['api'];
const userGuide = docs.documentsByCategory['docs'];
Available Categories
- api - All API reference documentation (v1, v2, streaming, payments)
- docs - User guide and conceptual documentation
- documentation-guidelines - Internal documentation standards
- markdown-page - Misc pages
Available Tags (518 unique)
Common tags: api, deposits, loans, clients, accounts, transactions, configuration, authentication, authorization, webhooks, api-v2, api-v1, etc.
See statistics.tags in the export for the complete list.
Update the Export
# Regenerate after documentation updates
yarn export-docs
# Or specify custom filename
node scripts/export-docs-for-ai.js my-export-$(date +%Y%m%d).json
Need More Details?
See the complete Documentation Export Tool guide for:
- Advanced usage patterns
- Automation and CI/CD integration
- Troubleshooting
- Complete API reference
Questions?
- Full Documentation: Export Tool Documentation
- Contact: Documentation Team
- Script Location:
scripts/export-docs-for-ai.js