Skip to content

haih-net/agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Agent

Startup kit for rapid deployment of learning agents with conversational experimentation capabilities.

✨ Features

Feature Description
🧠 Memory System 11-type MindLogs — agent learns and remembers context
🔄 n8n Integration Custom AgentOrchestrator node with OpenAI SDK
🏭 Agent Factory Generate new agents from TypeScript configs
Streaming Real-time responses with tool call notifications
🛠️ Built-in Tools File operations, GraphQL requests, web search
🔐 Auth Ready JWT authentication out of the box
🎨 Next.js Frontend Ready-to-deploy chat UI — build your site on top
🗄️ Supabase + Prisma Full backend with migrations and type-safe ORM

  🚀 Zero Config — clone, install, run. No complex setup required.

⚠️ Tested on Linux only. Windows/macOS users: please report issues if something doesn't work.  

🎯 Who Is This For?

  • 🔬 AI Enthusiasts — experiment with conversational agents
  • 👨‍💻 Developers — study agent architecture and patterns
  • 📚 Students — learn practical AI agent implementation
  • 🧪 Researchers — test learning and memory systems

Stack

  • Frontend: Next.js 16 + React 18 + styled-components 6
  • Backend: Express 4 + Apollo Server 5 + Pothos GraphQL
  • Database: PostgreSQL + Prisma ORM 6
  • Auth: JWT
  • n8n: AI agents and workflow automation

Getting Started

Local Development

  1. Copy environment file:
cp docker/.env.sample docker/.env
  1. Start database:
cd docker
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build supabase
  1. Start application:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build app

Project Structure

├── src/                        # Frontend
│   ├── components/
│   ├── pages/
│   └── gql/                    # GraphQL queries and generated types
├── server/                     # Backend
│   ├── schema/                 # GraphQL schema (Pothos + Prisma)
│   └── n8n/                    # n8n integration
│       ├── bootstrap/          # Workflow import
│       ├── custom-nodes/       # Custom n8n nodes
│       └── workflows/          # Workflow definitions
│           ├── agent-chat/     # Main chat agent
│           ├── agent-web-search/ # Web search (Perplexity)
│           ├── agent-factory/  # Agent factory
│           └── tool-*/         # Tool workflows
├── prisma/                     # Database schema
└── credentials/                # n8n credentials

n8n Integration

Agents

  • Chat Agent — main user interface
  • Web Search Agent — internet search (Perplexity)

Custom Nodes

Located in server/n8n/custom-nodes/. Rebuild after changes:

cd server/n8n/custom-nodes && npm run build

Credentials

Before running, set up your API credentials in credentials/:

  1. Create credentials/system/openrouter.json:
[
  {
    "id": "openrouter-cred",
    "name": "OpenRouter",
    "type": "openRouterApi",
    "data": { "apiKey": "sk-or-v1-xxx" }
  }
]
  1. Create credentials/bootstrap.env:
N8N_BOOTSTRAP_OWNER_EMAIL=admin@example.com
N8N_BOOTSTRAP_OWNER_PASSWORD=YourPassword123!
N8N_BOOTSTRAP_OWNER_FIRSTNAME=Admin
N8N_BOOTSTRAP_OWNER_LASTNAME=User

See credentials/README.md for full documentation.

Environment Variables

DATABASE_URL="postgresql://user:pass@localhost:5432/dbname"
JWT_SECRET="your-secret-key"
GRAPHQL_WS_PORT=4000
PORT=3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published