flisk-recipe-ai-agent
Skill49 starsChanged 36 days agoMITView on GitHub
Recipe for "build me an AI agent with MCP tools and a database" with Flisk - an agent service with sessions, an MCP tools server and a backend with a database in one stack, started with `flisk up`. Use with the flisk-build skill when the user asks for an AI agent, chatbot, assistant, MCP server or tools for an agent.
- Reads credentials
- Sends data out
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cli/AGENTS.mdAGENTS.md
- flisk-agent-opsSkill
- flisk-bug-hunterSkill
- flisk-buildSkill
- flisk-convertSkill
- flisk-doctorSkill
- flisk-e2e-authorSkill
- flisk-recipe-blogSkill
- flisk-recipe-saasSkill
- flisk-recipe-shopSkill
- flisk-recipe-startersSkill
- flisk-releaseSkill
- flisk-resourceSkill
- flisk-scan-convertSkill
- flisk-startup-perfSkill
- flisk-statusSkill
- flisk-tool-addSkill
- flisk-troubleshootSkill
- flisk-upSkill
- layer-autoresearchSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Keep the agent on the default session storage (a named volume).
≈ “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.
Files
Recipe: an AI agent with MCP tools and a database
Parts: an agent that keeps a conversation per session, an MCP server with the agent's tools, and a backend that stores the data the tools read and write.
Steps
flisk doctor
flisk project --yes
flisk resource assistant --type agent --stack ai --yes
flisk resource tools-mcp --type mcp --stack ai --yes
flisk resource notes-api --type backend --stack ai --feature drizzle --yes
flisk up ai --dry-run
flisk up ai --json & # wait for {"ok":true}
flisk networks --stack ai --rawKeep the agent on the default session storage (a named volume). In Flisk 1.4.2 an agent created with --durability postgres fails its image build (TS7016: Could not find a declaration file for module 'pg'); use the notes-api backend for the database instead.
App code
notes-api: anotestable (src/schema.ts) andGET /notes,POST /notes. Keep/healthand/health/db.tools-mcp: tools such aslist_notesandadd_notethat callnotes-api.assistant: the agent contract is already in place:/health,/ready,POST /turnandGET /sessionwith anx-session-idheader. Put the agent's logic in the turn handler. If the user gives a model API key, list its name undersecrets.requiredinservice.jsonand put the value in the project.env.
Done when
Each answers 200 on api.<project>.localhost:<port>: /api/assistant/health, /api/assistant/ready, /api/tools-mcp/health, /api/notes/health, /api/notes/health/db. Then send one turn:
curl -s -X POST -H 'x-session-id: demo' -H 'content-type: application/json' \
-d '{"input":"hello"}' http://api.<project>.localhost:<port>/api/assistant/turnTell the user the three URLs, how to talk to the agent (the curl above), and that flisk agent sessions assistant --session-id demo shows the saved conversation.
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
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.

