Agentic Flows Developer Guide
Overview
Package: @bluefly/agentic-flows
Version: Latest
License: MIT
Multi-Agent Workflow Orchestration with N8N custom nodes for CrewAI, Langflow integration, MLflow experiment tracking, and vector operations.
Key Features
- Agent Orchestration: CrewAI integration, multi-agent workflows, role-based agents
- Langflow Integration: N8N nodes for Langflow, visual flow builder, component deployment
- MLflow Experiment Tracking: Experiment logging, model registry, metrics tracking
- Vector Operations: Qdrant, Pinecone, Weaviate, Milvus support
- LLM Integration: Multi-provider support (OpenAI, Anthropic, Ollama, Bedrock)
- Observability: Phoenix Arize, MLflow tracking, Prometheus metrics
Installation
For N8N Users
cd ~/.n8n/custom
npm install @bluefly/agentic-flows
n8n start
For Developers
npm install @bluefly/agentic-flows
Quick Start
N8N Node Examples
CrewAI Agent Node
{
"node": "CrewAI Agent",
"parameters": {
"operation": "executeAgent",
"agentRole": "researcher",
"goal": "Research market trends",
"backstory": "Expert market analyst",
"task": "Analyze Q4 2024 AI market trends",
"tools": ["search", "calculator"]
}
}
Vector Search Node
{
"node": "Vector Search",
"parameters": {
"operation": "search",
"database": "qdrant",
"collection": "knowledge-base",
"query": "How to implement RAG?",
"topK": 5,
"scoreThreshold": 0.7
}
}
Programmatic API
import { AgenticFlows } from '@bluefly/agentic-flows';
const flows = new AgenticFlows({
n8nUrl: 'http://localhost:5678',
crewAiUrl: 'http://localhost:8000'
});
const workflow = await flows.createWorkflow({
name: 'Research and Analysis',
agents: [
{
role: 'researcher',
goal: 'Gather information',
tools: ['web_search', 'arxiv']
},
{
role: 'analyst',
goal: 'Analyze findings',
tools: ['data_analysis']
}
],
flow: 'sequential'
});
const result = await workflow.execute({
input: 'Analyze AI impact on healthcare'
});
Available N8N Nodes
| Node | Purpose | Operations |
|---|---|---|
| CrewAI Agent | Agent orchestration | Create, execute, coordinate |
| Vector Search | Semantic search | Index, search, update |
| LLM Gateway | LLM operations | Generate, embed, moderate |
| RAG Pipeline | Retrieval augmentation | Retrieve, generate, validate |
| Agent Memory | State management | Store, retrieve, clear |
| Tool Executor | Tool invocation | Execute, validate, retry |
Configuration
Environment Variables
# LLM Configuration
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
# Vector Databases
QDRANT_URL=http://localhost:6333
PINECONE_API_KEY=...
# CrewAI
CREWAI_API_URL=http://localhost:8000
Langflow + MLflow Integration
Execute Langflow from N8N
const langflowNode = {
node: "Execute Langflow",
parameters: {
workflowId: "my-ai-workflow",
inputs: { query: "Analyze market data" },
trackWithMLflow: true
}
}
MLflow Experiment Tracking
import { MLflowTracker } from '@bluefly/agentic-flows';
const tracker = new MLflowTracker({
trackingUri: 'http://localhost:5000'
});
await tracker.startRun({
experimentName: 'CrewAI Research Team',
runName: 'market-analysis-2024'
});
await tracker.logMetrics({
accuracy: 0.95,
cost: 0.42,
duration_seconds: 12.5
});
await tracker.endRun();
Testing
npm test
npm run test:coverage
npm run lint
Deployment
Kubernetes
kubectl create namespace agentic-flows
kubectl apply -f infrastructure/kubernetes/ -n agentic-flows
Documentation
- GitLab: https://gitlab.bluefly.io/llm/npm/agentic-flows
- OpenAPI Specs: openapi/