agentleFS
flisk-shflisk-sh/flisk-skills/skills/flisk-agents/SKILL.md

flisk-agents

Skill4 starsChanged 34 days agoMITView on GitHub

Build and operate AI agent resources in a local Flisk stack - scaffold an agent (`--type agent`) next to an MCP tool server, a database and a queue, implement its process contract (`/health`, `/ready`, `POST /turn`, `GET /session`, `GET /sessions` with `x-session-id`), choose checkpoint durability, and inspect sessions with `flisk agent sessions`. Use when an app needs a long-running agent with durable sessions. For a generic backend or worker, use flisk-scaffold.

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Put the agent's logic in the turn handler of the generated src/index.ts.

    line 23
  2. Very specific:

    Run flisk mcp (stdio) so the coding agent drives the stack itself: agent_list lists agent resources, and agent_sessions takes resource plus …

    line 42
  3. Very specific:

    Keep the contract routes; Tilt and the CLI rely on them.

    line 46
  4. Distinctive:

    Keep everything in the local Docker + Tilt stack.

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AI agents in a Flisk stack

Flisk runs an agent, its MCP tools, a database and a queue behind one local gateway, started by one command.

Workflow

  1. Scaffold the agent and its tools in one stack:
    flisk resource bot --type agent --stack shop --yes
    flisk resource tools-mcp --type mcp --stack shop --yes
    --durability files (default) keeps checkpoints on a named Docker volume; --durability postgres stores them in the project Postgres. To start from a complete example instead, clone it: flisk project agent-stack --path <folder> --yes.
  2. Put the agent's logic in the turn handler of the generated src/index.ts. List any model API key under secrets.required in service.json and put the value in the project .env.
  3. flisk up shop, then check http://api.<project>.localhost/api/bot/health and /ready (use the exact URL from flisk networks).
  4. Send a turn and read it back:
    curl -X POST -H 'x-session-id: s1' -H 'content-type: application/json' -d '{"input":"hi"}' http://api.<project>.localhost/api/bot/turn
    flisk agent sessions bot              # list sessions (add --watch to refresh)
    flisk agent sessions bot --session-id s1 --json   # read one checkpoint

The agent contract

  • /health: liveness only. Idle is healthy; it never checks the store.
  • /ready: 200 when the checkpoint store is reachable and the agent is not draining.
  • POST /turn with x-session-id: loads that session's checkpoint, runs the turn, commits the checkpoint.
  • GET /session with x-session-id: returns one session's checkpoint. GET /sessions lists all sessions, newest first.
  • On SIGTERM the agent stops taking turns and drains for up to 10 s. Checkpoints survive restarts, hot reload and flisk down. Delete the volume yourself (docker volume ls | grep agent-state) to reset sessions.

Operating it from a coding agent

Run flisk mcp (stdio) so the coding agent drives the stack itself: agent_list lists agent resources, and agent_sessions takes resource plus an optional sessionId (without it, it lists the sessions). The rest of the tools mirror the CLI: up, status, logs, resource_restart, down.

Guardrails

  • Keep the contract routes; Tilt and the CLI rely on them. An agent scaffolded before GET /sessions existed returns 404 and the CLI reports SESSION_LIST_UNSUPPORTED; copy that handler from a new scaffold.
  • Keep everything in the local Docker + Tilt stack; do not invent Kubernetes or another orchestrator.
  • Guide: docs/agents/ai-agents.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.