Give a model a job
runs the rest
$ pip install ailoy-py
Everything around the model, handled by the SDK
from ailoy import AgentBuilder
agent = await AgentBuilder("anthropic/claude-haiku-5-5").build()
async for output in agent.run("Plan my week"):
print(output["message"])- Backendcli
- Runs onClaude Code (claude), logged in
- NeedsNo API key
agent = await (
AgentBuilder("anthropic/claude-haiku-5-5")
.system_tools().console(console)
.build()
)- RunsIn the agent's VM
- Callshell("python3 render.py")
- Resultexit 0
agent = await (
AgentBuilder("anthropic/claude-haiku-5-5")
.mount_readonly("./skills/laya", "/skills/laya")
.skill("/skills/laya")
.build()
)
agent.run("Route this ticket to a department")- Pickslaya, its description fits the task
- Reads/skills/laya/SKILL.md
- Runspython3 run_laya.py
- AnswersFrom the result
agent = await (
AgentBuilder("anthropic/claude-haiku-5-5")
.tool(desc)
.build()
)
async for output in agent.run("When does order A-1001 arrive?"):
print(output["message"])- YouWhen does order A-1001 arrive?
- Modelorder_status("A1001")
- Toolerror: no order A1001
- Modelorder_status("A-1001")
- Tool{"status": "shipped", "eta": "2026-10-24"}
- ModelIt has shipped and arrives on 24 October 2026
- 01
Any model, same code
Claude, GPT and Gemini run through the CLI you are logged into. Open models run on their own API, OpenRouter or your vLLM server.
- Backends
- cli, api, bedrock, openrouter, vllm
- Models
- Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen
- 02
Tools built in, yours in a line
A shell, files, web search and a browser are built in. An MCP server or a function of your own is one line more.
- In its VM
- A shell and file tools, matched to the model
- From your app
- Web search, web fetch, 19 browser tools
- 03
Teach it a skill for the job
A skill is a folder of instructions for one kind of task. The agent opens it only when a task calls for it.
- A skill holds
- SKILL.md, plus its scripts and data
- Read up front
- Only its name and description
- 04
The agent loop, handled
Ailoy runs the back and forth between the model and its tools. A failed call goes back to the model to fix.
- agent.run
- One complete message per step
- run_stream
- Tokens as the model writes them
Every model gets the tools it was trained on
system_tools() hands GPT the Codex tools and Claude the Claude Code tools, all running in the agent's VM.
shellshellapply_patchimgreadshellreadwriteeditimgreadshellread_filewriteeditimgreadshellreadwriteeditNoneLong runs stay inside the model's window
Long jobs keep going instead of failing at the model's limit, and each call sends fewer tokens. .context_manager() trims old tool results and keeps your last 3 turns whole.
Keep reading
FAQs
Can I use a model on my own server?
Yes. Run DeepSeek, Kimi, GLM or Qwen on a vLLM server and point Ailoy at it with VLLM_BASE_URL. Your agent code stays the same.
How much of a tool result does the model see?
Up to 30,000 characters of each part. A longer one keeps its first and last 15,000 characters around a note of how many were cut.
Does the agent use my own browser?
Yes, by default it drives your Chrome over CDP, with remote debugging on. With isolated=True it gets a browser of its own on a fresh profile.
Can I pick up a conversation later?
Yes. Save agent.history and pass it to .history() on the builder, and the next run continues where the last one left off.
Can I stream the answer word by word?
Yes. agent.run gives you a complete message for each step, and agent.run_stream gives you tokens as the model writes them.
Run your first agent
in a few lines of code
Install the package, name a model and run it