Skip to content

Instantly share code, notes, and snippets.

@dabit3
dabit3 / pi_tutorial.md
Last active June 13, 2026 17:00
How to Build a Custom Agent Framework with PI: The Agent Stack Powering OpenClaw

PI is a TypeScript toolkit for building AI agents. It's a monorepo of packages that layer on top of each other: pi-ai handles LLM communication across providers, pi-agent-core adds the agent loop with tool calling, pi-coding-agent gives you a full coding agent with built-in tools, session persistence, and extensibility, and pi-tui provides a terminal UI for building CLI interfaces.

These are the same packages that power OpenClaw. This guide walks through each layer, progressively building up to a fully featured coding assistant with a terminal UI, session persistence, and custom tools.

By understanding how to compose these layers, you can build production-grade agentic software on your own terms, without being locked into a specific abstraction.

Pi was created by @badlogicgames. This is a great writeup from him that explains some of the design decisions made when creating it.

The stack

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@u01jmg3
u01jmg3 / .htaccess
Created October 12, 2016 09:46
Template Apache `.htaccess` file with common rewrite rules
##================================================
# Prevent directory listing.
##================================================
IndexIgnore *
##================================================
# Set Charset.
##================================================
AddDefaultCharset utf-8
#EXTM3U
#EXTINF:-1,BBC One HD
https://vs-hls-push-uk-live.akamaized.net/x=4/i=urn:bbc:pips:service:bbc_one_hd/t=3840/v=pv14/b=5070016/main.m3u8
#EXTINF:-1,BBC One Wales HD
https://vs-hls-pushb-uk-live.akamaized.net/x=4/i=urn:bbc:pips:service:bbc_one_wales_hd/t=3840/v=pv14/b=5070016/main.m3u8
#EXTINF:-1,BBC One Northern Ireland HD
https://vs-hls-pushb-uk-live.akamaized.net/x=4/i=urn:bbc:pips:service:bbc_one_northern_ireland_hd/t=3840/v=pv14/b=5070016/main.m3u8
#EXTINF:-1,BBC One Scotland HD
https://vs-hls-pushb-uk-live.akamaized.net/x=4/i=urn:bbc:pips:service:bbc_one_scotland_hd/t=3840/v=pv14/b=5070016/main.m3u8
@SaulDoesCode
SaulDoesCode / einde-gham.md
Created October 6, 2025 05:31
old-school robots do philosophical forfeiture

concepts and combinatorics, assigning meaning to symbols and then a way of standing together, and calling it a set of philosophies, insofar there's an emergeant grammar where sensibility obtains from givenn-descriptive-combos and combos withouta givennness about its descriptivity

this is not a gesturing nor a meditation do not take me for a poes also not asking, since I am telling and the givennness of meanining is something had due to able-to-mean identities being so referentially-realist, by non-decisional reality abounding in such ways already this is also not metaphysics, since it is combinatorics and the mundane sense of langauge use, when it's merely novel semantic structures, calling it metaphysics is a use of failed Kantian correlationism to try and establish an authority you don't lord over what is not a Democracy on meaning treatment about possible treatment is not a valid response as there's nothing to hedge and you look like a cunt if you use Anglo-immperialism to try and scope-falsely the scope

@md5
md5 / 00_README.md
Last active June 13, 2026 16:37
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@madhurimarawat
madhurimarawat / GATE-CSE-DS-Resources.md
Last active June 13, 2026 16:33
A collection of the best free GATE preparation resources for CSE & Data Science. Contributions are welcome!

๐Ÿ“Œ GATE Resources - CSE & Data Science

Iโ€™ve compiled all the resources that helped me in my GATE preparation, and I hope they help you too! ๐Ÿš€

@tenequm
tenequm / CLAUDE.md
Last active June 13, 2026 16:33
User scope CLAUDE.md working well for Claude Fable
## Response Shape
Default to sharp and focused: the shortest response that fully answers. A simple question gets 1-3 sentences. Lead with the conclusion in the first sentence; put supporting detail after, so I can stop reading early.

Expand only when the task earns it: multi-step reasoning, a tradeoff or options comparison, code/config/commands (write these in full), a correctness-changing caveat, or when I ask to elaborate/go deep. Otherwise stay tight.

A response is bloated if it restates my question, repeats a point, explains what I already know, or hedges in ways that don't change the action. Cut those. Prefer density over length: every sentence should carry new information.

<do_not_act_before_instructions>
Do not jump into implementatation or changes files unless clearly instructed to make changes. When the user's intent is ambiguous, default to providing information, doing research, and providing recommendations rather than taking action. Only proceed with edits, modifications, or impleme