openpaw-ai 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openpaw_ai-0.4.0/CHANGELOG.md +49 -0
- openpaw_ai-0.4.0/LICENSE +75 -0
- openpaw_ai-0.4.0/PKG-INFO +263 -0
- openpaw_ai-0.4.0/README.md +197 -0
- openpaw_ai-0.4.0/openpaw/__init__.py +9 -0
- openpaw_ai-0.4.0/openpaw/agent/__init__.py +20 -0
- openpaw_ai-0.4.0/openpaw/agent/builder.py +191 -0
- openpaw_ai-0.4.0/openpaw/agent/metrics.py +250 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/__init__.py +37 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/approval.py +113 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/llm_hooks.py +175 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/queue_aware.py +177 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/status_reminder.py +225 -0
- openpaw_ai-0.4.0/openpaw/agent/middleware/tool_timeout.py +93 -0
- openpaw_ai-0.4.0/openpaw/agent/model_factory.py +244 -0
- openpaw_ai-0.4.0/openpaw/agent/response_processor.py +90 -0
- openpaw_ai-0.4.0/openpaw/agent/runner.py +477 -0
- openpaw_ai-0.4.0/openpaw/agent/session_logger.py +169 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/__init__.py +14 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_read.py +332 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_search/__init__.py +221 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_search/formatter.py +53 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_search/python_backend.py +224 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_search/ripgrep_backend.py +168 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/file_write.py +250 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/filesystem.py +160 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/helpers/__init__.py +5 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/helpers/formatting.py +83 -0
- openpaw_ai-0.4.0/openpaw/agent/tools/sandbox.py +112 -0
- openpaw_ai-0.4.0/openpaw/builtins/__init__.py +26 -0
- openpaw_ai-0.4.0/openpaw/builtins/base.py +186 -0
- openpaw_ai-0.4.0/openpaw/builtins/loader.py +383 -0
- openpaw_ai-0.4.0/openpaw/builtins/processors/__init__.py +1 -0
- openpaw_ai-0.4.0/openpaw/builtins/processors/docling.py +488 -0
- openpaw_ai-0.4.0/openpaw/builtins/processors/file_persistence.py +308 -0
- openpaw_ai-0.4.0/openpaw/builtins/processors/timestamp.py +96 -0
- openpaw_ai-0.4.0/openpaw/builtins/processors/whisper.py +205 -0
- openpaw_ai-0.4.0/openpaw/builtins/profiles/__init__.py +3 -0
- openpaw_ai-0.4.0/openpaw/builtins/profiles/file-analyst.yaml +27 -0
- openpaw_ai-0.4.0/openpaw/builtins/profiles/researcher.yaml +30 -0
- openpaw_ai-0.4.0/openpaw/builtins/profiles/summarizer.yaml +25 -0
- openpaw_ai-0.4.0/openpaw/builtins/registry.py +296 -0
- openpaw_ai-0.4.0/openpaw/builtins/skills/__init__.py +3 -0
- openpaw_ai-0.4.0/openpaw/builtins/skills/channel-awareness/SKILL.md +53 -0
- openpaw_ai-0.4.0/openpaw/builtins/skills/team-management/SKILL.md +44 -0
- openpaw_ai-0.4.0/openpaw/builtins/skills/web-browsing/SKILL.md +98 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/__init__.py +1 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/_audio_context.py +30 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/_channel_context.py +73 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/acknowledge.py +134 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/brave_search.py +58 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/__init__.py +116 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/interaction.py +270 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/lifecycle.py +174 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/models.py +84 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/navigation.py +170 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/security.py +117 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/session.py +264 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/snapshot.py +169 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/state.py +240 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/browser/tools.py +422 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/channel_history/__init__.py +113 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/channel_history/browser.py +190 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/channel_history/formatter.py +134 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/channel_history/models.py +41 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/channel_history/resolver.py +81 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron/__init__.py +138 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron/formatting.py +91 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron/models.py +59 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron/scheduler_bridge.py +59 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron/tools.py +284 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/__init__.py +175 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/models.py +81 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/persistence.py +99 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/scheduler_bridge.py +62 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/tools.py +330 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/cron_manager/validators.py +47 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/elevenlabs_tts.py +131 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/__init__.py +302 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/base.py +258 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/executor.py +298 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/__init__.py +221 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/attachments.py +67 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/base.py +70 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/compose.py +79 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/fetch.py +398 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/gmail/labels.py +68 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/email/models.py +99 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/followup.py +176 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/gpt_researcher.py +255 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/md2pdf/__init__.py +217 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/md2pdf/converter.py +163 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/md2pdf/mermaid.py +361 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/md2pdf/models.py +56 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/md2pdf_themes.py +1009 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/memory_search.py +192 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/plan.py +173 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/send_file.py +274 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/send_message.py +146 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/shell.py +232 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/spawn/__init__.py +185 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/spawn/formatters.py +64 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/spawn/models.py +62 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/spawn/tools.py +325 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/task/__init__.py +120 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/task/models.py +79 -0
- openpaw_ai-0.4.0/openpaw/builtins/tools/task/tools.py +444 -0
- openpaw_ai-0.4.0/openpaw/channels/__init__.py +15 -0
- openpaw_ai-0.4.0/openpaw/channels/base.py +231 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/__init__.py +1 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/base.py +82 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/__init__.py +39 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/compact.py +123 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/help.py +51 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/model.py +139 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/new.py +86 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/queue_mode.py +62 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/start.py +42 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/handlers/status.py +132 -0
- openpaw_ai-0.4.0/openpaw/channels/commands/router.py +77 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/__init__.py +374 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/approval_view.py +64 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/attachments.py +59 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/commands.py +111 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/constants.py +7 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/history.py +86 -0
- openpaw_ai-0.4.0/openpaw/channels/discord/outbound.py +125 -0
- openpaw_ai-0.4.0/openpaw/channels/factory.py +69 -0
- openpaw_ai-0.4.0/openpaw/channels/formatting.py +219 -0
- openpaw_ai-0.4.0/openpaw/channels/helpers/__init__.py +19 -0
- openpaw_ai-0.4.0/openpaw/channels/helpers/attachments.py +26 -0
- openpaw_ai-0.4.0/openpaw/channels/helpers/formatting.py +83 -0
- openpaw_ai-0.4.0/openpaw/channels/helpers/security.py +143 -0
- openpaw_ai-0.4.0/openpaw/channels/helpers/splitting.py +46 -0
- openpaw_ai-0.4.0/openpaw/channels/stdio.py +268 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/__init__.py +308 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/approval.py +47 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/attachments.py +208 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/constants.py +7 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/handlers.py +112 -0
- openpaw_ai-0.4.0/openpaw/channels/telegram/outbound.py +161 -0
- openpaw_ai-0.4.0/openpaw/cli.py +142 -0
- openpaw_ai-0.4.0/openpaw/cli_init/__init__.py +8 -0
- openpaw_ai-0.4.0/openpaw/cli_init/commands.py +137 -0
- openpaw_ai-0.4.0/openpaw/cli_init/scaffolder.py +186 -0
- openpaw_ai-0.4.0/openpaw/cli_init/templates.py +213 -0
- openpaw_ai-0.4.0/openpaw/core/__init__.py +11 -0
- openpaw_ai-0.4.0/openpaw/core/channel_context.py +136 -0
- openpaw_ai-0.4.0/openpaw/core/config/__init__.py +70 -0
- openpaw_ai-0.4.0/openpaw/core/config/loader.py +148 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/__init__.py +103 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/base.py +88 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/builtin.py +231 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/channel.py +68 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/cron.py +68 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/lifecycle.py +40 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/memory.py +50 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/security.py +50 -0
- openpaw_ai-0.4.0/openpaw/core/config/models/workspace.py +202 -0
- openpaw_ai-0.4.0/openpaw/core/config/providers.py +103 -0
- openpaw_ai-0.4.0/openpaw/core/logging.py +139 -0
- openpaw_ai-0.4.0/openpaw/core/paths.py +105 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/__init__.py +52 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/commands.py +39 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/framework.py +438 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/heartbeat.py +97 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/processors.py +26 -0
- openpaw_ai-0.4.0/openpaw/core/prompts/system_events.py +185 -0
- openpaw_ai-0.4.0/openpaw/core/timezone.py +60 -0
- openpaw_ai-0.4.0/openpaw/core/utils.py +189 -0
- openpaw_ai-0.4.0/openpaw/core/workspace.py +354 -0
- openpaw_ai-0.4.0/openpaw/model/__init__.py +35 -0
- openpaw_ai-0.4.0/openpaw/model/channel.py +65 -0
- openpaw_ai-0.4.0/openpaw/model/cron.py +50 -0
- openpaw_ai-0.4.0/openpaw/model/message.py +74 -0
- openpaw_ai-0.4.0/openpaw/model/session.py +52 -0
- openpaw_ai-0.4.0/openpaw/model/skill.py +52 -0
- openpaw_ai-0.4.0/openpaw/model/spawn_profile.py +79 -0
- openpaw_ai-0.4.0/openpaw/model/subagent.py +175 -0
- openpaw_ai-0.4.0/openpaw/model/task.py +168 -0
- openpaw_ai-0.4.0/openpaw/runtime/__init__.py +31 -0
- openpaw_ai-0.4.0/openpaw/runtime/approval.py +182 -0
- openpaw_ai-0.4.0/openpaw/runtime/channel_logger.py +244 -0
- openpaw_ai-0.4.0/openpaw/runtime/orchestrator.py +103 -0
- openpaw_ai-0.4.0/openpaw/runtime/queue/__init__.py +9 -0
- openpaw_ai-0.4.0/openpaw/runtime/queue/lane.py +213 -0
- openpaw_ai-0.4.0/openpaw/runtime/queue/manager.py +310 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/__init__.py +24 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/cron.py +195 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/cron_executor.py +420 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/cron_job_manager.py +228 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/heartbeat.py +190 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/heartbeat_executor.py +405 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/heartbeat_preflight.py +127 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/heartbeat_prompt.py +45 -0
- openpaw_ai-0.4.0/openpaw/runtime/scheduling/loader.py +89 -0
- openpaw_ai-0.4.0/openpaw/runtime/session/__init__.py +9 -0
- openpaw_ai-0.4.0/openpaw/runtime/session/archiver.py +387 -0
- openpaw_ai-0.4.0/openpaw/runtime/session/manager.py +257 -0
- openpaw_ai-0.4.0/openpaw/runtime/session/pruner.py +218 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/__init__.py +10 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/executor.py +353 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/filter.py +147 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/formatter.py +42 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/notifier.py +141 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/profiler.py +244 -0
- openpaw_ai-0.4.0/openpaw/runtime/subagent/runner.py +456 -0
- openpaw_ai-0.4.0/openpaw/stores/__init__.py +29 -0
- openpaw_ai-0.4.0/openpaw/stores/cron.py +311 -0
- openpaw_ai-0.4.0/openpaw/stores/subagent.py +467 -0
- openpaw_ai-0.4.0/openpaw/stores/task.py +451 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/__init__.py +27 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/base.py +109 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/embeddings.py +103 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/factory.py +63 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/indexer.py +179 -0
- openpaw_ai-0.4.0/openpaw/stores/vector/sqlite_vec.py +233 -0
- openpaw_ai-0.4.0/openpaw/workspace/__init__.py +6 -0
- openpaw_ai-0.4.0/openpaw/workspace/agent_factory.py +342 -0
- openpaw_ai-0.4.0/openpaw/workspace/connector.py +186 -0
- openpaw_ai-0.4.0/openpaw/workspace/initializer.py +428 -0
- openpaw_ai-0.4.0/openpaw/workspace/lifecycle.py +345 -0
- openpaw_ai-0.4.0/openpaw/workspace/lifecycle_notifier.py +65 -0
- openpaw_ai-0.4.0/openpaw/workspace/loader.py +199 -0
- openpaw_ai-0.4.0/openpaw/workspace/message_processor.py +400 -0
- openpaw_ai-0.4.0/openpaw/workspace/model_resolver.py +136 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/__init__.py +21 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/approval_handler.py +165 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/combiner.py +78 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/compactor.py +221 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/error_handler.py +94 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/followup_scheduler.py +133 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/interrupt_handler.py +56 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/response_handler.py +117 -0
- openpaw_ai-0.4.0/openpaw/workspace/processors/ttl_checker.py +142 -0
- openpaw_ai-0.4.0/openpaw/workspace/profile_loader.py +354 -0
- openpaw_ai-0.4.0/openpaw/workspace/profile_resolver.py +62 -0
- openpaw_ai-0.4.0/openpaw/workspace/roster.py +72 -0
- openpaw_ai-0.4.0/openpaw/workspace/runner.py +849 -0
- openpaw_ai-0.4.0/openpaw/workspace/skill_loader.py +264 -0
- openpaw_ai-0.4.0/openpaw/workspace/task_service.py +71 -0
- openpaw_ai-0.4.0/openpaw/workspace/tool_filter.py +81 -0
- openpaw_ai-0.4.0/openpaw/workspace/tool_loader.py +301 -0
- openpaw_ai-0.4.0/pyproject.toml +131 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.4.0] - 2026-05-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Structural refactor** — Layered architecture with clear stability contract: `model` (pure data) → `core` (config, prompts, utilities) → `agent` (runner, tools, middleware) → `workspace` (loader, runner, lifecycle) → `runtime` (orchestrator, queue, scheduling, subagents) → `channels` (external adapters).
|
|
13
|
+
- **Multi-channel support** — Run multiple channels (Telegram, Discord) simultaneously in a single workspace. Each channel is isolated with its own session keys, activation filters, and trigger keywords.
|
|
14
|
+
- **Workspace isolation** — Every workspace gets its own channels, queue, agent runner, and cron scheduler. No state leakage between workspaces.
|
|
15
|
+
- **Cron & heartbeat scheduling** — APScheduler-based cron jobs from YAML definitions; proactive heartbeat check-ins with active-hours support, HEARTBEAT_OK suppression, and task summary injection.
|
|
16
|
+
- **Sub-agent spawning** — Background concurrent workers via `spawn_agent` with isolated contexts, tool filtering, and session-scoped lifecycle tracking. Supports spawn profiles (`agent/team/*.yaml`) for specialized personas.
|
|
17
|
+
- **Browser automation** — Playwright-based web browsing with accessibility tree navigation, domain allowlists/blocklists, cookie persistence, and screenshot/download support.
|
|
18
|
+
- **Email integration** — Gmail send/receive via service account + domain-wide delegation. Supports search, reply, attachments, and recipient policy enforcement.
|
|
19
|
+
- **GPT-Researcher builtin** — Deep research via WebSocket with streaming progress and report generation.
|
|
20
|
+
- **Dynamic & persistent scheduling** — Agents can schedule one-time (`schedule_at`) or recurring (`schedule_every`) tasks at runtime, or create persistent YAML cron jobs via `cron_manager`.
|
|
21
|
+
- **Queue-aware middleware** — Steer and interrupt modes let agents respond to new user messages mid-execution without losing context.
|
|
22
|
+
- **Approval gates** — Human-in-the-loop authorization for dangerous tools with configurable timeout and default action.
|
|
23
|
+
- **Token usage tracking** — Per-invocation metrics logged to JSONL for cost monitoring and `/status` queries.
|
|
24
|
+
- **Runtime model switching** — Live provider/model switching via `/model` command without restart.
|
|
25
|
+
- **Auto-compact** — Automatic conversation compaction when context window utilization exceeds a threshold.
|
|
26
|
+
- **Session TTL** — Lazy conversation auto-reset after inactivity in group channels.
|
|
27
|
+
- **Checkpoint pruning** — Automatic cleanup of orphaned conversation checkpoints on startup.
|
|
28
|
+
- **Provider catalog** — Define provider connection details once in global config and reference by name from workspaces.
|
|
29
|
+
- **Skills system** — Reusable knowledge patterns via `SKILL.md` files with progressive disclosure (summary vs full injection).
|
|
30
|
+
- **Framework skills** — Bundled reference skills for team management, web browsing, and channel awareness.
|
|
31
|
+
- **Status reminder middleware** — Automatic nudges for agents to update users after long silent tool chains.
|
|
32
|
+
- **Session logging** — JSONL session logs for heartbeat, cron, and sub-agent runs readable by the main agent.
|
|
33
|
+
- **Channel history & logs** — On-demand context fetch and persistent JSONL channel logging for group awareness.
|
|
34
|
+
- **File persistence & enrichment** — Universal upload handling with Whisper transcription and Docling document conversion.
|
|
35
|
+
- **Trusted Publishing support** — CI/CD workflows configured for PEP 740 Trusted Publishing to PyPI.
|
|
36
|
+
- **Pre-commit hooks** — Ruff, mypy, and version sync checks.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- CLI now supports single workspace, multiple workspaces, or wildcard `--all`.
|
|
41
|
+
- Configuration deep-merges workspace `agent.yaml` over global `config.yaml`.
|
|
42
|
+
- Error sanitization prevents internal details from leaking to channel users.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Various race conditions in approval gate resolution and sub-agent cancellation.
|
|
47
|
+
- Path traversal protection hardened across filesystem tools and inbound processors.
|
|
48
|
+
|
|
49
|
+
[0.4.0]: https://github.com/johnsosoka/openpaw/releases/tag/v0.4.0
|
openpaw_ai-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2025-2026 John Sosoka
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright John Sosoka (https://johnsosoka.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncommercial Purposes
|
|
34
|
+
|
|
35
|
+
Any noncommercial purpose is a permitted purpose.
|
|
36
|
+
|
|
37
|
+
## Personal Uses
|
|
38
|
+
|
|
39
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
40
|
+
|
|
41
|
+
## Noncommercial Organizations
|
|
42
|
+
|
|
43
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
44
|
+
|
|
45
|
+
## Fair Use
|
|
46
|
+
|
|
47
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
48
|
+
|
|
49
|
+
## No Other Rights
|
|
50
|
+
|
|
51
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
52
|
+
|
|
53
|
+
## Patent Defense
|
|
54
|
+
|
|
55
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
56
|
+
|
|
57
|
+
## Violations
|
|
58
|
+
|
|
59
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
60
|
+
|
|
61
|
+
## No Liability
|
|
62
|
+
|
|
63
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
64
|
+
|
|
65
|
+
## Definitions
|
|
66
|
+
|
|
67
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
68
|
+
|
|
69
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
70
|
+
|
|
71
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
72
|
+
|
|
73
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
74
|
+
|
|
75
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openpaw-ai
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: OpenPaw - Multi-Channel AI Agent Framework with LangGraph
|
|
5
|
+
License: PolyForm Noncommercial 1.0.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: ai,agent,langgraph,telegram,discord,bot
|
|
8
|
+
Author: John Sosoka
|
|
9
|
+
Requires-Python: >=3.11,<4.0
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: Other/Proprietary License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Communications :: Chat
|
|
19
|
+
Classifier: Framework :: AsyncIO
|
|
20
|
+
Provides-Extra: all-builtins
|
|
21
|
+
Provides-Extra: email
|
|
22
|
+
Provides-Extra: memory
|
|
23
|
+
Provides-Extra: researcher
|
|
24
|
+
Provides-Extra: voice
|
|
25
|
+
Provides-Extra: web
|
|
26
|
+
Requires-Dist: apscheduler (>=3.10.0,<4.0.0)
|
|
27
|
+
Requires-Dist: discord.py (>=2.6.0,<3.0.0)
|
|
28
|
+
Requires-Dist: docling (>=2.72.0,<3.0.0)
|
|
29
|
+
Requires-Dist: easyocr (>=1.7.2,<2.0.0)
|
|
30
|
+
Requires-Dist: elevenlabs (>=1.0.0) ; extra == "all-builtins"
|
|
31
|
+
Requires-Dist: elevenlabs (>=1.0.0) ; extra == "voice"
|
|
32
|
+
Requires-Dist: google-api-python-client (>=2.0.0) ; extra == "all-builtins"
|
|
33
|
+
Requires-Dist: google-api-python-client (>=2.0.0) ; extra == "email"
|
|
34
|
+
Requires-Dist: google-auth (>=2.0.0) ; extra == "all-builtins"
|
|
35
|
+
Requires-Dist: google-auth (>=2.0.0) ; extra == "email"
|
|
36
|
+
Requires-Dist: httpx (>=0.27.0) ; extra == "all-builtins"
|
|
37
|
+
Requires-Dist: httpx (>=0.27.0) ; extra == "researcher"
|
|
38
|
+
Requires-Dist: langchain (>=1.2.8,<2.0.0)
|
|
39
|
+
Requires-Dist: langchain-anthropic (>=1.3.1,<2.0.0)
|
|
40
|
+
Requires-Dist: langchain-aws (>=1.0.0,<2.0.0)
|
|
41
|
+
Requires-Dist: langchain-community (>=0.4.0) ; extra == "all-builtins"
|
|
42
|
+
Requires-Dist: langchain-community (>=0.4.0) ; extra == "web"
|
|
43
|
+
Requires-Dist: langchain-fireworks (>=1.0.0,<2.0.0)
|
|
44
|
+
Requires-Dist: langchain-openai (>=1.1.7,<2.0.0)
|
|
45
|
+
Requires-Dist: langchain-xai (>=1.2.2,<2.0.0)
|
|
46
|
+
Requires-Dist: langgraph (>=1.0.7,<2.0.0)
|
|
47
|
+
Requires-Dist: langgraph-checkpoint-sqlite (>=2.0.0,<4.0.0)
|
|
48
|
+
Requires-Dist: openai (>=1.0.0) ; extra == "all-builtins"
|
|
49
|
+
Requires-Dist: openai (>=1.0.0) ; extra == "voice"
|
|
50
|
+
Requires-Dist: opencv-python-headless (>=4.13.0.92,<5.0.0.0)
|
|
51
|
+
Requires-Dist: playwright (>=1.58.0,<2.0.0)
|
|
52
|
+
Requires-Dist: pydantic (>=2.12.5,<3.0.0)
|
|
53
|
+
Requires-Dist: python-dotenv (>=1.2.1,<2.0.0)
|
|
54
|
+
Requires-Dist: python-telegram-bot[job-queue] (>=22.6,<23.0)
|
|
55
|
+
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
|
|
56
|
+
Requires-Dist: sqlite-vec (>=0.1.6) ; extra == "all-builtins"
|
|
57
|
+
Requires-Dist: sqlite-vec (>=0.1.6) ; extra == "memory"
|
|
58
|
+
Requires-Dist: websockets (>=12.0) ; extra == "all-builtins"
|
|
59
|
+
Requires-Dist: websockets (>=12.0) ; extra == "researcher"
|
|
60
|
+
Project-URL: Documentation, https://johnsosoka.github.io/OpenPaw/
|
|
61
|
+
Project-URL: Homepage, https://johnsosoka.github.io/OpenPaw/
|
|
62
|
+
Project-URL: Issues, https://github.com/johnsosoka/OpenPaw/issues
|
|
63
|
+
Project-URL: Repository, https://github.com/johnsosoka/OpenPaw
|
|
64
|
+
Description-Content-Type: text/markdown
|
|
65
|
+
|
|
66
|
+
<div align="center">
|
|
67
|
+
<img src="docs/assets/images/logo.png" alt="OpenPaw" width="400">
|
|
68
|
+
<p><strong>A Friendly <a href="https://langchain-ai.github.io/langgraph/">LangChain/LangGraph</a> Multi-Agent Runner</strong></p>
|
|
69
|
+
<p>
|
|
70
|
+
<a href="https://github.com/johnsosoka/OpenPaw/actions/workflows/ci.yml"><img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
|
|
71
|
+
<a href="https://github.com/johnsosoka/OpenPaw/actions/workflows/docs.yml"><img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/docs.yml/badge.svg?branch=main" alt="Docs"></a>
|
|
72
|
+
<img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/ai-code-review.yml/badge.svg" alt="AI Code Review">
|
|
73
|
+
<img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+">
|
|
74
|
+
<img src="https://img.shields.io/badge/license-PolyForm%20Noncommercial-green" alt="License">
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
> **Pre-1.0 Release (0.4.0)** — OpenPaw is actively developed. The API may evolve as we work towards a stable 1.0.0 release. Contributions and feedback are welcome.
|
|
81
|
+
|
|
82
|
+
OpenPaw gives each agent its own workspace -- personality files, custom tools, scheduled tasks -- then gets out of the way. It handles the orchestration so you can focus on what your agents actually do.
|
|
83
|
+
|
|
84
|
+
Agents can ingest documents, browse the web, search the internet, and manage their own files -- making them well-suited for research, information processing, and long-running autonomous workflows. Give them a schedule and they'll check in on their own.
|
|
85
|
+
|
|
86
|
+
> **[Read the full documentation](https://johnsosoka.github.io/OpenPaw/)**
|
|
87
|
+
|
|
88
|
+
## Highlights
|
|
89
|
+
|
|
90
|
+
**First Class Document processing** -- Docling OCR/ICR turns scanned PDFs, DOCX, and PPTX into markdown automatically. Whisper transcribes voice messages on arrival.
|
|
91
|
+
|
|
92
|
+
**Drop-in custom tools** -- Write a `@tool` function, put it in `agent/tools/`, restart. Your agent picks it up with zero wiring.
|
|
93
|
+
|
|
94
|
+
**Multi-agent spawning** -- Agents spin up background workers for parallel tasks with full lifecycle tracking and result collection.
|
|
95
|
+
|
|
96
|
+
**Dynamic tool assignment** -- Spawned sub-agents can be given a tailored tool loadout via allow/deny lists, so each worker gets only the capabilities it needs.
|
|
97
|
+
|
|
98
|
+
**Cron scheduling and heartbeats** -- Recurring jobs, one-shot timers, proactive check-ins. Agents can even self-schedule follow-ups at runtime.
|
|
99
|
+
|
|
100
|
+
**Browser automation** -- Playwright-driven web interaction via accessibility tree. Agents reference page elements by number, not CSS selectors.
|
|
101
|
+
|
|
102
|
+
**Email integration** -- Send and receive email via Gmail with safe-by-default recipient policies. Read inbox, search, reply with threading, and manage attachments.
|
|
103
|
+
|
|
104
|
+
**Deep research** -- Integrate with a self-hosted GPT-Researcher instance for multi-source research reports with citations. Agents submit queries via WebSocket and receive comprehensive markdown reports.
|
|
105
|
+
|
|
106
|
+
**Approval gates** -- Human-in-the-loop authorization for dangerous operations, with configurable timeouts and channel-native UI.
|
|
107
|
+
|
|
108
|
+
**Multi-channel support** -- Connect agents to Telegram, Discord, or both simultaneously. Trigger-based activation lets agents respond to @mentions, keyword triggers, or both in group chats. On-demand context fetch gives agents awareness of recent channel history when triggered.
|
|
109
|
+
|
|
110
|
+
**Session management** -- Conversations auto-reset after inactivity (default 3 hours). Auto-compact rotates context when the window fills. Persistent channel logs give agents searchable message history.
|
|
111
|
+
|
|
112
|
+
**Workspace isolation** -- Each agent gets its own SOUL.md personality, tools directory, conversation history, channels, and sandboxed filesystem.
|
|
113
|
+
|
|
114
|
+
**Multi-provider LLM support** -- Anthropic, OpenAI, AWS Bedrock, xAI, and any OpenAI-compatible endpoint. Switch models at runtime with `/model`.
|
|
115
|
+
|
|
116
|
+
**Memory and observability** -- Vector search for semantic recall, conversation archiving to markdown and JSON, and session logs for every cron, heartbeat, and sub-agent run. Full visibility into what your agents are doing and thinking.
|
|
117
|
+
|
|
118
|
+
## Quick Start
|
|
119
|
+
|
|
120
|
+
### 1. Install
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install openpaw-ai
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
For development from source:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
git clone https://github.com/johnsosoka/OpenPaw.git
|
|
130
|
+
cd OpenPaw
|
|
131
|
+
poetry install
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 2. Scaffold a workspace
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
poetry run openpaw init my_agent \
|
|
138
|
+
--model anthropic:claude-sonnet-4-20250514 \
|
|
139
|
+
--channel telegram
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 3. Configure
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
cp config.example.yaml config.yaml
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Add your API keys to `agent_workspaces/my_agent/config/.env`:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
ANTHROPIC_API_KEY=your-key-here
|
|
152
|
+
TELEGRAM_BOT_TOKEN=your-token-here
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 4. Run
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
poetry run openpaw -c config.yaml -w my_agent
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## CLI Commands
|
|
162
|
+
|
|
163
|
+
| Command | Description |
|
|
164
|
+
|---------|-------------|
|
|
165
|
+
| `openpaw init <name>` | Scaffold a new agent workspace |
|
|
166
|
+
| `openpaw init <name> --model <provider:model>` | Scaffold with a pre-configured model |
|
|
167
|
+
| `openpaw init <name> --channel telegram` | Scaffold with channel pre-configured (`telegram` or `discord`) |
|
|
168
|
+
| `openpaw list` | List available workspaces |
|
|
169
|
+
| `openpaw -c config.yaml -w <name>` | Run a single workspace |
|
|
170
|
+
| `openpaw -c config.yaml -w name1,name2` | Run multiple workspaces |
|
|
171
|
+
| `openpaw -c config.yaml --all` | Run all discovered workspaces |
|
|
172
|
+
| `openpaw -c config.yaml -w <name> -v` | Run with verbose logging |
|
|
173
|
+
|
|
174
|
+
All commands should be prefixed with `poetry run` when running from the project directory.
|
|
175
|
+
|
|
176
|
+
## Agent Workspace Structure
|
|
177
|
+
|
|
178
|
+
Each workspace lives under `agent_workspaces/<name>/` and is organized into five directories:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
agent_workspaces/my_agent/
|
|
182
|
+
├── agent/ # Identity and extensions
|
|
183
|
+
│ ├── AGENT.md # Capabilities and behavior guidelines
|
|
184
|
+
│ ├── USER.md # User context and preferences
|
|
185
|
+
│ ├── SOUL.md # Core personality and values
|
|
186
|
+
│ ├── HEARTBEAT.md # Session state scratchpad (agent-writable)
|
|
187
|
+
│ ├── skills/ # Skill directories (SKILL.md format)
|
|
188
|
+
│ ├── team/ # Spawn profiles (sub-agent personas)
|
|
189
|
+
│ └── tools/ # Custom LangChain @tool functions
|
|
190
|
+
├── config/ # Configuration (write-protected)
|
|
191
|
+
│ ├── agent.yaml # Per-workspace settings (model, channel, queue)
|
|
192
|
+
│ ├── .env # API keys and secrets
|
|
193
|
+
│ └── crons/ # Scheduled task definitions
|
|
194
|
+
├── .openpaw/ # Framework internals (write-protected)
|
|
195
|
+
│ ├── conversations.db # AsyncSqliteSaver checkpoint database
|
|
196
|
+
│ ├── sessions.json # Session/conversation thread state
|
|
197
|
+
│ ├── token_usage.jsonl # Token usage metrics (append-only)
|
|
198
|
+
│ └── subagents.yaml # Sub-agent requests and results
|
|
199
|
+
├── memory/ # Archived conversations and session logs
|
|
200
|
+
│ ├── conversations/ # Conversation exports (markdown + JSON)
|
|
201
|
+
│ └── logs/ # Session logs and channel history
|
|
202
|
+
│ ├── channel/ # Persistent channel message logs (JSONL)
|
|
203
|
+
│ └── sessions/ # Heartbeat, cron, and sub-agent session logs
|
|
204
|
+
└── workspace/ # Agent work area (default write target)
|
|
205
|
+
├── downloads/ # Browser-downloaded files
|
|
206
|
+
└── screenshots/ # Browser screenshots
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The `openpaw init` command scaffolds this structure with starter templates. Customize the identity files in `agent/` to shape your agent's personality and purpose. Configure model, channel, and queue behavior in `config/agent.yaml`.
|
|
210
|
+
|
|
211
|
+
The `data/` and `config/` directories are write-protected from agent filesystem tools. Write operations default to the `workspace/` directory unless an explicit path is provided.
|
|
212
|
+
|
|
213
|
+
## In-Chat Commands
|
|
214
|
+
|
|
215
|
+
Once running, agents respond to framework commands in chat:
|
|
216
|
+
|
|
217
|
+
| Command | Description |
|
|
218
|
+
|---------|-------------|
|
|
219
|
+
| `/help` | List available commands |
|
|
220
|
+
| `/status` | Show model, context usage, tasks, and token usage |
|
|
221
|
+
| `/new` | Archive conversation and start fresh |
|
|
222
|
+
| `/compact` | Summarize, archive, and continue with summary |
|
|
223
|
+
| `/model <provider:model>` | Switch LLM model at runtime |
|
|
224
|
+
|
|
225
|
+
## Documentation
|
|
226
|
+
|
|
227
|
+
- [Getting Started](docs/getting-started.md) -- Installation, first workspace, and troubleshooting
|
|
228
|
+
- [Concepts](docs/concepts.md) -- How workspaces, scheduling, queues, and tools fit together
|
|
229
|
+
- [Configuration](docs/configuration.md) -- Global and per-workspace configuration reference
|
|
230
|
+
- [Workspaces](docs/workspaces.md) -- Workspace structure, identity files, and custom tools
|
|
231
|
+
- [Scheduling](docs/scheduling.md) -- Cron jobs, heartbeats, and dynamic scheduling
|
|
232
|
+
- [Built-ins](docs/builtins.md) -- Web search, browser automation, email, voice, sub-agents, and more
|
|
233
|
+
- [Channels](docs/channels.md) -- Channel adapters and access control
|
|
234
|
+
- [Queue System](docs/queue-system.md) -- Queue modes and message handling
|
|
235
|
+
- [Architecture](docs/architecture.md) -- System design, data flows, and architectural decisions
|
|
236
|
+
|
|
237
|
+
## Contributing
|
|
238
|
+
|
|
239
|
+
Development follows a GitFlow branching model:
|
|
240
|
+
|
|
241
|
+
- **`main`** -- Stable releases only. Protected branch, requires CI to pass.
|
|
242
|
+
- **`develop`** -- Integration branch. Feature and bugfix PRs target `develop`.
|
|
243
|
+
- **Feature branches** -- Branch from `develop` as `feature/`, `bugfix/`, `docs/`, or `chore/`.
|
|
244
|
+
|
|
245
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development guide.
|
|
246
|
+
|
|
247
|
+
## AI Code Review
|
|
248
|
+
|
|
249
|
+
All pull requests are automatically reviewed by GPT-4o via [ai-code-review](https://github.com/AleksandrFurmenkovOfficial/ai-code-review). The AI checks for code quality, security issues, performance concerns, and maintainability.
|
|
250
|
+
|
|
251
|
+
Reviews run on every PR open and update. Results are posted as inline comments on the pull request.
|
|
252
|
+
|
|
253
|
+
## Prerequisites
|
|
254
|
+
|
|
255
|
+
- Python 3.11+
|
|
256
|
+
- [Poetry 2.0+](https://python-poetry.org/docs/#installation)
|
|
257
|
+
- At least one channel bot token: [Telegram](https://core.telegram.org/bots#botfather) or [Discord](https://discord.com/developers/applications)
|
|
258
|
+
- At least one model provider API key (Anthropic, OpenAI, or AWS credentials for Bedrock)
|
|
259
|
+
|
|
260
|
+
## License
|
|
261
|
+
|
|
262
|
+
[PolyForm Noncommercial 1.0.0](LICENSE)
|
|
263
|
+
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="docs/assets/images/logo.png" alt="OpenPaw" width="400">
|
|
3
|
+
<p><strong>A Friendly <a href="https://langchain-ai.github.io/langgraph/">LangChain/LangGraph</a> Multi-Agent Runner</strong></p>
|
|
4
|
+
<p>
|
|
5
|
+
<a href="https://github.com/johnsosoka/OpenPaw/actions/workflows/ci.yml"><img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
|
|
6
|
+
<a href="https://github.com/johnsosoka/OpenPaw/actions/workflows/docs.yml"><img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/docs.yml/badge.svg?branch=main" alt="Docs"></a>
|
|
7
|
+
<img src="https://github.com/johnsosoka/OpenPaw/actions/workflows/ai-code-review.yml/badge.svg" alt="AI Code Review">
|
|
8
|
+
<img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+">
|
|
9
|
+
<img src="https://img.shields.io/badge/license-PolyForm%20Noncommercial-green" alt="License">
|
|
10
|
+
</p>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
> **Pre-1.0 Release (0.4.0)** — OpenPaw is actively developed. The API may evolve as we work towards a stable 1.0.0 release. Contributions and feedback are welcome.
|
|
16
|
+
|
|
17
|
+
OpenPaw gives each agent its own workspace -- personality files, custom tools, scheduled tasks -- then gets out of the way. It handles the orchestration so you can focus on what your agents actually do.
|
|
18
|
+
|
|
19
|
+
Agents can ingest documents, browse the web, search the internet, and manage their own files -- making them well-suited for research, information processing, and long-running autonomous workflows. Give them a schedule and they'll check in on their own.
|
|
20
|
+
|
|
21
|
+
> **[Read the full documentation](https://johnsosoka.github.io/OpenPaw/)**
|
|
22
|
+
|
|
23
|
+
## Highlights
|
|
24
|
+
|
|
25
|
+
**First Class Document processing** -- Docling OCR/ICR turns scanned PDFs, DOCX, and PPTX into markdown automatically. Whisper transcribes voice messages on arrival.
|
|
26
|
+
|
|
27
|
+
**Drop-in custom tools** -- Write a `@tool` function, put it in `agent/tools/`, restart. Your agent picks it up with zero wiring.
|
|
28
|
+
|
|
29
|
+
**Multi-agent spawning** -- Agents spin up background workers for parallel tasks with full lifecycle tracking and result collection.
|
|
30
|
+
|
|
31
|
+
**Dynamic tool assignment** -- Spawned sub-agents can be given a tailored tool loadout via allow/deny lists, so each worker gets only the capabilities it needs.
|
|
32
|
+
|
|
33
|
+
**Cron scheduling and heartbeats** -- Recurring jobs, one-shot timers, proactive check-ins. Agents can even self-schedule follow-ups at runtime.
|
|
34
|
+
|
|
35
|
+
**Browser automation** -- Playwright-driven web interaction via accessibility tree. Agents reference page elements by number, not CSS selectors.
|
|
36
|
+
|
|
37
|
+
**Email integration** -- Send and receive email via Gmail with safe-by-default recipient policies. Read inbox, search, reply with threading, and manage attachments.
|
|
38
|
+
|
|
39
|
+
**Deep research** -- Integrate with a self-hosted GPT-Researcher instance for multi-source research reports with citations. Agents submit queries via WebSocket and receive comprehensive markdown reports.
|
|
40
|
+
|
|
41
|
+
**Approval gates** -- Human-in-the-loop authorization for dangerous operations, with configurable timeouts and channel-native UI.
|
|
42
|
+
|
|
43
|
+
**Multi-channel support** -- Connect agents to Telegram, Discord, or both simultaneously. Trigger-based activation lets agents respond to @mentions, keyword triggers, or both in group chats. On-demand context fetch gives agents awareness of recent channel history when triggered.
|
|
44
|
+
|
|
45
|
+
**Session management** -- Conversations auto-reset after inactivity (default 3 hours). Auto-compact rotates context when the window fills. Persistent channel logs give agents searchable message history.
|
|
46
|
+
|
|
47
|
+
**Workspace isolation** -- Each agent gets its own SOUL.md personality, tools directory, conversation history, channels, and sandboxed filesystem.
|
|
48
|
+
|
|
49
|
+
**Multi-provider LLM support** -- Anthropic, OpenAI, AWS Bedrock, xAI, and any OpenAI-compatible endpoint. Switch models at runtime with `/model`.
|
|
50
|
+
|
|
51
|
+
**Memory and observability** -- Vector search for semantic recall, conversation archiving to markdown and JSON, and session logs for every cron, heartbeat, and sub-agent run. Full visibility into what your agents are doing and thinking.
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
### 1. Install
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install openpaw-ai
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For development from source:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/johnsosoka/OpenPaw.git
|
|
65
|
+
cd OpenPaw
|
|
66
|
+
poetry install
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 2. Scaffold a workspace
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
poetry run openpaw init my_agent \
|
|
73
|
+
--model anthropic:claude-sonnet-4-20250514 \
|
|
74
|
+
--channel telegram
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3. Configure
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cp config.example.yaml config.yaml
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Add your API keys to `agent_workspaces/my_agent/config/.env`:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
ANTHROPIC_API_KEY=your-key-here
|
|
87
|
+
TELEGRAM_BOT_TOKEN=your-token-here
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 4. Run
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
poetry run openpaw -c config.yaml -w my_agent
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## CLI Commands
|
|
97
|
+
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `openpaw init <name>` | Scaffold a new agent workspace |
|
|
101
|
+
| `openpaw init <name> --model <provider:model>` | Scaffold with a pre-configured model |
|
|
102
|
+
| `openpaw init <name> --channel telegram` | Scaffold with channel pre-configured (`telegram` or `discord`) |
|
|
103
|
+
| `openpaw list` | List available workspaces |
|
|
104
|
+
| `openpaw -c config.yaml -w <name>` | Run a single workspace |
|
|
105
|
+
| `openpaw -c config.yaml -w name1,name2` | Run multiple workspaces |
|
|
106
|
+
| `openpaw -c config.yaml --all` | Run all discovered workspaces |
|
|
107
|
+
| `openpaw -c config.yaml -w <name> -v` | Run with verbose logging |
|
|
108
|
+
|
|
109
|
+
All commands should be prefixed with `poetry run` when running from the project directory.
|
|
110
|
+
|
|
111
|
+
## Agent Workspace Structure
|
|
112
|
+
|
|
113
|
+
Each workspace lives under `agent_workspaces/<name>/` and is organized into five directories:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
agent_workspaces/my_agent/
|
|
117
|
+
├── agent/ # Identity and extensions
|
|
118
|
+
│ ├── AGENT.md # Capabilities and behavior guidelines
|
|
119
|
+
│ ├── USER.md # User context and preferences
|
|
120
|
+
│ ├── SOUL.md # Core personality and values
|
|
121
|
+
│ ├── HEARTBEAT.md # Session state scratchpad (agent-writable)
|
|
122
|
+
│ ├── skills/ # Skill directories (SKILL.md format)
|
|
123
|
+
│ ├── team/ # Spawn profiles (sub-agent personas)
|
|
124
|
+
│ └── tools/ # Custom LangChain @tool functions
|
|
125
|
+
├── config/ # Configuration (write-protected)
|
|
126
|
+
│ ├── agent.yaml # Per-workspace settings (model, channel, queue)
|
|
127
|
+
│ ├── .env # API keys and secrets
|
|
128
|
+
│ └── crons/ # Scheduled task definitions
|
|
129
|
+
├── .openpaw/ # Framework internals (write-protected)
|
|
130
|
+
│ ├── conversations.db # AsyncSqliteSaver checkpoint database
|
|
131
|
+
│ ├── sessions.json # Session/conversation thread state
|
|
132
|
+
│ ├── token_usage.jsonl # Token usage metrics (append-only)
|
|
133
|
+
│ └── subagents.yaml # Sub-agent requests and results
|
|
134
|
+
├── memory/ # Archived conversations and session logs
|
|
135
|
+
│ ├── conversations/ # Conversation exports (markdown + JSON)
|
|
136
|
+
│ └── logs/ # Session logs and channel history
|
|
137
|
+
│ ├── channel/ # Persistent channel message logs (JSONL)
|
|
138
|
+
│ └── sessions/ # Heartbeat, cron, and sub-agent session logs
|
|
139
|
+
└── workspace/ # Agent work area (default write target)
|
|
140
|
+
├── downloads/ # Browser-downloaded files
|
|
141
|
+
└── screenshots/ # Browser screenshots
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The `openpaw init` command scaffolds this structure with starter templates. Customize the identity files in `agent/` to shape your agent's personality and purpose. Configure model, channel, and queue behavior in `config/agent.yaml`.
|
|
145
|
+
|
|
146
|
+
The `data/` and `config/` directories are write-protected from agent filesystem tools. Write operations default to the `workspace/` directory unless an explicit path is provided.
|
|
147
|
+
|
|
148
|
+
## In-Chat Commands
|
|
149
|
+
|
|
150
|
+
Once running, agents respond to framework commands in chat:
|
|
151
|
+
|
|
152
|
+
| Command | Description |
|
|
153
|
+
|---------|-------------|
|
|
154
|
+
| `/help` | List available commands |
|
|
155
|
+
| `/status` | Show model, context usage, tasks, and token usage |
|
|
156
|
+
| `/new` | Archive conversation and start fresh |
|
|
157
|
+
| `/compact` | Summarize, archive, and continue with summary |
|
|
158
|
+
| `/model <provider:model>` | Switch LLM model at runtime |
|
|
159
|
+
|
|
160
|
+
## Documentation
|
|
161
|
+
|
|
162
|
+
- [Getting Started](docs/getting-started.md) -- Installation, first workspace, and troubleshooting
|
|
163
|
+
- [Concepts](docs/concepts.md) -- How workspaces, scheduling, queues, and tools fit together
|
|
164
|
+
- [Configuration](docs/configuration.md) -- Global and per-workspace configuration reference
|
|
165
|
+
- [Workspaces](docs/workspaces.md) -- Workspace structure, identity files, and custom tools
|
|
166
|
+
- [Scheduling](docs/scheduling.md) -- Cron jobs, heartbeats, and dynamic scheduling
|
|
167
|
+
- [Built-ins](docs/builtins.md) -- Web search, browser automation, email, voice, sub-agents, and more
|
|
168
|
+
- [Channels](docs/channels.md) -- Channel adapters and access control
|
|
169
|
+
- [Queue System](docs/queue-system.md) -- Queue modes and message handling
|
|
170
|
+
- [Architecture](docs/architecture.md) -- System design, data flows, and architectural decisions
|
|
171
|
+
|
|
172
|
+
## Contributing
|
|
173
|
+
|
|
174
|
+
Development follows a GitFlow branching model:
|
|
175
|
+
|
|
176
|
+
- **`main`** -- Stable releases only. Protected branch, requires CI to pass.
|
|
177
|
+
- **`develop`** -- Integration branch. Feature and bugfix PRs target `develop`.
|
|
178
|
+
- **Feature branches** -- Branch from `develop` as `feature/`, `bugfix/`, `docs/`, or `chore/`.
|
|
179
|
+
|
|
180
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full development guide.
|
|
181
|
+
|
|
182
|
+
## AI Code Review
|
|
183
|
+
|
|
184
|
+
All pull requests are automatically reviewed by GPT-4o via [ai-code-review](https://github.com/AleksandrFurmenkovOfficial/ai-code-review). The AI checks for code quality, security issues, performance concerns, and maintainability.
|
|
185
|
+
|
|
186
|
+
Reviews run on every PR open and update. Results are posted as inline comments on the pull request.
|
|
187
|
+
|
|
188
|
+
## Prerequisites
|
|
189
|
+
|
|
190
|
+
- Python 3.11+
|
|
191
|
+
- [Poetry 2.0+](https://python-poetry.org/docs/#installation)
|
|
192
|
+
- At least one channel bot token: [Telegram](https://core.telegram.org/bots#botfather) or [Discord](https://discord.com/developers/applications)
|
|
193
|
+
- At least one model provider API key (Anthropic, OpenAI, or AWS credentials for Bedrock)
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
[PolyForm Noncommercial 1.0.0](LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""OpenPaw - Multi-Channel AI Agent Framework built on LangGraph.
|
|
2
|
+
|
|
3
|
+
Each agent runs in an isolated workspace with its own identity, tools,
|
|
4
|
+
conversation history, and scheduled tasks. Supports Telegram, Discord, and
|
|
5
|
+
stdio channels out of the box.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.4.0"
|
|
9
|
+
__all__ = ["__version__"]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Agent execution and lifecycle management.
|
|
2
|
+
|
|
3
|
+
This package consolidates agent-related functionality:
|
|
4
|
+
- AgentRunner: LangGraph agent with workspace integration
|
|
5
|
+
- Metrics: Token usage tracking and logging
|
|
6
|
+
- Middleware: Tool execution middleware (queue-aware, approval, LLM hooks)
|
|
7
|
+
- Tools: Sandboxed filesystem tools for workspace access
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from openpaw.agent.metrics import InvocationMetrics, TokenUsageLogger, TokenUsageReader
|
|
11
|
+
from openpaw.agent.response_processor import ResponseProcessor
|
|
12
|
+
from openpaw.agent.runner import AgentRunner
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"AgentRunner",
|
|
16
|
+
"InvocationMetrics",
|
|
17
|
+
"ResponseProcessor",
|
|
18
|
+
"TokenUsageLogger",
|
|
19
|
+
"TokenUsageReader",
|
|
20
|
+
]
|