Overview
Quenda is a lightweight, layered Agent framework for Python. It provides a minimal API surface — Agent, Session, @tool — and ships with a terminal-based AI coding agent called Quenda Code. The framework is designed around a strict four-layer architecture (Kernel → Runtime → Host → Interface) where each layer depends only on the one inside it, making the core model-tool loop fully testable without network access.
Key Features
- Minimal API —
Agent,Session,@tool, and you’re done - 26 model providers — OpenAI, Anthropic, DeepSeek, DashScope, Moonshot, Ollama, and 20 more, all behind one registry
- 9 core tools — Filesystem, shell, Python sandbox, and user interaction, all workspace-scoped
- Skills framework — Composable capability packages with instructions, resources, and tools
- Security by code — SSRF protection, command filtering, import restrictions, workspace isolation
- Observable by default — Every run emits structured events for streaming and debugging
- Context compression — Automatic summarization when context grows large
Quenda Code
The flagship application is Quenda Code, an AI coding agent that runs in your terminal:
pip install quenda quenda-code
quenda code
It reads your codebase, writes code, runs commands, and helps you ship — with code-aware understanding, workspace-scoped file operations, safe shell execution, session persistence, and interactive mode switching between code, architect, and chat.
Architecture
Interface → Host → Runtime → Kernel
| Layer | Responsibility |
|---|---|
| Kernel | Synchronous model-tool loop. No knowledge of agents/sessions. |
| Runtime | Async Agent/Session/Run lifecycle, event emission, context mgmt. |
| Host | Persistence, identity, permissions, instruction composition. |
| Interface | Event rendering, user interaction, REPL. |
SDK Quick Start
from quenda import Agent, tool
from quenda.providers import get_provider_registry
from quenda.tools import get_core_tools
import asyncio
@tool
def calculate(expression: str) -> float:
"""Safely evaluate a math expression."""
import ast
node = ast.parse(expression, mode='eval')
return eval(compile(node, '<string>', 'eval'), {"__builtins__": {}}, {})
model = get_provider_registry().get_model("deepseek", "deepseek-v4-flash")
agent = Agent(
name="assistant",
system_prompt="You are a helpful assistant.",
tools=[calculate, *get_core_tools(".")],
model=model,
)
async def main():
session = agent.open_session()
result = await session.send("What is 15% of 847?")
print(result)
asyncio.run(main())
Installation
# Quenda Code — AI coding assistant (CLI)
pip install quenda quenda-code
# Quenda SDK — Build agents in Python
pip install quenda
Requires Python 3.12+. Zero required runtime dependencies.
License
MIT