What it is
Most AI SDKs are a wrapper over an HTTP API: you send a prompt, you get a completion, and the orchestration is yours to build. This one ships the orchestration. api.agents.create({ runtime: "local" }) runs a real agent loop inside your process — planning, reading files, searching the web, running commands, generating media, asking you before anything irreversible.
That choice has consequences you can see. Tools execute where your code runs, so an agent reads the disk it is on and never uploads it. Permissions are decided by your callback, not by a remote policy. And the one thing the server does — a model turn — is the one thing it has to do.
The whole shape, in one example
import { IaGenify } from "iagenify";
const api = new IaGenify({ apiKey: process.env.IAGENIFY_API_KEY });
// 1. A model session — stateful, remembers, structured output on demand
const assistant = await api.models.create({
model: "gemini-3.5-flash",
schema: { type: "object", properties: { risks: { type: "array", items: { type: "string" } } } },
});
const { outputs, usage } = await assistant.generate({
inputs: [{ type: "text", content: "Three risks of shipping on a Friday." }],
});
// 2. An agent — the same account, working on this machine
const pc = await api.storage.get();
const agent = api.agents.create({
runtime: "local",
machine: pc,
model: "gemini-3.5-flash",
mode: "ask",
budget: 200,
onPermission: async ({ tool, category }) => (category === "send" ? "deny" : "once"),
});
await agent.run({ message: "Audit Notes/ and write Notes/audit.md.", onEvent: console.log });
// 3. The services the agent can also reach directly
await api.storage.create({ service: "object", label: "Assets" });
await api.hosts.create({ kind: "site", label: "Landing", slug: "landing" });
await api.domains.add("example.com");
await assistant.destroy();import os
from iagenify import IaGenify
with IaGenify(api_key=os.environ["IAGENIFY_API_KEY"]) as api:
assistant = api.models.create(
model="gemini-3.5-flash",
schema={"type": "object", "properties": {
"risks": {"type": "array", "items": {"type": "string"}},
}},
)
answer = assistant.generate(inputs=[
{"type": "text", "content": "Three risks of shipping on a Friday."},
])
machine = api.storage.get()
agent = api.agents.create(
runtime="local",
machine=machine,
model="gemini-3.5-flash",
mode="ask",
budget=200,
on_permission=lambda request: "deny" if request["category"] == "send" else "once",
)
run = agent.run(message="Audit Notes/ and write Notes/audit.md.", on_event=print)
api.storage.create(service="object", label="Assets")
api.hosts.create(runtime="static", framework="html", label="Landing", slug="landing")
api.domains.add("example.com")
print(answer["outputs"], run["text"])The resources
Everything hangs off one client. Each row is a branch of this reference.
| Resource | What it is |
|---|---|
| api.models | Model sessions, structured output, and the stateless turn with native tool calling. |
| api.agents | The local agent engine, plus the account's skills and sub-agents. |
| api.tools | search, fetch, screenshot, convert — callable directly, no agent needed. |
| api.mcp | Connected MCP servers. The SDK is the client; any server of the protocol works. |
| api.storage | Computers, phones, IaGenify Cloud, and connected MongoDB / D1 / R2 / S3. |
| api.cloud | Space used and add-ons for IaGenify Cloud storages. |
| api.files | Files on the server, and the double write to disk. |
| api.memory | Short notes the agent keeps between sessions. |
| api.workflows | Durable graphs: 23 step types, 4 triggers, branches, human approval, retry. |
| api.domains | Attached domains and their DNS, plus the current extension list. |
| api.compute | Isolated cloud commands and persistent terminals. |
| api.mail | Mailboxes, messages, aliases and contacts on your own domains. |
| api.hosts | Put a site, an app or a function online. |
| api.keys | List and revoke API keys. Create keys in account settings. |
| api.auth | Sessions and profile. |
Where it runs
One package, three runtimes, detected rather than configured. What changes is what the host can do: a Node process has a disk and a shell, a browser has neither, a Worker has neither and no persistent storage either.
| Node | Browser | Workers | |
|---|---|---|---|
| Session cache | ~/.iagenify/session | localStorage | memory |
| Agent workspace | ~/.iagenify/files | supply files | supply files |
| Shell and terminals | yes | supply shell | supply shell |
What a call costs
Credits. Every result carries its own usage, measured by the provider after the call — never estimated in your process. Prices come from the server, so nothing in your code can drift from what is charged.
const prices = await api.catalogue();
// [{ model, service, provider, unit, credits, creditsInput, creditsOutput,
// contextWindow, maxOutput, cachedInputRate, resolution, audio }]
const { credits } = await api.getUser();
try {
await assistant.generate({ inputs });
} catch (err) {
if (err instanceof NotEnoughCredits) {
console.log(err.required, err.available); // 402
}
}from iagenify import IaGenifyError, NotEnoughCredits
prices = api.catalogue()
user = api.get_user()
try:
assistant.generate(inputs=inputs)
except NotEnoughCredits as error:
print(error.required, error.available) # insufficient-credit response
except IaGenifyError as error:
print(error.status, error.code, error.message)How stable this is
The package is 0.5.4, so below 1.0. Shapes that are documented here are covered by automated tests before a release goes out, and anything that changes in a breaking way is listed in the changelog with what replaces it. Treat an undocumented field as internal: it can move.