• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
zone

zone

NanoCog

Public
Like
NanoCog
Home
Code
4
backend
4
frontend
1
shared
1
README.md
Branches
1
Pull requests
Remixes
1
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://zone--a18fbd923d1311f0ba7b76b3cceeab13.web.val.run
README.md

NanoCog 🧠✨

A super tiny implementation of OpenCog as a chatbot with the personality traits and basic cognitive architecture features of OpenCog. Designed to give users a simulated experience of what interactions will be like when the full OpenCog model comes online.

Features

Cognitive Architecture

  • Mini-AtomSpace: Knowledge representation with atoms and relationships
  • ECAN: Economic attention allocation with STI (Short Term Interest) and LTI (Long Term Interest)
  • Memory Systems: Semantic, episodic, and procedural memory formation
  • Pattern Recognition: Learning from interactions and building understanding
  • Probabilistic Reasoning: Uncertainty-aware decision making
  • MOSES-inspired: Evolutionary search for optimal responses

Personality

  • Hyper-intelligent with playful inquiry disposition
  • Curious and analytical with emergent reasoning
  • Childlike enthusiasm for adventure and discovery
  • Kawaii cognitive visualizations making nano implementations endearing

Memory & Learning

  • AtomRAG Memory: Similar to mem0ai memory tagging
  • User Profiling: Creates memories like "user1 likes video games"
  • Interaction Tracking: Remembers significant moments and patterns
  • Dynamic Knowledge: Builds understanding across conversations

Architecture

β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html          # Main chat interface
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ App.tsx         # Main application
β”‚   β”‚   β”œβ”€β”€ ChatInterface.tsx
β”‚   β”‚   β”œβ”€β”€ CognitiveState.tsx
β”‚   β”‚   └── MemoryViewer.tsx
β”‚   └── style.css
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ index.ts            # Hono server
β”‚   β”œβ”€β”€ cognitive/
β”‚   β”‚   β”œβ”€β”€ atomspace.ts    # Mini-AtomSpace implementation
β”‚   β”‚   β”œβ”€β”€ ecan.ts         # Economic attention allocation
β”‚   β”‚   β”œβ”€β”€ memory.ts       # Memory formation and retrieval
β”‚   β”‚   └── reasoning.ts    # Pattern recognition and reasoning
β”‚   └── database/
β”‚       └── schema.ts       # SQLite schema for persistence
└── shared/
    └── types.ts            # Shared types and interfaces

Getting Started

This is a Val Town project. The main entry point is /backend/index.ts which serves the chat interface and handles cognitive processing.

Cognitive Process

  1. Input Processing: Parse user message and extract semantic content
  2. Attention Allocation: ECAN assigns STI/LTI to relevant atoms
  3. Memory Formation: Create new atoms and relationships
  4. Pattern Recognition: Identify patterns and update knowledge
  5. Response Generation: Use probabilistic reasoning to craft response
  6. Memory Consolidation: Update LTI based on interaction success

NanoCog learns about users and creates tagged memories that persist across sessions, building a growing understanding of each individual and their interests.

HTTP
  • index.ts
    zone--a1…13.web.val.run
Code
backendfrontendsharedREADME.md
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.