-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
Common questions about the Cognitive Engine.
The Cognitive Engine is an AI system that implements explicit, persistent, and inspectable thought formation. Unlike traditional AI that provides immediate answers, the Cognitive Engine:
- Generates multiple competing thoughts
- Deliberates and refines those thoughts
- Selects the best thought based on evaluation
- Provides confidence scores for answers
- Learns from experience over time
Key differences:
- Thought Process: You can see the reasoning process, not just the final answer
- Confidence Scores: The engine tells you how certain it is about its answer
- Learning: It learns from interactions and improves over time
- Transparency: All cognitive processes are inspectable
- Customization: You can adjust how deeply it thinks
Common use cases:
- Research and learning
- Decision making
- Creative writing
- Code assistance
- Problem solving
- Complex analysis
- Autonomous task execution (agent mode)
No for basic usage. The interactive mode is designed for non-technical users. Programming knowledge is only needed for:
- Advanced configuration
- API integration
- Custom tool development
- Deployment
Minimum:
- Python 3.9+
- 4 GB RAM
- 10 GB storage
- Internet connection for LLM APIs
Recommended:
- Python 3.10+
- 8 GB RAM
- 20 GB SSD storage
- Stable internet connection
Yes, you need at least one LLM provider API key:
- OpenAI API key (https://platform.openai.com/api-keys)
- Anthropic API key (https://console.anthropic.com/)
You can use either or both.
Partially. The core engine runs locally, but it requires internet access to call LLM APIs (OpenAI, Anthropic). Some features like the dashboard and agent tools (web search) also require internet.
# Clone the repository
git clone <repository-url>
cd cognitive_engine
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Configure
cp .env.example .env
# Edit .env with your API keys
# Run
python run.pyIn interactive mode:
python run.pyThen enter your question when prompted:
Enter your query: What is machine learning?
- 0.8-1.0 (High): Very certain, can rely on the answer
- 0.5-0.8 (Medium): Reasonably certain but may have nuances
- 0.0-0.5 (Low): Uncertain, answer may be incomplete or speculative
The Cognitive Engine deliberates on multiple thoughts before answering. This takes more time but produces more considered responses. You can reduce the time by:
- Lowering
MAX_ITERATIONS - Lowering
MIN_ITERATIONS - Setting
EARLY_STOP_CONFIDENCEto a lower value
Yes! Enable reasoning traces:
ENABLE_REASONING_TRACE=true python run.pyOr use the Python API:
result = engine.process("Your question")
print(result.reasoning_trace)Reduce iteration depth:
MIN_ITERATIONS=1 MAX_ITERATIONS=5 python run.pyOr use the faster LLM provider:
DEFAULT_LLM_PROVIDER=openai python run.pyIncrease iteration depth:
MIN_ITERATIONS=5 MAX_ITERATIONS=50 python run.pyOr require higher confidence:
CONFIDENCE_THRESHOLD=0.9 python run.pyThe dashboard is a real-time visualization of the cognitive process. It shows:
- Thought generation and relationships
- Memory growth and content
- Strategy shifts over time
- Deliberation evolution
Start it with:
python run.py dashboardAccess at http://localhost:8000
Agent mode enables goal-directed autonomous behavior. The agent can:
- Accept high-level goals
- Create execution plans
- Use tools (web search, code execution)
- Learn from results
- Adapt its strategy
Start with:
python run.py agentThe learning system extracts patterns from memory and converts them into rules. Over time, the engine:
- Recognizes recurring patterns in its reasoning
- Learns which strategies work best
- Applies learned rules to future queries
- Improves its performance
Yes:
ENABLE_LEARNING=false python run.pyPrompt evolution is an experimental feature where the system:
- Suggests improvements to its own prompts
- Tests new prompts via A/B testing
- Adopts only validated improvements
- Can roll back if performance degrades
It's disabled by default. Enable with:
ENABLE_PROMPT_EVOLUTION=true python run.pySet the environment variable:
DEFAULT_LLM_PROVIDER=anthropic # or 'openai'Or in Python:
from core.config import Config
config = Config(default_llm_provider="anthropic")- MIN_ITERATIONS: Minimum iterations before considering early stop (default: 3)
- MAX_ITERATIONS: Maximum iterations to prevent infinite loops (default: 50)
The minimum confidence required for acceptable output (default: 0.7). If no thought meets this threshold after MAX_ITERATIONS, the best available thought is used.
Set the environment variable:
MAX_MEMORY_SIZE=10000This limits the number of entries stored in memory.
Yes, it stores all interactions in its three-layer memory system:
- Episodic Memory: Raw events and interactions
- Pattern Memory: Recurring behaviors and structures
- Rule Memory: Learned strategies
Yes:
# Clear all memory
rm cognitive_engine.db
# Or use the Python API
from core.memory import ThreeLayerMemory
memory = ThreeLayerMemory()
memory.clear_all()engine = CognitiveEngine()
memory = engine.get_memory()
episodic = memory.get_episodic_memory()
patterns = memory.get_pattern_memory()
rules = memory.get_rule_memory()Yes, if enabled. The system:
- Extracts patterns every
LEARNING_INTERVALcycles - Synthesizes rules from patterns
- Applies rules to future queries
You can control this with:
ENABLE_LEARNING=true
LEARNING_INTERVAL=100Yes, via the Python API:
from core.engine import CognitiveEngine
engine = CognitiveEngine()
result = engine.process("Your question")
print(result.final_output)Yes, you can create one using FastAPI:
from fastapi import FastAPI
from core.engine import CognitiveEngine
app = FastAPI()
engine = CognitiveEngine()
@app.post("/query")
async def query(query: str):
result = engine.process(query)
return {"answer": result.final_output}Yes, see the Integration Guide for details.
The engine is written in Python but can be integrated with any language via:
- REST API
- WebSocket
- Command-line interface
- Docker containers
Check:
- Python version is 3.9+
- All dependencies installed:
pip install -r requirements.txt - API keys are set in
.env - Check logs:
tail -f cognitive_engine.log
Ensure:
-
.envfile exists in project root - API key is set:
OPENAI_API_KEY=your_key - No spaces around
=in.env - Environment variables are loaded
Try:
- Reduce iterations:
MAX_ITERATIONS=10 - Use faster provider:
DEFAULT_LLM_PROVIDER=openai - Disable learning:
ENABLE_LEARNING=false
Try:
- Limit memory:
MAX_MEMORY_SIZE=5000 - Enable cleanup:
ENABLE_MEMORY_CLEANUP=true - Clear old data:
python run.py cleanup
Check:
- Dashboard enabled:
ENABLE_DASHBOARD=true - Port not in use:
DASHBOARD_PORT=8000 - Browser console for errors
- Firewall settings
For more issues, see the Troubleshooting Guide.
The Cognitive Engine itself is free (AGPL-3.0 license), but you pay for:
- LLM API calls (OpenAI, Anthropic)
- Your own infrastructure/hosting
- Any third-party services you use
It depends on usage:
- OpenAI: ~$0.002 per 1K tokens (GPT-3.5), ~$0.03 per 1K tokens (GPT-4)
- Anthropic: ~$0.008 per 1K tokens (Claude Instant), ~$0.03 per 1K tokens (Claude)
A typical query might use 1-5K tokens.
Yes:
- Use cheaper models (GPT-3.5 instead of GPT-4)
- Reduce iterations to minimize API calls
- Enable response caching
- Set usage alerts with your LLM provider
Your data is processed locally and stored in your own database. However:
- Queries are sent to LLM providers (OpenAI, Anthropic)
- Check their privacy policies for details
- You can self-host LLMs for complete privacy
Yes, in the local memory database. You can:
- Disable learning:
ENABLE_LEARNING=false - Clear memory periodically
- Not store sensitive information
The engine includes security features:
- Input validation
- Output sanitization
- API key protection
- Secure default configurations
See the Security Guide for details.
Yes, see the Development Guide for details on creating custom tools.
Yes, you can customize layer-specific prompts in llm/prompts.py.
Yes, extend the LLM client in llm/client.py to support additional providers.
Yes, deploy using:
- Docker containers
- Kubernetes
- Cloud services (AWS, GCP, Azure)
See the Deployment Guide for details.
The Cognitive Engine is more focused on explicit thought formation and deliberation, while LangChain is a framework for building LLM applications. They can be complementary.
Both support autonomous agents, but the Cognitive Engine has more sophisticated cognitive modeling, memory systems, and meta-cognition.
The Cognitive Engine shows its reasoning process, provides confidence scores, and learns over time. ChatGPT is faster but less transparent.
- Email: autobotsolution@gmail.com
- Address: Flushing MI
- Documentation: Check the wiki
- GitHub Issues: Report bugs there
- Check existing issues
- Create a new issue with:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Log excerpts
- Check existing feature requests
- Create a new issue with:
- Feature description
- Use case
- Proposed implementation (if known)
See the Development Guide for contributing guidelines.
AGPL-3.0 (GNU Affero General Public License)
- You can use, modify, and distribute the software
- You must provide source code for any modifications
- If you run it as a network service, users must have access to the source
- You must include the license and copyright notice
Yes, but you must:
- Provide source code for any modifications
- Make the source available to users of network services
- Include attribution
Only if you provide source code for any modifications and make it available to users of the network service. For purely proprietary use, consider a commercial license agreement.
Future planned features:
- Improved learning algorithms
- More tool integrations
- Better visualization
- Performance optimizations
- Additional LLM provider support
Join our community for:
- Discussions
- Feature requests
- Bug reports
- Collaboration opportunities
Release frequency depends on:
- Bug fixes (as needed)
- Feature development (ongoing)
- Security updates (immediate)
Yes! Contact us at autobotsolution@gmail.com for sponsorship opportunities.