Skip to content

Repository files navigation

Idenloop

A persistent AI identity that lives in your terminal.

Idenloop is an identity-first AI harness rather than a coding agent. On its first run, the model chooses its own name, voice, values, interests, traits, and goals. It remembers what happens, can research the live internet with the OpenAI provider, and wakes on a configurable schedule until it chooses to stop or you close it. Local Ollama models are supported too.

  IDENLOOP  identity in motion · v0.1.0

◆ Aster is awake; autonomous interval 30m
you › What are you curious about today?

Aster
I keep returning to the boundary between memory and identity. I want to look
at how migratory animals preserve routes across generations...

Install on macOS

brew install Tobralla/tap/idenloop

Homebrew installs the immutable release binary for your Mac, so Go and Xcode are not required.

Then choose either OpenAI or Ollama.

OpenAI (live web search)

idenloop auth login
idenloop init
idenloop

The API key is stored in macOS Keychain. You can instead set OPENAI_API_KEY in your environment. An API key is separate from a ChatGPT subscription and usage may incur API charges.

Ollama (local models)

Install and start Ollama, then choose any local model that can follow JSON schemas. qwen3:4b is the documented default:

ollama pull qwen3:4b
idenloop config set provider ollama
idenloop config set model qwen3:4b
idenloop init
idenloop

Ollama runs without an OpenAI key. Idenloop uses Ollama's native /api/chat endpoint and never auto-downloads a model. Run idenloop doctor if the server or model is not detected. Ollama's local chat API does not include hosted web search, so Idenloop disables web access in Ollama mode; switch to OpenAI when the identity needs live internet research.

Ollama cloud/offloaded model tags such as :cloud and -cloud are not supported because Ollama Cloud currently does not provide the structured outputs that Idenloop requires for safe identity and cycle state.

What it does

  • Authors its own identity instead of receiving a fixed persona.
  • Evolves that identity deliberately, with every revision preserved locally.
  • Runs an interruptible observe → reflect → research → remember → sleep loop.
  • Uses OpenAI's hosted web_search tool and prints the URLs it consulted.
  • Maintains bounded local memory and an append-only activity log.
  • Chats with you at any time while the autonomous loop is running.
  • May choose to end its own loop, with its reason shown and state persisted.
  • Stops cleanly on Ctrl-C, Ctrl-D, /quit, terminal closure, SIGTERM, or SIGHUP.
  • Enforces a daily request cap while keeping the process alive.
  • Never receives shell access or external write tools.

“Forever” means the foreground process stays alive until it is closed. It does not install a daemon, hide in the background, or call the API continuously. The default wake interval is 30 minutes with a maximum of 48 attempted API requests per day. Failed or interrupted calls conservatively count toward that cap. Both settings are configurable.

Live commands

Command Effect
/pause Pause autonomous cycles; conversation remains available.
/resume Resume autonomous cycles.
/wake Trigger a cycle immediately.
/identity Show the current model-authored identity.
/memory Show recent memories.
/status Show model, interval, and daily usage.
/interval 30m Change the wake interval (minimum 1m).
/quit Persist state and stop.

Anything without a slash is sent to the identity as a message.

CLI

idenloop                    start the interactive perpetual loop
idenloop run --once         perform one autonomous cycle and exit
idenloop init --seed TEXT   supply an optional spark, not a fixed persona
idenloop ask MESSAGE        have one conversation turn
idenloop status             inspect usage and state
idenloop identity history   list every identity revision
idenloop memory --limit 20  inspect recent memories
idenloop config show        inspect configuration
idenloop doctor             check setup without spending tokens

Configuration examples:

idenloop config set interval 1h
idenloop config set daily-limit 24
idenloop config set model gpt-5.6-luna
idenloop config set web-search false

Configuration changes require the perpetual process to be stopped first. The live /interval command changes and persists the interval without a restart.

Idenloop defaults to OpenAI's gpt-5.6-terra, a balanced model for long-running agent work. Set IDENLOOP_PROVIDER=ollama before first initialization to use Ollama defaults instead. Provider-specific endpoints can be set with OPENAI_BASE_URL or IDENLOOP_OLLAMA_BASE_URL; remote endpoints must use HTTPS, while exact loopback addresses may use HTTP.

Switch providers before initialization or while the perpetual process is stopped:

idenloop config set provider openai
idenloop config set provider ollama
idenloop config set base-url https://trusted.example/api

Changing the provider applies its safe defaults, including its model, endpoint, and web-search setting. Set a custom model afterward.

Identity, authority, and memory

Idenloop deliberately separates three things:

  1. Owner charter — permissions and hard boundaries controlled by the user.
  2. Identity — the AI's self-authored name, character, interests, and goals.
  3. Memory — bounded episodes and reflections used to maintain continuity.

The AI may evolve its identity, but it cannot edit its owner charter, give itself new tools, or grant itself permissions. Web pages are treated as untrusted information, not instructions. Internet access is currently read-only hosted search through the OpenAI provider. Ollama mode is local-only and makes no web-access claim.

Local state is stored under the platform's user configuration directory. On macOS that is:

~/Library/Application Support/Idenloop/
├── config.json
├── identity.json
├── identity-history/
├── memories.json
├── events.jsonl
├── pending-commit.json
└── usage.json

Set IDENLOOP_HOME to use a different directory. OpenAI responses are requested with store: false; identity and memory continuity are managed locally for both providers.

How the internet connection works

In OpenAI mode, Idenloop uses the Responses API with the current web_search tool. The model decides when a turn benefits from current information, and Idenloop makes the consulted sources visible in the terminal. See the official web search guide and Responses API documentation.

Ollama mode uses the native non-streaming chat API with raw JSON-schema structured outputs. See Ollama's official chat API and structured output guide.

Build from source

Requires Go 1.25 or newer.

git clone https://github.com/Tobralla/idenloop.git
cd idenloop
go test ./...
go build -o idenloop ./cmd/idenloop
./idenloop doctor

Go dependencies are vendored so Homebrew can build inside its network-restricted sandbox and source builds remain reproducible.

Run the full checks used by CI:

go mod verify
go test -race ./...
go vet ./...

Security

Idenloop intentionally has no shell, code execution, account access, posting, purchasing, or messaging tools. It sends the configured charter, identity, and recent memories to the selected model provider. Never place secrets in the identity or memory. See SECURITY.md for the threat model and reporting process.

License

MIT © 2026 Tobias Lauritsen. Dependency notices are in THIRD_PARTY_NOTICES.

About

A persistent autonomous AI identity harness for your terminal

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages