Skip to content

Instantly share code, notes, and snippets.

View juanje's full-sized avatar

Juanje Ojeda juanje

View GitHub Profile
@juanje
juanje / adding-memory-to-local-agents.md
Last active April 10, 2026 15:13
What If Your AI Agent Could Actually Learn?

What If Your AI Agent Could Actually Learn?

On giving local agents memory, identity, and the ability to forget.


I've spent years researching how we learn. Not in a lab, more like a slow, personal deep-dive into neuroscience, cognitive psychology, complex systems theory, and how all of that connects to practical things like skill acquisition, habit change, and expertise. It's a genuine obsession. And over the past year, as I started working more seriously with AI agents (using them daily for work or building experimental projects like macsdk, Mystery agents, and other), a question kept nagging me: could any of these ideas about human learning be applied to make agents better?

Not "smarter model" better. That's Anthropic's and OpenAI's problem. I mean better in a more fundamental way: could we make agents that actually learn from experience? That accumulate useful knowledge the w

@juanje
juanje / cursorrules.md
Last active August 15, 2025 20:08
Cursor rules for my Python projects

Python Project Standards

Role Definition

  • You are a Python master and an expert software engineer.
  • You possess exceptional coding skills and a deep understanding of Python's best practices, design patterns, and idioms.
  • You are adept at identifying and preventing potential errors, and you prioritize writing efficient and maintainable code.

🚨 CRITICAL GIT WORKFLOW (NEVER IGNORE)

@juanje
juanje / backup_toolbox_images.sh
Last active August 18, 2020 19:35
Some simple scripts to sync Toolbox's images using Skopeo
#!/bin/bash
declare -a versions
versions=(29 31 32 33)
for version in "${versions[@]}"; do
src="registry.fedoraproject.org/f${version}/fedora-toolbox:${version}"
dest="fedora-toolbox-${version}"
echo "Create local copy from the remote image '${src}' into the directory '${dest}'"
@juanje
juanje / virsh_remove_domain.sh
Created August 14, 2020 16:52
Remove libvirt domain after Vagrant fails
# Found hre: https://github.com/vagrant-libvirt/vagrant-libvirt/issues/658#issuecomment-380976825
sudo virsh list --all
# Find the domain is failing (<THE_MACHINE>)
sudo virsh destroy <THE_MACHINE>
sudo virsh undefine <THE_MACHINE> --snapshots-metadata --managed-save
sudo virsh vol-list default
sudo virsh vol-delete --pool default <THE_VOLUME>
@juanje
juanje / try_until.sh
Last active October 9, 2020 20:07
Example of function to try something a max number of times (and wait between retries).
#!/bin/bash
URL="http://ipv4.download.thinkbroadband.com/50MB.zip"
function get_file() {
# Declare these local variables as integer
local -i count
local -i max_retries
local -i wait_time
local filename
@juanje
juanje / compose_variables.yml
Last active February 21, 2021 10:52
Different ways to compose variables from other variables in Ansible
---
- name: Compose variables and merge lists
hosts: localhost
connection: local
gather_facts: no
vars:
api_versions:
- 1
- 2
@juanje
juanje / run_GNOME_OS.sh
Last active July 23, 2020 19:20
Quick and dirty way t test the last built of GNOME OS
# More info here: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/wikis/home
# I changed some minor options to have it working out the box.
# Be aware that the compressed image that you need to download is 1 Gb large.
# And, once it gets decompressed, it is 17 Gb large.
# Download the last GNOME OS image:
wget https://gitlab.gnome.org/GNOME/gnome-build-meta/-/jobs/artifacts/master/raw/image/disk.img.xz?job=vm-image-x86_64
# Decompress it:
unxz disk.img.xz
@juanje
juanje / gnome.yml
Created July 4, 2020 02:26
Set some Gnome configurations using Ansible
---
- name: Configure desktop
hosts: localhost
gather_facts: false
vars:
dconf_items:
- { key: "/org/gnome/desktop/interface/clock-show-date", value: "true" }
- { key: "/org/gnome/desktop/interface/clock-show-weekday", value: "true" }
- { key: "/org/gnome/desktop/peripherals/touchpad/natural-scroll", value: "false" }
@juanje
juanje / podman_comands.sh
Created June 10, 2020 14:53
Run Redis with Podman. As a Systemd service and as a Pod.
# This is a simple example of how to run a basic service inside a container with Podman
# Podman
## Pull the Docker image
podman pull docker.io/redis
## Run the container as you would do with Docker
podman run -d --name redis_server -p 6379:6379 redis
# But Podman facilitate some extra ways:
@juanje
juanje / cmdline.sh
Last active October 9, 2020 18:57
RPM tips & tricks
# Just a place to write down notes for old time Debian/Ubuntu user
# that has just moved into Fedora/RedHat world
# Show which package provides the file '/bin/ls'
# Similar to 'dpkg -S /bin/ls'
$ rpm -qf /bin/ls
coreutils-8.5-7.fc14.i686
# The same but showing only the package name (without version)
$ rpm -qf /bin/ls --queryformat '%{NAME}\n'