Skip to main content

Quenda

A lightweight, layered Agent framework for Python

Python License Status


What's New

2026-06 (v0.3.0)

  • Skills Framework — Composable capability packages with instructions, resources, and tools. Discover, activate, and use skills on demand. Learn more →
  • Context Compression — Automatic summarization when context grows large, with configurable policies and manual /compress command.
  • Interaction Requests — LLM can ask users for choices, confirmations, and input via structured interaction protocol.
  • Custom Tool Extensions — Agent-local tools via extensions/tools/*.py with config.yaml declaration.
  • Policy System — Runtime policies for termination, tool selection, and result processing.
  • Multimodal Support — Image input support with resource activation.
  • 26 Model Providers — OpenAI, Anthropic, DeepSeek, DashScope, Moonshot, Ollama, and 20 more.

Quenda Code

Quenda Code is an AI coding agent that runs in your terminal. It reads your codebase, writes code, runs commands, and helps you ship.

📖 Quenda Code Documentation →

# Install
pip install quenda quenda-code

# Start interactive session
quenda code

# One-shot task
quenda code "Add error handling to the API client"

Personal Agents

Create a long-lived local agent with its own prompts, skills, memory, sessions, and default workspace:

quenda agent create reviewer
quenda reviewer

Seed an independent agent from an installed package or source directory:

quenda agent create coder --from quenda-code
quenda agent create writer --from ./agents/writer

Agents live under ~/.quenda/agent-<name>/. Without --workspace, they work inside their own workspace/; the same agent can enter a project explicitly:

quenda reviewer --workspace ~/Workspace/my-project

Features

  • Code-aware — Reads and understands your codebase structure
  • Workspace-aware — File tools resolve paths against the selected project; local execution follows explicit permissions and trust policy
  • Explicit execution trust — Local shell/Python run as local-trusted; strong isolation must use a future isolated backend
  • Session persistence — Conversations saved and resumable
  • Interactive mode switching — Switch between code, architect, and chat modes
  • Skills on demand — Activate capability packages as needed

REPL Commands

Command Description
/help Show available commands
/mode [code|architect|chat] Switch interaction mode
/model <provider>/<model> Switch model mid-session
/skill list List available skills
/skill activate <name> Activate a skill
/compress Manually compress context
/status Show session and token info
/reset Clear conversation history

Example Session

> read the main entry point and explain how it works

I'll read the main entry point...

[Reads src/quenda/cli.py]

The entry point is `cli.py:main()`. It defines two subcommands:
- `quenda run --agent <path>` — Run a custom agent from AGENT.md
- `quenda code` — Run Quenda Code Agent (built-in)

Each command supports one-shot mode (with a message) or REPL mode (without).

> add a --version flag to the CLI

I'll add a `--version` flag to the argument parser...

[Applies patch to cli.py]

Done. Added `--version` flag that prints the version and exits.

> run the tests

[Runs pytest]

All 42 tests passed.

Quenda SDK

Build agents in Python with a minimal API:

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())

📖 SDK Tutorials — 8 chapters covering agents, tools, providers, sessions, and events.


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.


Features

  • Minimal API. Agent, Session, @tool, and you're done.
  • 26 model providers. OpenAI, Anthropic, DeepSeek, DashScope, and more — one registry, one API.
  • Core tools. Filesystem, local-trusted shell/Python, and user interaction.
  • Skills framework. Composable capability packages with instructions and resources.
  • Explicit security contracts. SSRF protection, command filtering, permissions, and fail-closed isolation requirements.
  • Observable by default. Every run emits structured events for streaming and debugging.
  • Context compression. Automatic summarization when context grows large.

Model Providers

Quenda ships with 26 built-in providers covering 300+ models:

Provider Example Models API Key Env
openai gpt-4o, gpt-4-turbo OPENAI_API_KEY
anthropic claude-3-5-sonnet-20241022 ANTHROPIC_API_KEY
agnes agnes-2.0-flash AGNES_API_KEY
deepseek deepseek-chat, deepseek-v4-flash DEEPSEEK_API_KEY
deepseek-anthropic deepseek-v4-flash (Anthropic API) DEEPSEEK_API_KEY
dashscope qwen-max, qwen-plus DASHSCOPE_API_KEY
moonshot moonshot-v1-8k, moonshot-v1-128k MOONSHOT_API_KEY
openrouter anthropic/claude-3.5-sonnet OPENROUTER_API_KEY
ollama llama3, mistral, qwen2 local (no key)

Full provider list →

Add a custom provider in 5 lines:

from quenda.providers import ProviderSpec, ModelSpec, get_provider_registry

registry = get_provider_registry()
registry.register(ProviderSpec(
    id="my-provider",
    name="My Provider",
    base_url="https://api.example.com/v1",
    api="openai-completions",
    api_key="${MY_API_KEY}",
    models=(ModelSpec(id="my-model", name="My Model", tool_calling=True),),
))

Built-in Tools

get_core_tools(workspace) returns 11 essential framework tools:

Tool Capability
list_files Browse directories (ls, find, tree)
search_text Search file contents (grep, rg)
read_file View files with line ranges
write_file Create or overwrite files
apply_patch Apply targeted text patches
run_shell Execute shell commands (filtered)
execute_python Run Python code in subprocess
get_current_datetime Get exact current time or convert timezones
request_interaction Ask the user for structured input
request_skill_activation Ask Host to activate discovered skills
activate_resource Attach a historical session resource

Full tool reference →


Architecture

Interface → Host → Runtime → Kernel
Layer Responsibility
Kernel Synchronous model-tool loop. No knowledge of agents, sessions, or users.
Runtime Async Agent/Session/Run lifecycle. Event emission, context management.
Host Persistence, identity, permissions, instruction composition, skills.
Interface Event rendering, user interaction, REPL.

Each layer depends only on the layer inside it. The Kernel is fully testable with fake models — no network required.


Documentation

Resource Description
Getting Started Setup and your first agent
Tools Guide All built-in tools with parameters
Skills Guide Capability packages system
API Reference Complete API reference
SDK Tutorials Step-by-step Python SDK guide (8 chapters)
CLI Tutorials Step-by-step Quenda Code guide (5 chapters)
Architecture Decisions ADR records

Contributing

Quenda is intentionally small. Before making a change, read CLAUDE.md and the ADR records.

  1. Identify which architectural layer owns the change.
  2. Prefer the smallest complete change; add tests with behavior changes.
  3. Do not cross established layer boundaries.
pip install -e ".[dev]"   # editable install with dev tooling
pytest                    # run tests
ruff check src/quenda       # lint

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quenda-0.3.4.tar.gz (472.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quenda-0.3.4-py3-none-any.whl (574.1 kB view details)

Uploaded Python 3

File details

Details for the file quenda-0.3.4.tar.gz.

File metadata

  • Download URL: quenda-0.3.4.tar.gz
  • Upload date:
  • Size: 472.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quenda-0.3.4.tar.gz
Algorithm Hash digest
SHA256 130a9a5a5a7c3c247bdbb98868508ca3c3ca09017862567182fda004ff882961
MD5 37bcf3d6db763937c5aba50e7d6773dd
BLAKE2b-256 a3acb3e255f0bfcfb4de161bb1a0a3fcf0736d337c441e5c171efd45c70a62f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for quenda-0.3.4.tar.gz:

Publisher: publish-quenda.yml on xvshiting/quenda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quenda-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: quenda-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 574.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quenda-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 11ade44e643c74ac2378d149a3cd1db1f39155718385ba08a6ecc0c111fd2049
MD5 95b79d9892f2c7c2864e2db13267c250
BLAKE2b-256 1abed8ce26cd9f57804b880a940fc0ce0c510d6cbd9eb1f819127e599cbaf6ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for quenda-0.3.4-py3-none-any.whl:

Publisher: publish-quenda.yml on xvshiting/quenda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.6

2 files

0.3.5

2 files

This release

0.3.4 This release

2 files

0.3.3

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page