One App, two kinds of users
Say you keep a recipe box. You want to flip through it on a Sunday. You also want your Agent to add the soup it found and pull up everything with leeks.
In most setups that’s two projects: a website for you, and a separate “tool” for the AI that talks to the same database in its own way. They drift apart. One day the AI writes a recipe the website can’t show.
In Fungi it’s one App.
Two front doors, one house
Every Fungi App is built on the same contract, called Agar. An App has:
- A page for people. Plain HTML, or React with our Caps components. You open it in a window on your desktop.
- Typed methods for Agents. Each method says what goes in, what comes out,
and whether it only reads or also writes.
recipes.search({ ingredient }),recipes.add({ title, steps }). - Its own database. Both doors lead to the same data. When the Agent adds the soup, it’s on your Sunday page.
The Agent doesn’t scrape your page or guess at buttons. It calls the method, gets typed data back, and the host checks its permission on every call.
Here’s what that looks like
export const appBackend = defineAppBackend({
methods: {
search: defineAppMethod({
description: "Find recipes that use an ingredient.",
effect: "read",
requires: [],
input: z.strictObject({ ingredient: z.string().min(1) }),
output: z.strictObject({ titles: z.array(z.string()) }),
handler: async ({ ingredient }) => ({ titles: await findBy(ingredient) }),
}),
},
});
The build reads that definition and writes the App’s API for you. On Oyster,
Agents find it through one MCP endpoint and call it as
env.RECIPES.search({ ingredient: "leeks" }). Claude Code, Codex or any MCP
client can do the same with a key you give it.
Why it matters
- No second integration to keep in sync. Change the App, and people and Agents both get the change.
- Agents get the same rules as people. A write still needs the access you approved. Our own Apps, like Grove and Inkcap, get no secret extras either.
- You can see what an Agent did. It went through the App, so it shows up in the App.
Honest limits
- Declaring a method doesn’t grant anything. The owner still approves what each App and each Agent key may do.
- On hosted Fungi, an Agent calls only the Apps it has permission to use. Some Apps are built mostly for people and have few methods yet.
- Agar is young. The method shapes are stable enough to build on; expect the docs to keep improving.