Repository navigation
feat: Agent Event Subscriptions — lightweight pub/sub for inter-agent pipelines (#169) - #191
Merged
Merged
Conversation
… pipelines (#169) Adds a SQLite-backed event pub/sub system where agents emit named events and other agents subscribe to receive async tasks when matching events fire. Uses existing agent_permissions for access control. New MCP tools: emit_event, subscribe_to_event, list_event_subscriptions, delete_event_subscription New API endpoints: subscription CRUD, event emission, event history 44 tests, all passing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Resolve conflicts in changelog.md and feature-flows.md — keep both sides. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
emit_eventMCP tool, subscribers receive async tasks with{{payload.field}}template interpolationagent_permissionssystemChanges
Backend (Python):
db/event_subscriptions.py— NewEventSubscriptionOperationsclass (CRUD, matching, event persistence)routers/event_subscriptions.py— 9 new API endpoints (subscription CRUD, event emission, event history)db/schema.py— 2 new tables (agent_event_subscriptions,agent_events) + 5 indexesdb_models.py— 6 new Pydantic modelsdatabase.py— 10 delegation methods + model re-exportsmain.py— Router registration, WebSocket injectionrouters/agents.py— Cleanup subscriptions on agent deleteMCP Server (TypeScript):
tools/events.ts— 4 new MCP tools:emit_event,subscribe_to_event,list_event_subscriptions,delete_event_subscriptionclient.ts— 4 new API client methodsserver.ts— Tool registrationDocumentation:
docs/memory/feature-flows/agent-event-subscriptions.mdTest plan
tests/test_event_subscriptions.py— all passingCloses #169
🤖 Generated with Claude Code