Modern AI framework for building context-aware AI applications.
Early Development Notice: neucore is currently in early development (v0.0.1). APIs may change significantly between versions. See Component Status for implementation details.
neucore provides the essential building blocks for creating sophisticated AI applications with memory, context management, reasoning capabilities, and plugin-based extensibility. It's designed to be modular, flexible, and performant.
- Memory Management: Store and retrieve conversations, documents, and other data with vector embeddings for semantic search
- Context Building: Intelligently select relevant context for LLM prompts
- Reasoning System: Structured approaches to complex reasoning (Chain of Thought, etc.)
- Template System: Dynamic content generation with variable substitution and formatting
- Action System: Define and execute concrete operations with validation
- Character Traits System: Define and apply consistent AI personalities and styles
- Model Context Protocol (MCP): Structured approach to AI interactions
- Provider Adapters: Support for multiple AI providers (currently Anthropic, with OpenAI planned)
- RAG System: Enhance responses with knowledge retrieval and processing
- Goal Management: Track and manage objectives for agents and users
npm install neucore
import {
createProviderFactory,
createContextBuilder,
ChainOfThoughtReasoner,
ReasoningMethod
} from 'neucore';
// Initialize provider
const providerFactory = createProviderFactory({
anthropic: {
apiKey: "your-api-key",
defaultModel: "claude-3-sonnet-20240229"
}
});
const modelProvider = providerFactory.getProvider();
// Create a reasoning system
const reasoner = new ChainOfThoughtReasoner(modelProvider, {
method: ReasoningMethod.CHAIN_OF_THOUGHT
});
// Use reasoning to solve a complex problem
const result = await reasoner.reason("How can I optimize database queries to improve application performance?", {
methodOptions: {
stepCount: 5,
enableTaskPlanning: true
}
});
console.log(result.conclusion);
See Component Status for the current implementation status of each component.
The Model Context Protocol provides a structured intent-based system for AI interactions, inspired by mature application design patterns.
- Intent System: Route requests to appropriate handlers based on actions and categories
- Provider Abstraction: Decouple client code from specific AI provider implementations
- Flexible Routing: Support for targeted intents and broadcasts to multiple handlers
- Extensible Design: Add new handlers and actions without modifying client code
// Create an intent router
const router = new IntentRouter();
// Register handler(s)
await router.registerHandler(new AnthropicHandler(apiKey));
// Create and send an intent
const intent = new Intent('anthropic:generate', {
prompt: 'Write a haiku about programming'
});
intent.putExtra('model', 'claude-3-haiku-20240307');
// Send the intent to get results
const results = await router.sendIntent(intent, {
userId: 'user123'
});
- Documentation Index - Complete list of all documentation
- System Documentation - Comprehensive overview of all major subsystems
- Reasoning System - Documentation for the reasoning system
- Validation System - Utilities for runtime type checking and validation
- Future Reasoning Methods - Planned reasoning implementations
- Reasoner Implementation Guide - Guide for implementing new reasoners
- Mock Migration Guide - Guide for proper dependency injection
neucore/
├── docs/ # Documentation files
│ ├── SYSTEM-DOCUMENTATION.md # System overview
│ ├── COMPONENT-STATUS.md # Implementation status
│ ├── REASONING.md # Reasoning system docs
│ ├── CHARACTER.md # Character system docs
│ └── ... # Other documentation
├── src/
│ ├── core/ # Core framework functionality
│ │ ├── memory/ # Memory management
│ │ ├── context/ # Context building
│ │ ├── reasoning/ # Reasoning system
│ │ ├── character/ # Character traits system
│ │ ├── actions/ # Action system
│ │ ├── templates/ # Template system
│ │ ├── rag/ # Retrieval Augmented Generation
│ │ ├── goals/ # Goal management
│ │ ├── providers/ # Model providers
│ │ ├── relationships/ # Entity relationships
│ │ ├── database/ # Database abstraction
│ │ ├── validation/ # Data validation
│ │ ├── logging/ # Logging system
│ │ ├── config/ # Configuration
│ │ └── errors/ # Error handling
│ ├── mcp/ # Model Context Protocol
│ ├── test/ # Testing utilities and mocks
│ ├── types/ # Type definitions
│ └── index.ts # Main exports
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Run linter
npm run lint
- Complete OpenAI provider implementation
- Implement additional reasoning methods (Tree of Thought, ReAct, etc.)
- Add comprehensive validation across all components
- Enhance error handling and reporting
- Add streaming support to all providers
- Implement database adapters for popular databases
- Create higher-level agent abstractions
As this project is in early development, please contact the maintainers before making significant contributions.
MIT