Workspace-native local-first agent runtime built on top of ya-agent-sdk
Project description
YA Claw
Workspace-native single-node agent runtime and web service for the ya-mono workspace.
Scope
YA Claw packages a durable runtime shell around ya-agent-sdk with:
- registered workspaces resolved through
WorkspaceProvider - reusable agent profiles
- resumable sessions and runs
- in-process active state and async task coordination
- session schedules for timed execution
- SQLite-first durable state with optional PostgreSQL
- local filesystem session continuity and exported state
- a bundled web shell for local and self-hosted use
- bridge adapters that connect IM channels to the YA Claw service
Current Direction
The target single-node shape runs as one web service. The runtime keeps active session state, live delivery, async tasks, schedule dispatch, and bridge coordination inside one runtime process. SQLite is the default durable store. PostgreSQL remains an optional storage backend for deployments that prefer an external relational database.
Layout
Key areas in this package:
.env.example— runtime environment examplespec/— architecture and runtime design documentstests/— runtime testsya_claw/api/— HTTP API surfaceya_claw/bridge/— IM bridge adapters and relay logicya_claw/app.pyandya_claw/cli.py— application entrypointsya_claw/config.py— runtime configuration
Runtime Shape
The runtime shape is:
- one YA Claw web service
- one in-process runtime state manager
- one session scheduler
- one bridge subsystem for external channels
- one shared bearer token for HTTP access
- one SQLite database by default
- optional PostgreSQL
- one runtime data directory for sensitive session continuity
- one workspace root for project data
- one bundled web shell
Quick Start
From the workspace root, start the default runtime flow:
uv sync --all-packages
cp packages/ya-claw/.env.example packages/ya-claw/.env
uv run --package ya-claw ya-claw serve --reload
Set YA_CLAW_API_TOKEN before starting the service.
The development server listens on http://127.0.0.1:9042 by default.
YA Claw loads YA_CLAW_* settings from packages/ya-claw/.env and the process environment.
Use packages/ya-agent-sdk/.env.example for SDK and tool environment variables.
Default local paths:
- SQLite database:
~/.ya-claw/ya_claw.sqlite3 - runtime data root:
~/.ya-claw/data - workspace root:
~/.ya-claw/workspace
External Database
Set YA_CLAW_DATABASE_URL in packages/ya-claw/.env when you want an external PostgreSQL database.
The default SQLite file stays at ~/.ya-claw/ya_claw.sqlite3.
Database Commands
uv run --package ya-claw ya-claw db upgrade
uv run --package ya-claw ya-claw db current
uv run --package ya-claw ya-claw db history
uv run --package ya-claw ya-claw db revision "add session tables"
Bridge Commands
The CLI owns a top-level bridge command group.
uv run --package ya-claw ya-claw bridge ls
uv run --package ya-claw ya-claw bridge run lark
uv run --package ya-claw ya-claw bridge serve lark
Bridge Relay Modes
task relay— a bridge submits work to YA Claw as an async session flow and delivers agent output back through the channel adapter or channel CLIstream relay— a bridge opens a foreground run, consumes SSE from the YA Claw service, and streams channel-ready output directly
Web Shell
Run the web shell from the repository root:
make web-dev
Docker
Build from the repository root:
docker build -f Dockerfile.ya-claw -t ya-claw:dev .
Initial API Surface
Every HTTP route except /healthz expects Authorization: Bearer <YA_CLAW_API_TOKEN>.
GET /healthz— service health probe with storage and runtime component statusGET /api/v1/schedules— session schedule inspection surfacePOST /api/v1/bridges/{bridge_id}/dispatch— bridge ingress surface
Spec Set
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ya_claw-0.58.6.tar.gz.
File metadata
- Download URL: ya_claw-0.58.6.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59569105192171312e2bad1185351f6b3314ca60944c868098b0706438d974a4
|
|
| MD5 |
1f87180e59e740f54678cd4bd29365a1
|
|
| BLAKE2b-256 |
a73a82ae457d0f508d28e51fb5d46473604bf4aacdb7e9a1c3098bcc90c2f69d
|
File details
Details for the file ya_claw-0.58.6-py3-none-any.whl.
File metadata
- Download URL: ya_claw-0.58.6-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34dfa1ca686c03393b04f0100e084b098840ae53598a7df7b351b6086aaec288
|
|
| MD5 |
8797931017a2010588ee3ca2a0289ba9
|
|
| BLAKE2b-256 |
6d42d584a5613517dc6dc64f1b4a26ed805605a0d87618f8c01dfc61c847f85b
|