MCPcopy Index your code
hub / github.com/driftkit-ai/driftkit-framework

github.com/driftkit-ai/driftkit-framework @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
6,894 symbols 30,873 edges 855 files 2,423 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DriftKit Framework

Production-ready AI framework for Java - Complete prompt lifecycle management from development to production

🚀 Why choose DriftKit?

Framework comparison

Feature DriftKit Spring AI LangChain4j Google ADK
Text embedding ✅ Multiple providers ✅ Multiple providers ✅ Multiple providers
Vector storage ✅ In-memory, File, Pinecone, Spring AI (all providers) ✅ In-memory, Chroma, PGVector etc ✅ In-memory, Pinecone, Chroma etc
Structured output ✅ Java Pojo/Json based
Tool calling ✅ Type-safe with auto/manual-execution: function calling, tools, agents as tools
Prompt lifecycle management ✅ Dev→Test→Prod + Tracing
Visual prompt IDE ✅ Full web platform ❌ Code only ❌ Code only
Production prompt testing ✅ Test sets + evaluation
Prompt versioning ✅ Built-in ❌ Manual ❌ Manual
A/B testing ✅ Native
Test automation ✅ Comprehensive ⚠️ Basic
Multi-agent patterns ✅ Loop, Sequential, Hierarchical, Graph, Cross-graph calls ⚠️ Limited ✅ Built-in
Workflow as graph ✅ Full graph with cross-workflow calls ⚠️ Chain only ⚠️ Basic
Simplified LLM SDK ✅ High-level Agent API ⚠️ Low-level ⚠️ Complex ✅ Good
Prompt caching ✅ Unified: Claude, OpenAI, DeepSeek
Cache observability ✅ Hit/write/miss per request
Model hot-swap ✅ Config change only ✅ Config change ❌ Code rewrite ⚠️ Limited
Audio processing ✅ VAD + Transcription
Text-to-speech ❌ Not supported ✅ Multiple providers
Spring AI integration ✅ Full bidirectional integration Native

🎯 Unique features

  1. Complete prompt lifecycle platform - The ONLY framework with full Dev→Test→Prod workflow Dashboard — cost, tokens, latency metrics Prompt Editor with folders, versioning, state machine
  2. Prompt state machine: DRAFT → AUTO_TESTING → MANUAL_TESTING → CURRENT → REPLACED
  3. Version control, A/B testing, and folder organization
  4. Test sets with multiple evaluation methods
  5. Cost tracking (USD), token usage, and latency percentiles

  6. Production tracing with cache metrics - Real-time observability for every LLM call: Traces — per-request cache hit/write/miss, tokens, latency Trace Detail — cache metrics, system message, conversation context Cache Hit Ratio — DeepSeek prefix cache and Claude prompt cache

  7. Unified cache metrics across Claude (prompt cache), OpenAI (auto cache), DeepSeek (prefix cache)
  8. Per-request cache hit/write/miss token counts with hit ratio
  9. Hierarchical agent tracing (SequentialAgent, LoopAgent)
  10. Expandable conversation context and system message display

  11. Prompt Playground - Side-by-side prompt comparison: Playground — A/B prompt testing with shared variables

  12. Execute two prompts against the same variables
  13. Dataset sweep mode — run against entire test sets
  14. Pipeline playground — test prompt overrides in production pipelines

  15. Workflow as maintainable graph - Build complex agents with cross-workflow composition

  16. Simplified LLM SDK - High-level Agent API for quick prototyping and production
  17. Hot-swap AI models - Change models via config without code changes or recompilation
  18. Type-safe AI integration - Direct Java objects, no JSON parsing needed
  19. Multi-agent orchestration - Loop, Sequential, and Hierarchical patterns
  20. Built-in audio processing - VAD, transcription, and streaming capabilities
  21. Spring AI integration - Use DriftKit prompts with Spring AI ChatClient, full tracing support

🏆 Business solutions

Customer support automation

Problem: Support teams overwhelmed with repetitive inquiries, inconsistent responses, high costs
Solution: DriftKit automates 80% of common requests while maintaining brand voice

Technical Implementation: - driftkit-context-engineering: Create and A/B test response templates for different customer scenarios - driftkit-workflow-engine-core: Intelligent routing - simple questions to AI, complex issues to specialists - driftkit-vector: Knowledge base search for accurate, up-to-date information - driftkit-clients: Multi-model support (GPT-4/Gemini 2.5 Pro/Claude Opus 4 for complex, GPT-4o-mini/Gemini 2.5 Flash/Claude Haiku for simple queries) - driftkit-common: Conversation memory to maintain context across multiple interactions

Business Impact: 60% reduction in response time, 40% cost savings, 95% customer satisfaction

Financial document processing

Problem: Manual processing of contracts, invoices, compliance documents - slow, error-prone, expensive
Solution: Intelligent document analysis with 99%+ accuracy and structured data extraction

Technical Implementation: - driftkit-clients: Multi-modal AI (GPT-4 Vision/Gemini 2.5/Claude with vision) for processing PDFs, images, scanned documents - driftkit-embedding: Document similarity for duplicate detection and categorization
- driftkit-vector: Store processed documents for quick retrieval and compliance auditing - driftkit-workflow-engine-core: Multi-step validation workflows with human-in-the-loop for critical decisions - driftkit-common: Structured output extraction directly into your ERP/accounting systems

Business Impact: 90% faster processing, 95% error reduction, full compliance automation

E-commerce personalization engine

Problem: Generic product recommendations, poor conversion rates, high customer acquisition costs
Solution: AI-powered product matching and hyper-personalized customer journeys

Technical Implementation: - driftkit-vector: Product catalog embeddings for intelligent similarity matching - driftkit-embedding: Customer behavior analysis and preference modeling - driftkit-context-engineering: Dynamic product description templates for different customer segments - driftkit-workflow-engine-core: Real-time recommendation pipelines with A/B testing - driftkit-clients: Multi-model optimization (fast models like GPT-4o-mini/Gemini Flash/Claude Haiku for real-time, advanced models like GPT-4/Gemini Pro/Claude Opus for deep analysis)

Business Impact: 35% increase in conversion rates, 50% higher average order value, 60% improved customer lifetime value

Content marketing at scale

Problem: Consistent content creation across multiple channels, languages, and brand voices
Solution: Automated content generation maintaining brand consistency across all touchpoints

Technical Implementation: - driftkit-context-engineering: Brand voice templates with automated testing against brand guidelines - driftkit-workflow-engine-agents: Multi-stage content pipelines using SequentialAgent pattern - driftkit-vector: Content similarity checking to avoid duplication across channels - driftkit-embedding: SEO keyword optimization and content clustering - driftkit-clients: Model selection by content type (creative writing with GPT-4/Claude vs technical documentation with Gemini)

Business Impact: 10x content output, 80% cost reduction, consistent brand messaging across 50+ channels

HR and recruitment automation

Problem: Resume screening bottlenecks, unconscious bias, poor candidate experience
Solution: Intelligent candidate matching with bias reduction and automated communications

Technical Implementation: - driftkit-common: Resume parsing and structured data extraction (skills, experience, education) - driftkit-embedding: Candidate-job matching based on semantic understanding, not just keywords - driftkit-vector: Talent pool management and similar candidate discovery - driftkit-workflow-engine-core: Interview scheduling, personalized communications, feedback collection - driftkit-context-engineering: Personalized outreach templates optimized for response rates

Business Impact: 70% faster hiring process, 40% improvement in hire quality, 90% candidate satisfaction

Intelligent banking assistant

Problem: Banking customers need 24/7 support for complex transactions, account management, and financial advice - but current chatbots are limited to simple FAQ responses
Solution: Multi-step conversational AI that handles everything from balance inquiries to loan applications with seamless human handoff

Technical Implementation: - driftkit-workflow-engine: Advanced conversational workflows with automatic message tracking and human-in-the-loop support - driftkit-clients: Dynamic model selection (GPT-4/Claude Opus for financial advice, GPT-4o-mini/Claude Haiku for simple queries) with structured outputs for transaction data - driftkit-workflow-engine-agents: Multi-agent orchestration for complex financial analysis - LoopAgent for iterative refinement of investment advice - driftkit-vector: Knowledge base for financial products, regulations, and personalized investment recommendations - driftkit-context-engineering: Compliance-tested prompt templates for different financial scenarios with A/B testing for conversion optimization - driftkit-common: Persistent session management with encrypted conversation history and document processing for uploaded statements - Database Integration: Direct connections to core banking systems, CRM, and fraud detection APIs - Legacy System Integration: REST/SOAP connectors to existing banking infrastructure with real-time transaction processing

Conversation Flow Examples: - Simple: "What's my balance?" → Direct database query → Formatted response (2 seconds) - Complex: "Help me apply for a mortgage" → Identity verification → Document collection → Credit check → Pre-approval calculation → Loan officer scheduling (15-minute guided process) - Emergency: "My card was stolen" → Fraud detection → Card blocking → Replacement ordering → Temporary credit setup → Follow-up scheduling

Business Impact: 85% reduction in call center volume, 60% faster loan processing, 24/7 availability, 40% increase in product cross-sell, 95% customer satisfaction for complex transactions

🧩 Framework modules

Module Purpose Key Features
driftkit-common Core utilities Chat memory, document processing, templates
driftkit-clients AI pr

Extension points exported contracts — how you extend this code

Agent (Interface)
Base interface for all agents in the simplified DriftKit agent system. Agents are simplified wrappers around complex Dri [8 …
driftkit-workflows/driftkit-workflows-core/src/main/java/ai/driftkit/workflows/core/agent/Agent.java
TestConfigurer (Interface)
Interface for test configuration. [14 implementers]
driftkit-workflows/driftkit-workflow-test-framework/src/main/java/ai/driftkit/workflow/test/core/WorkflowTestContext.java
WorkflowContextFactory (Interface)
Factory interface for creating WorkflowContext instances. Allows customization of context creation, such as injecting ad [17 …
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/core/WorkflowContextFactory.java
Agent (Interface)
Base interface for all agents in the simplified DriftKit agent system. Agents are simplified wrappers around complex Dri [9 …
driftkit-workflows/driftkit-workflow-engine-agents/src/main/java/ai/driftkit/workflow/engine/agent/Agent.java
StreamingResponse (Interface)
Framework-agnostic interface for streaming responses. Implementations can be created for different frameworks (Spring We [7 …
driftkit-common/src/main/java/ai/driftkit/common/domain/streaming/StreamingResponse.java
DocumentLoader (Interface)
Interface for loading documents from various sources. Implementations should handle specific document sources like file [6 …
driftkit-rag/driftkit-rag-core/src/main/java/ai/driftkit/rag/core/loader/DocumentLoader.java
EmbeddingVectorStore (Interface)
Vector Store interface that supports similarity search using embedding vectors. This interface extends BaseVectorStore a [5 …
driftkit-vector/driftkit-vector-core/src/main/java/ai/driftkit/vector/core/domain/EmbeddingVectorStore.java
AnalyticsClient (Interface)
Feign client for AnalyticsController. Provides remote access to analytics and metrics endpoints. [4 implementers]
driftkit-workflows/driftkit-workflow-engine-spring-boot-starter/src/main/java/ai/driftkit/workflow/engine/spring/client/AnalyticsClient.java

Core symbols most depended-on inside this repo

build
called by 1059
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/builder/WorkflowBuilder.java
isEmpty
called by 529
driftkit-vector/driftkit-vector-core/src/main/java/ai/driftkit/vector/core/domain/DocumentsResult.java
get
called by 404
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/core/pipeline/PipelineRegistry.java
getName
called by 400
driftkit-workflows/driftkit-workflow-engine-agents/src/main/java/ai/driftkit/workflow/engine/agent/Agent.java
get
called by 398
driftkit-common/src/main/java/ai/driftkit/common/utils/Counter.java
error
called by 372
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/graph/Edge.java
stream
called by 365
driftkit-context-engineering/driftkit-context-engineering-spring-ai/src/main/java/ai/driftkit/context/springai/DriftKitChatClient.java
equals
called by 311
driftkit-embedding/driftkit-embedding-core/src/main/java/ai/driftkit/embedding/core/domain/Metadata.java

Shape

Method 5,011
Class 1,418
Function 210
Interface 158
Enum 97

Languages

Java97%
TypeScript3%

Modules by API surface

driftkit-workflows/driftkit-workflow-engine-core/src/test/java/ai/driftkit/workflow/engine/builder/FluentApiChatWorkflowTest.java119 symbols
driftkit-context-engineering/driftkit-context-engineering-core/src/test/java/ai/driftkit/context/core/service/TemplateEngineTest.java87 symbols
driftkit-workflows/driftkit-workflow-engine-agents/src/main/java/ai/driftkit/workflow/engine/agent/LLMAgent.java79 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/builder/WorkflowBuilder.java74 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/core/WorkflowEngine.java67 symbols
driftkit-workflows/driftkit-workflows-core/src/main/java/ai/driftkit/workflows/core/agent/LLMAgent.java60 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/main/java/ai/driftkit/workflow/engine/core/WorkflowContext.java50 symbols
driftkit-clients/driftkit-clients-spring-ai/src/main/java/ai/driftkit/clients/springai/SpringAIModelClient.java46 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/test/java/ai/driftkit/workflow/engine/examples/ChatWorkflowExample.java44 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/test/java/ai/driftkit/workflow/engine/schema/SchemaUtilsTest.java39 symbols
driftkit-clients/driftkit-clients-core/src/main/java/ai/driftkit/clients/core/TraceableModelClient.java39 symbols
driftkit-workflows/driftkit-workflow-engine-core/src/test/java/ai/driftkit/workflow/engine/examples/NewRouterWorkflowTest.java38 symbols

Datastores touched

(mongodb)Database · 1 repos
driftkit-devDatabase · 1 repos
driftkit-testDatabase · 1 repos

For agents

$ claude mcp add driftkit-framework \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact