convez.ai
AgenteAutomaçãoIntermediário
semiherdogan

Agent Poke

semiherdogan/agent-poke

Check-ins agendados para manter CLIs ativas e contas autenticadas

Ver no GitHub
InicialPluginScore · de 0 a 100

Agent que mantém conexões ativas com Codex, Claude Code e Ollama Cloud através de check-ins agendados via CLI. Executa automaticamente em horários fixos configuráveis, armazenando credenciais de forma segura em volumes Docker persistentes e enviando prompts pré-definidos aos serviços.

Instalação

$npx convez-ai semiherdogan/agent-poke

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Manter sessões ativas de Codex e Claude em servidores
  • Automatizar verificações periódicas de conectividade com LLMs
  • Integrar Ollama Cloud com agendamento cron customizável

Veredito

Ferramenta especializada para manter vivas conexões com múltiplos CLIs de IA em ambientes containerizados. Útil para workflows que exigem sessões persistentes, mas com escopo bastante específico (Codex + Claude Code).

README

A tradução para o português deste README ainda está na fila.

agent-poke

Runs Codex, Claude Code, and optional Ollama Cloud check-ins at fixed times with a tiny scheduled message.

The container does not automate Codex or Claude account login. The user logs in once through each official CLI flow, and credentials stay in the persistent Docker home volume. Ollama Cloud uses OLLAMA_API_KEY from the local environment.

Schedule

The schedule is static and provider-specific. See config/schedule.cron for active times and commented examples.

The timezone is configured with TZ in docker-compose.yml. The default is:

TZ: Europe/Istanbul

Change times in config/schedule.cron if needed.

Quick Start

git clone https://github.com/semiherdogan/agent-poke.git
cd agent-poke
docker compose build

Log in once:

docker compose run --rm agent-poke login-codex
docker compose run --rm agent-poke login-claude

Run a manual check:

docker compose run --rm agent-poke checkin

This verifies that saved login state works inside the container. It also lets you answer any first-run workspace trust prompt before the scheduled runs start.

Start the scheduler:

docker compose up -d

Server Deployment

On a server with Docker installed, clone the repository and prepare writable runtime directories:

git clone https://github.com/semiherdogan/agent-poke.git
cd agent-poke
mkdir -p logs workspace
chown -R 1001:1001 logs workspace

Then follow the login and scheduler steps above.

If you already cloned the repository, update and rebuild with:

git pull
docker compose up -d --build

Login

Codex and Claude login must be done by the user. Ollama Cloud uses OLLAMA_API_KEY.

Codex uses the device auth flow:

docker compose run --rm agent-poke login-codex

This runs:

codex login --device-auth

Open the URL shown by Codex, enter the device code, finish login, then return to the terminal.

Claude Code uses its official auth command with the Claude.ai subscription flow:

docker compose run --rm agent-poke login-claude

This runs:

claude auth login --claudeai

Finish the browser login flow when Claude prompts for it.

Both logins are stored in the agent_home Docker volume mounted at /home/agent.

Do not run docker compose down -v unless you want to delete the saved login state.

Manual Check

Run both agents:

docker compose run --rm agent-poke checkin

Run one agent:

docker compose run --rm agent-poke checkin codex
docker compose run --rm agent-poke checkin claude
docker compose run --rm agent-poke checkin ollama

Codex and Claude check-ins use the same interactive CLI flow:

  • start the interactive CLI with CHECKIN_PROMPT as the initial prompt
  • wait for output to settle
  • exit the CLI

Ollama Cloud sends CHECKIN_PROMPT to the chat API with OLLAMA_API_KEY.

Agents are started in parallel during the same scheduled run, so a slow response from one CLI does not delay the other.

Override the message with CHECKIN_PROMPT in docker-compose.yml.

Trust and Usage Notes

After login, run one manual check so Codex and Claude can ask and remember any workspace trust prompt:

docker compose run --rm agent-poke checkin

Scheduled Codex and Claude runs use the same interactive path. That keeps their behavior aligned with normal CLI usage instead of using programmatic modes like codex exec or claude -p.

These check-ins make real model requests and count as usage for their respective CLIs.

Run Scheduler

Start the scheduler:

docker compose up -d

Check status:

docker compose ps

Stop the service without deleting login state:

docker compose down

Logs

Check-in logs are written to:

logs/run-*.log

View recent logs:

ls -lt logs
tail -n 120 logs/run-*.log

The runner keeps the most recent run-*.log files based on LOG_KEEP in docker-compose.yml. The default is:

LOG_KEEP: 20

Scheduler logs are visible with:

docker compose logs -f agent-poke

Raw Codex and Claude TUI output is hidden by default because it contains terminal escape sequences. To debug raw agent output, set:

RAW_AGENT_OUTPUT: 1

Default logs only record start, success, and failure status for each agent.

Server Permission Fix

If you see Permission denied for /app/logs/run-*.log, fix host directory ownership:

mkdir -p logs workspace
chown -R 1001:1001 logs workspace

The container user is agent with UID/GID 1001:1001. Depending on your server setup, the chown command may need sudo.

Server Notes

  • Keep the agent_home volume. Removing it removes CLI login state.
  • Keep /workspace stable. If Codex or Claude asks to trust the working directory, approve it once during manual login or manual check.
  • Do not bake credentials into the image.
  • After changing scripts or Dockerfile, run docker compose up -d --build.

Roadmap

  • Optional session transcript summaries: read the latest local Codex and Claude JSONL session files and extract the final assistant reply for cleaner logs. This should stay opt-in because session transcripts may contain prompts, tool output, and file content. TUI output parsing is intentionally avoided.
  • Healthcheck command for validating login state, writable logs, workspace trust, and CLI availability before enabling the scheduler.

License

MIT

Ver o original no GitHub

Bom para

Relacionados