PAL

Personal agent that learns. Knowledge base, wiki, and structured data that compounds over time.

PAL is a Personal Agent that Learns how you work by building a compounding knowledge base.

Feed it raw data (articles, papers, notes, URLs) and it organizes everything into two layers: a compiled wiki for text-heavy knowledge and a SQL database for structured data. Scheduled tasks compile new sources daily and run health checks to find gaps.

How It Works

PAL is a team of five specialists coordinated by a leader:

AgentRole
NavigatorRoutes queries, reads wiki, handles email/calendar/SQL/files
ResearcherWeb search, source gathering, writes to raw/
CompilerReads raw/, compiles structured wiki articles
LinterHealth checks on the wiki, finds gaps and contradictions
SyncerCommits and pushes context/ changes to GitHub

Knowledge Pipeline

Raw data flows through a compilation pipeline:

  1. Ingest — Feed PAL URLs, articles, or text. The Researcher saves them to context/raw/.
  2. Compile — The Compiler produces structured wiki articles in context/wiki/.
  3. Query — The Navigator reads the wiki index first, then pulls specific articles.
  4. Lint — The Linter finds contradictions, stale articles, and missing concepts.

Structured Data (SQL)

The other half is PostgreSQL for structured data. When you say "save a note: met with Sarah from Acme," PAL creates a row tagged with ['sarah', 'acme']. Later, "what do I know about Sarah?" queries across notes, people, and projects.

Run Locally

1git clone https://github.com/kern-agi/pal.git && cd pal
2
3cp example.env .env
4# Edit .env and add your OPENAI_API_KEY
5
6docker compose up -d --build
7
8# Load context metadata into the knowledge base
9docker compose exec pal-api python context/load_context.py

Confirm PAL is running at http://localhost:8000/docs.

Connect to the Control Plane

  1. Open os.kern.ndx.rocks
  2. Click Connect OSLocal
  3. Enter http://localhost:8000

Deploy to Railway

1railway login
2./scripts/railway_up.sh

The script provisions PostgreSQL, configures environment variables, and deploys PAL.

Then connect via the control plane:

  1. Open os.kern.ndx.rocks
  2. Click Connect OSLive
  3. Enter your Railway domain

Example Prompts

Try these to see PAL in action:

  • Ingest this URL: [paste any article]
  • What do I know about [topic from ingested content]?
  • Save a note: met with [person] about [topic]
  • What notes do I have tagged with [tag]?
  • Compile the wiki and summarize what's new

Source

For architecture details, context structure, and tool configuration, see the GitHub repo.