Skip to content

cr-nattress/neural-agent-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Neural Agent

Create AI-powered digital twins that think, remember, and respond just like the people they represent.

Build Status Version License Node.js TypeScript

Neural Agent transforms unstructured information about individuals into sophisticated digital personas powered by multi-agent AI systems. Think of it as creating a digital twin that captures someone's personality, knowledge, communication style, and thought patterns.

Table of Contents


✨ What is Neural Agent?

Neural Agent is a web application that enables digital replication of individuals through:

  • πŸ“ Data Collection - Submit text blocks, links, and information about a person
  • πŸ€– AI Processing - LLMs analyze and structure the data into standardized personas
  • 🧠 Multi-Agent Simulation - Brain-inspired agent architecture replicates thought patterns
  • πŸ’¬ Interactive Chat - Converse with AI personas that embody real personalities

Perfect For

  • Memory Preservation - Capture the essence of loved ones for future generations
  • Research & Analysis - Study personality patterns and communication styles
  • Creative Projects - Generate realistic character interactions for stories or games
  • Personal AI Assistants - Create specialized agents based on expert knowledge

πŸš€ Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/cr-nattress/neural-agent-framework.git
cd neural-agent

# Install root dependencies
npm install

# Install UI application dependencies
cd apps/ui
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys

Environment Variables

Create .env.local in apps/ui/:

# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# OpenAI
OPENAI_API_KEY=sk-your_openai_api_key

Hello World Example

# Start the development server
cd apps/ui
npm run dev

# Open http://localhost:3000 in your browser

Create your first persona in 3 steps:

  1. Paste text about a person (bio, emails, social posts)
  2. Add relevant links (profiles, articles)
  3. Click "Create Persona" and watch AI structure the data

πŸ“– How It Works

Phase 1: Persona Creation

User Input (Text + Links)
         ↓
   Netlify Function
         ↓
   OpenAI Processing
         ↓
  Structured JSON Persona
         ↓
   Review & Approval
         ↓
  Supabase Storage

Example Input:

const personaData = {
  textBlocks: [
    "Sarah is a UX designer with 5 years experience...",
    "She's passionate about accessibility and inclusive design...",
    "Known for her empathetic approach to user research..."
  ],
  links: [
    "https://linkedin.com/in/sarah-designer",
    "https://medium.com/@sarah/accessibility-matters"
  ]
};

AI-Generated Output:

{
  "id": "persona_abc123",
  "name": "Sarah Chen",
  "occupation": "UX Designer",
  "traits": ["empathetic", "creative", "user-focused"],
  "interests": ["accessibility", "design thinking", "psychology"],
  "skills": ["Figma", "User Research", "Prototyping"],
  "values": ["inclusivity", "innovation", "user-centered design"],
  "communication_style": "Friendly, thoughtful, detail-oriented",
  "createdAt": "2025-11-05T12:00:00Z"
}

Phase 2: Multi-Agent Chat (Coming Soon)

User Message
     ↓
Centralized Agent Orchestrator
     ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Memory  β”‚ Reasoningβ”‚ Personality β”‚
β”‚ Agent   β”‚  Agent   β”‚   Agent     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     ↓
Persona-Aware Response

The multi-agent system mimics human brain architecture:

  • 🧠 Memory Agent - Maintains conversation context and history
  • πŸ’­ Reasoning Agent - Processes logic and generates responses
  • 🎭 Personality Agent - Applies persona traits to ensure authentic responses

🎯 Features

Current (Phase 1 - In Development)

  • πŸ“₯ Flexible Input - Accept unlimited text blocks and links
  • ⚑ AI Processing - OpenAI-powered data cleaning and structuring
  • πŸ“Š Structured Output - Standardized JSON persona format
  • πŸ” Review Interface - Verify AI-generated personas before saving
  • πŸ’Ύ Cloud Storage - Secure Supabase blob storage
  • πŸ“± Mobile-First Design - Responsive UI built with Next.js and shadcn/ui
  • πŸ”’ Type-Safe - Full TypeScript support with strict mode
  • ⚑ Performance - Optimized for fast processing and minimal latency

Roadmap

  • Multi-Agent Chat System (Phase 2)
  • Persona Management Dashboard (Phase 2)
  • Web Scraping - Automatic link content extraction (Phase 3)
  • Conversation Memory - Persistent chat history (Phase 2)
  • Authentication - Magic link email auth (Phase 2)
  • Multi-User Support - User accounts and profiles (Phase 7)
  • Behavioral Learning - Personas that improve from interactions (Phase 6)
  • Export/Import - Share and transfer personas (Phase 7)

πŸ—οΈ Architecture

Monorepo Structure

neural-agent/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ ui/          # Next.js web interface (primary app)
β”‚   β”œβ”€β”€ api/         # Backend API services (planned)
β”‚   β”œβ”€β”€ agents/      # Multi-agent system (planned)
β”‚   └── admin/       # Admin dashboard (planned)
β”œβ”€β”€ packages/
β”‚   └── libs/        # Shared libraries and utilities
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ backlog/     # Project management (epics, stories, tasks)
β”‚   └── prompts/     # AI agent prompts
β”œβ”€β”€ .github/         # GitHub configuration
└── .claude/         # AI assistant configuration

Technology Stack

Frontend

Technology Version Purpose
Next.js 16.0+ React framework with App Router
TypeScript 5.9+ Type-safe development
React 19.2+ UI library
Tailwind CSS 4.1+ Utility-first CSS
shadcn/ui Latest Accessible UI components
Zod 4.1+ Schema validation

Backend & Infrastructure

Technology Purpose
Netlify Functions Serverless backend
OpenAI API LLM processing (GPT-4/3.5-turbo)
Supabase Database & blob storage
TypeScript Type-safe backend code

Future: Multi-Agent System

  • LangChain or custom orchestration
  • Specialized agent modules (Memory, Reasoning, Personality)
  • Inter-agent communication protocol

Service Architecture

The frontend uses a service abstraction pattern for type-safe API integration:

// Service interface defines contract
interface IPersonaService {
  processPersona(input: PersonaInputPayload): Promise<ProcessPersonaResponse>;
  savePersona(payload: SavePersonaPayload): Promise<SavePersonaResponse>;
  getPersona(id: string): Promise<GetPersonaResponse>;
}

// Real implementation calls Netlify Functions
export const apiPersonaService: IPersonaService = {
  async processPersona(input) {
    return fetch('/.netlify/functions/process-persona', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(input)
    });
  }
};

// Service factory exports active implementation
export const personaService = apiPersonaService;

πŸ› οΈ Development

Available Commands

# UI Application (apps/ui)
cd apps/ui

# Development
npm run dev          # Start dev server (http://localhost:3000)
npm run build        # Build for production
npm run type-check   # TypeScript validation
npm run lint         # ESLint checking

# Root-level convenience commands
npm run dev:ui       # Run UI from project root
npm run build        # Build for production
npm run install:all  # Install all dependencies

Project Structure

apps/ui/
β”œβ”€β”€ app/              # Next.js App Router pages
β”‚   β”œβ”€β”€ page.tsx      # Landing/builder page
β”‚   β”œβ”€β”€ layout.tsx    # Root layout
β”‚   └── api/          # API routes (if needed)
β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ ui/           # shadcn/ui components
β”‚   β”œβ”€β”€ persona/      # Persona-specific components
β”‚   └── layout/       # Shared layout components
β”œβ”€β”€ services/         # Service layer
β”‚   β”œβ”€β”€ persona.service.ts        # Persona service interface
β”‚   └── api/
β”‚       └── apiPersonaService.ts  # API implementation
β”œβ”€β”€ lib/              # Utilities
β”‚   β”œβ”€β”€ supabase/     # Supabase client setup
β”‚   └── types.ts      # TypeScript type definitions
β”œβ”€β”€ public/           # Static assets
β”œβ”€β”€ styles/           # Global styles
└── package.json      # Dependencies

Development Workflow

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and test
npm run type-check   # Ensure no TypeScript errors
npm run lint         # Check code style

# Commit with descriptive message
git commit -m "feat: add amazing feature"

# Push to remote
git push origin feature/amazing-feature

# Create a Pull Request on GitHub

πŸ“š Documentation

  • πŸ“– OBJECTIVE.md - Project vision and phased roadmap
  • πŸ—ΊοΈ PLAN.md - Detailed implementation plan and architecture
  • πŸ€– CLAUDE.md - AI assistant development guide
  • πŸ“‹ Backlog - Agile project management structure
  • ℹ️ ABOUT.md - GitHub about section content

Key Concepts

  • Persona - Structured digital representation of an individual with traits, interests, and communication style
  • Multi-Agent System - Collection of specialized AI agents working together (Memory, Reasoning, Personality)
  • Service Abstraction - Interface-based design for type-safe API integration
  • Netlify Functions - Serverless backend for persona processing and data storage

🀝 Contributing

Contributions are welcome! Neural Agent is in active development and we'd love your help.

Ways to Contribute

  • πŸ› Report Bugs - Found an issue? Open a GitHub issue
  • πŸ’‘ Suggest Features - Have ideas? We're listening
  • πŸ“ Improve Docs - Help make the docs clearer
  • πŸ”§ Submit PRs - Code contributions always welcome

Development Setup

# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/neural-agent-framework.git
cd neural-agent

# Create a feature branch
git checkout -b feature/amazing-feature

# Install dependencies
npm install
cd apps/ui && npm install

# Make your changes
npm run dev          # Start dev server
npm run type-check   # Validate types
npm run lint         # Check style

# Commit and push
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature

# Create a Pull Request on GitHub

Coding Guidelines

  • βœ… Use TypeScript strict mode
  • βœ… Follow mobile-first responsive design
  • βœ… Write clear, descriptive commit messages
  • βœ… Update documentation for API changes
  • βœ… Format code with Prettier (configured in project)
  • βœ… Run npm run lint before committing
  • βœ… Ensure npm run type-check passes

πŸ—ΊοΈ Roadmap

Neural Agent follows a 7-phase development plan:

  • Phase 0 - Planning & Architecture βœ…
  • Phase 1 - Foundation & Data Handling (Current)
    • Web interface for persona creation
    • OpenAI integration for data processing
    • Supabase storage implementation
    • Type-safe service architecture
  • Phase 2 - Chat Interface & Authentication
    • Interactive chat UI with multi-agent backend
    • Persona selection and retrieval
    • Magic-link email authentication
    • User profiles and data ownership
  • Phase 3 - Information Enrichment
    • Web scraping for links
    • Automated research capabilities
    • Data confidence scoring
  • Phase 4 - Single Agent Prototype
    • Conversational agent with memory
    • Personality trait extraction
    • Advanced context awareness
  • Phase 5 - Multi-Agent Architecture
    • Brain-inspired agent system
    • Agent orchestration and communication
    • Specialized agent roles
  • Phase 6 - Advanced Replication
    • Learning from interactions
    • Behavioral pattern recognition
    • Quality metrics and scoring
  • Phase 7 - Production Features
    • Admin dashboard
    • Privacy & security hardening
    • Export/Import capabilities
    • Scaling and performance optimization

See PLAN.md for detailed implementation steps.


πŸ”’ Security & Privacy

Neural Agent handles sensitive personal information. Security considerations:

  • πŸ” API Keys - Stored in environment variables, never committed to version control
  • πŸ›‘οΈ Input Validation - All user input sanitized before processing
  • πŸ”’ Data Encryption - Supabase encryption at rest and in transit
  • 🚫 Access Control - Bucket policies and RLS (row-level security) planned
  • πŸ“œ Privacy Policy - Clear disclosure of data usage required

⚠️ Note: This is early-stage software (Alpha). Do not use in production without thorough security review.


❓ FAQ

Q: Is this ready for production use?

A: No, Neural Agent is currently in Phase 1 (alpha). It's under active development. Do not use with sensitive data in production.

Q: What LLM models are supported?

A: Currently OpenAI GPT-4 and GPT-3.5-turbo. More models planned (Claude, Llama, etc.).

Q: Can I self-host this?

A: Yes! The architecture supports self-hosting. Detailed documentation coming soon.

Q: How much does it cost to run?

A: Costs depend on OpenAI API usage. Estimated $0.01-0.10 per persona creation. Supabase has a generous free tier.

Q: Is my data shared or trained on?

A: No. Your data is stored privately in your Supabase instance. OpenAI's data usage policy applies to API calls.

Q: Can personas be exported?

A: Export functionality is planned for Phase 7. Currently data is stored as JSON in Supabase and can be manually exported.

Q: How do I report a security vulnerability?

A: Please email security@example.com with details (or open a private security advisory on GitHub).


πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.

Copyright Β© 2025 Neural Agent Contributors


πŸ™ Acknowledgments

Neural Agent is inspired by:

  • Brain-computer interface research and cognitive architectures
  • Multi-agent systems in AI (AutoGPT, MetaGPT, CrewAI)
  • Digital preservation and memory projects

Built with:

Special thanks to the open-source community for the amazing tools and inspiration.


🚧 Project Status

Current Phase: Phase 1 - Foundation & Basic Data Handling Status: Active Development (Alpha) Last Updated: November 2025

Recent Updates

  • βœ… Project architecture defined
  • βœ… Technology stack finalized
  • βœ… Development roadmap created
  • βœ… GitHub documentation setup
  • 🚧 Frontend persona creation interface
  • 🚧 Service layer and API integration
  • ⏳ Backend integration (Netlify Functions)

πŸ’¬ Community & Support


Repository β€’ Documentation β€’ Roadmap β€’ Contributing

Made with ❀️ by developers who believe in preserving human connections through technology

About

Neural Agent is a web application that transforms text-based information about people into interactive digital personas powered by artificial intelligence. Submit information about a person through text blocks and links, and our system uses advanced LLMs to create structured, standardized persona profiles that can engage in intelligent conversation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors