openyak/yakAgent
Lightweight Python agent framework — tool-calling loop, permissions, sub-agents, streaming. 17 LLM providers, 15 built-in tools.
Platform-specific configuration:
{
"mcpServers": {
"yakAgent": {
"command": "npx",
"args": [
"-y",
"yakAgent"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Lightweight Python agent framework — tool-calling loop, permissions, sub-agents, streaming.
> Build AI agents in minutes with 17 LLM providers, 15 built-in tools, and a unique 4-layer permission system.
| Category | Details | |---|---| | 2-line quickstart | Engine auto-loads 15 built-in tools + default agent | | 17 LLM providers | OpenAI · Anthropic · Gemini native + 14 OpenAI-compatible (Groq, Mistral, DeepSeek, Together, Ollama, …) | | Permission system | 4-layer hierarchy, 2D matching (tool × resource pattern) — unique in open-source | | 15 built-in tools | read · write · edit · apply_patch · bash · glob · grep · codesearch · web_fetch · web_search · question · todo · task · plan · skill | | MCP integration | stdio + HTTP + SSE transports, auto-converts to tool definitions | | Lifecycle hooks | 11 hooks + 3 plugin interceptors (chat params, system prompt, messages) | | Sub-agents | task tool spawns child agents with recursion depth guard | | Safety | Doom loop detection · context overflow compaction · tool timeout · output truncation | | Minimal deps | Only openai + pydantic |
from yakagent import Engine, create_provider
engine = Engine(provider=create_provider("openai", api_key="sk-..."))
async for event in engine.run("List all Python files in the current directory"):
if event.event == "text-delta":
print(event.data["text"], end="")from typing import Annotated
from yakagent import tool, Param
@tool(name="fetch_user", description="Fetch user by ID")
async def fetch_user(
user_id: Annotated[int, Param("The user ID to look up")],
include_email: Annotated[bool, Param("Include email", default=False)],
) -> str:
return f"User {user_id}"yakAgent features a 4-layer, 2D permission system — define who can call what tool on which resources.
from yakagent import Engine, Agent, RulesetLoading reviews...