Skip to main content

A lightweight runtime that routes work from a Source to an interchangeable AI-agent Target and back through an Output.

Project description

Waken logo

Waken

CI Python 3.12+ Ruff mypy: strict License: MIT

Typing SVG

A lightweight runtime that routes work from a Source, to an interchangeable AI-agent Target, back through an Output.

Source → Runtime → Target → Response → Output

It is not an agent framework, an orchestration engine, a workflow builder, or an LLM wrapper — those are things you plug into it. Waken's own job is small on purpose: receive work, route it to the correct agent, return the result through the right channel. Think "nginx for AI agents," not "another LangGraph."

Install

pip install waken

Zero external services — no Docker, no Redis, no Postgres. State (sessions, scheduled jobs, retry queue) lives in one SQLite file, created automatically.

Quickstart

# app.py
from waken import Event, Response, Runtime, target_fn


@target_fn
async def echo(event: Event) -> Response:
    return Response(text=event.payload["prompt"])


runtime = Runtime()
runtime.target("echo", echo)
runtime.run()
waken run app.py

In another terminal:

waken send echo "Build tic tac toe." --wait
# Build tic tac toe.

That's it — runtime.run() is already reachable over HTTP (http://localhost:8080), with a CLI, a scheduler, and a retry queue on the same object, no extra setup. A real deployment swaps echo for a Target adapter (waken-claude, waken-gemini, ...) — same shape, same three lines.

What it does

  • Sources turn something happening — an HTTP request, a webhook, a scheduled tick, a new file — into an Event.
  • Targets receive an Event and return a Response. Swapping ClaudeAdapter() for GeminiAdapter() is a one-line change; nothing else in the runtime has to know.
  • Outputs deliver a Response back through a channel (terminal, Slack, email, ...) — decoupled from wherever the Event came from.
runtime.target("claude", ClaudeAdapter())
runtime.target("gemini", GeminiAdapter())

@runtime.every(hours=1)
async def hourly_summary():
    await runtime.send(target="claude", prompt="Summarize today's commits.")

runtime.serve(port=8080)

More runnable examples: examples/ (scheduling, broadcasting to multiple targets, routing an inbound webhook).

CLI

waken run <script.py>          # execute a script that builds a Runtime and calls run()
waken send <target> <prompt>   # POST /send/<target> on a running instance
waken emit <event> <json>      # POST /emit/<event>
waken inspect                  # targets, sources, outputs, jobs, queue depth

Documentation

Status

Pre-release. The core API described above is implemented and tested; real Target adapters (waken-claude, waken-gemini, waken-copilot, ...) ship as separate packages and haven't been built yet — see the ADR's alternatives for why core never depends on them.

Development

git clone https://github.com/WakenHQ/waken
cd waken
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

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

Source Distribution

waken-0.1.0.tar.gz (63.3 kB view details)

Uploaded Source

Built Distribution

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

waken-0.1.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file waken-0.1.0.tar.gz.

File metadata

  • Download URL: waken-0.1.0.tar.gz
  • Upload date:
  • Size: 63.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55bb87175592f02cc0313caadb7e7b642d6165baa941ae16523b50389b772f76
MD5 2c0cb6f79084d0a4be7f6e3a249305e0
BLAKE2b-256 7edb6213d0af76a980f3180f9e06f14b72d4e63ce57ff889f71fc9b10b35eaad

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken-0.1.0.tar.gz:

Publisher: publish.yml on WakenHQ/waken

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

File details

Details for the file waken-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: waken-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f5863cab615c55d5c5c9c2b946c44c7709dbad25344cf1be4272f311f1e842a
MD5 6bce1706c0fc0d0b48f2b9044e6dba49
BLAKE2b-256 69ca8d46bb9c41c4382ffe13ab362aaa96a46471667710f52b0737e0b9d4be4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken-0.1.0-py3-none-any.whl:

Publisher: publish.yml on WakenHQ/waken

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page