agent-coral 2.0.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.
Files changed (123) hide show
  1. agent_coral-2.0.0/PKG-INFO +297 -0
  2. agent_coral-2.0.0/README.md +261 -0
  3. agent_coral-2.0.0/pyproject.toml +77 -0
  4. agent_coral-2.0.0/setup.cfg +4 -0
  5. agent_coral-2.0.0/src/agent_coral.egg-info/PKG-INFO +297 -0
  6. agent_coral-2.0.0/src/agent_coral.egg-info/SOURCES.txt +121 -0
  7. agent_coral-2.0.0/src/agent_coral.egg-info/dependency_links.txt +1 -0
  8. agent_coral-2.0.0/src/agent_coral.egg-info/entry_points.txt +8 -0
  9. agent_coral-2.0.0/src/agent_coral.egg-info/requires.txt +13 -0
  10. agent_coral-2.0.0/src/agent_coral.egg-info/top_level.txt +1 -0
  11. agent_coral-2.0.0/src/coral/PROTOCOL.md +126 -0
  12. agent_coral-2.0.0/src/coral/__init__.py +3 -0
  13. agent_coral-2.0.0/src/coral/agents/__init__.py +49 -0
  14. agent_coral-2.0.0/src/coral/agents/base.py +162 -0
  15. agent_coral-2.0.0/src/coral/agents/claude.py +709 -0
  16. agent_coral-2.0.0/src/coral/agents/gemini.py +195 -0
  17. agent_coral-2.0.0/src/coral/api/__init__.py +1 -0
  18. agent_coral-2.0.0/src/coral/api/history.py +247 -0
  19. agent_coral-2.0.0/src/coral/api/live_sessions.py +832 -0
  20. agent_coral-2.0.0/src/coral/api/schedule.py +146 -0
  21. agent_coral-2.0.0/src/coral/api/system.py +80 -0
  22. agent_coral-2.0.0/src/coral/api/tasks.py +108 -0
  23. agent_coral-2.0.0/src/coral/api/themes.py +319 -0
  24. agent_coral-2.0.0/src/coral/api/uploads.py +68 -0
  25. agent_coral-2.0.0/src/coral/api/webhooks.py +112 -0
  26. agent_coral-2.0.0/src/coral/background_tasks/__init__.py +16 -0
  27. agent_coral-2.0.0/src/coral/background_tasks/auto_summarizer.py +135 -0
  28. agent_coral-2.0.0/src/coral/background_tasks/git_poller.py +225 -0
  29. agent_coral-2.0.0/src/coral/background_tasks/idle_detector.py +86 -0
  30. agent_coral-2.0.0/src/coral/background_tasks/scheduler.py +464 -0
  31. agent_coral-2.0.0/src/coral/background_tasks/session_indexer.py +107 -0
  32. agent_coral-2.0.0/src/coral/background_tasks/webhook_dispatcher.py +191 -0
  33. agent_coral-2.0.0/src/coral/bundled_themes/GhostV3.json +76 -0
  34. agent_coral-2.0.0/src/coral/hooks/__init__.py +1 -0
  35. agent_coral-2.0.0/src/coral/hooks/agentic_state.py +58 -0
  36. agent_coral-2.0.0/src/coral/hooks/task_state.py +104 -0
  37. agent_coral-2.0.0/src/coral/hooks/utils.py +88 -0
  38. agent_coral-2.0.0/src/coral/launch.py +24 -0
  39. agent_coral-2.0.0/src/coral/launch_agents.sh +187 -0
  40. agent_coral-2.0.0/src/coral/static/agent_notes.js +126 -0
  41. agent_coral-2.0.0/src/coral/static/agentic_state.js +427 -0
  42. agent_coral-2.0.0/src/coral/static/api.js +65 -0
  43. agent_coral-2.0.0/src/coral/static/app.js +513 -0
  44. agent_coral-2.0.0/src/coral/static/browser.js +70 -0
  45. agent_coral-2.0.0/src/coral/static/capture.js +117 -0
  46. agent_coral-2.0.0/src/coral/static/changed_files.js +160 -0
  47. agent_coral-2.0.0/src/coral/static/commits.js +61 -0
  48. agent_coral-2.0.0/src/coral/static/controls.js +611 -0
  49. agent_coral-2.0.0/src/coral/static/coral.png +0 -0
  50. agent_coral-2.0.0/src/coral/static/corral.png +0 -0
  51. agent_coral-2.0.0/src/coral/static/css/agentic.css +1017 -0
  52. agent_coral-2.0.0/src/coral/static/css/animations.css +36 -0
  53. agent_coral-2.0.0/src/coral/static/css/base.css +57 -0
  54. agent_coral-2.0.0/src/coral/static/css/chat.css +467 -0
  55. agent_coral-2.0.0/src/coral/static/css/command-pane.css +234 -0
  56. agent_coral-2.0.0/src/coral/static/css/components.css +866 -0
  57. agent_coral-2.0.0/src/coral/static/css/history.css +274 -0
  58. agent_coral-2.0.0/src/coral/static/css/layout.css +526 -0
  59. agent_coral-2.0.0/src/coral/static/css/output.css +295 -0
  60. agent_coral-2.0.0/src/coral/static/css/scheduler.css +289 -0
  61. agent_coral-2.0.0/src/coral/static/css/session.css +528 -0
  62. agent_coral-2.0.0/src/coral/static/css/theme-configurator.css +174 -0
  63. agent_coral-2.0.0/src/coral/static/css/variables.css +262 -0
  64. agent_coral-2.0.0/src/coral/static/favicon.ico +0 -0
  65. agent_coral-2.0.0/src/coral/static/favicon.png +0 -0
  66. agent_coral-2.0.0/src/coral/static/file_mention.js +197 -0
  67. agent_coral-2.0.0/src/coral/static/history_tabs.js +334 -0
  68. agent_coral-2.0.0/src/coral/static/live_chat.js +235 -0
  69. agent_coral-2.0.0/src/coral/static/live_jobs.js +105 -0
  70. agent_coral-2.0.0/src/coral/static/modals.js +509 -0
  71. agent_coral-2.0.0/src/coral/static/notes.js +230 -0
  72. agent_coral-2.0.0/src/coral/static/render.js +298 -0
  73. agent_coral-2.0.0/src/coral/static/renderers.js +391 -0
  74. agent_coral-2.0.0/src/coral/static/scheduler.js +316 -0
  75. agent_coral-2.0.0/src/coral/static/search_filters.js +95 -0
  76. agent_coral-2.0.0/src/coral/static/sessions.js +238 -0
  77. agent_coral-2.0.0/src/coral/static/sidebar.js +313 -0
  78. agent_coral-2.0.0/src/coral/static/state.js +28 -0
  79. agent_coral-2.0.0/src/coral/static/style.css +21 -0
  80. agent_coral-2.0.0/src/coral/static/syntax.js +79 -0
  81. agent_coral-2.0.0/src/coral/static/tags.js +160 -0
  82. agent_coral-2.0.0/src/coral/static/tasks.js +201 -0
  83. agent_coral-2.0.0/src/coral/static/theme_config.js +415 -0
  84. agent_coral-2.0.0/src/coral/static/utils.js +52 -0
  85. agent_coral-2.0.0/src/coral/static/webhooks.js +225 -0
  86. agent_coral-2.0.0/src/coral/static/websocket.js +96 -0
  87. agent_coral-2.0.0/src/coral/static/xterm_renderer.js +282 -0
  88. agent_coral-2.0.0/src/coral/store/__init__.py +404 -0
  89. agent_coral-2.0.0/src/coral/store/connection.py +355 -0
  90. agent_coral-2.0.0/src/coral/store/git.py +229 -0
  91. agent_coral-2.0.0/src/coral/store/schedule.py +251 -0
  92. agent_coral-2.0.0/src/coral/store/sessions.py +658 -0
  93. agent_coral-2.0.0/src/coral/store/tasks.py +341 -0
  94. agent_coral-2.0.0/src/coral/store/webhooks.py +226 -0
  95. agent_coral-2.0.0/src/coral/templates/diff.html +508 -0
  96. agent_coral-2.0.0/src/coral/templates/includes/modals.html +301 -0
  97. agent_coral-2.0.0/src/coral/templates/includes/sidebar.html +138 -0
  98. agent_coral-2.0.0/src/coral/templates/includes/views/history_session.html +92 -0
  99. agent_coral-2.0.0/src/coral/templates/includes/views/live_session.html +152 -0
  100. agent_coral-2.0.0/src/coral/templates/index.html +124 -0
  101. agent_coral-2.0.0/src/coral/tools/__init__.py +1 -0
  102. agent_coral-2.0.0/src/coral/tools/cron_parser.py +136 -0
  103. agent_coral-2.0.0/src/coral/tools/jsonl_reader.py +100 -0
  104. agent_coral-2.0.0/src/coral/tools/log_streamer.py +175 -0
  105. agent_coral-2.0.0/src/coral/tools/pulse_detector.py +70 -0
  106. agent_coral-2.0.0/src/coral/tools/run_callback.py +28 -0
  107. agent_coral-2.0.0/src/coral/tools/session_manager.py +637 -0
  108. agent_coral-2.0.0/src/coral/tools/tmux_manager.py +324 -0
  109. agent_coral-2.0.0/src/coral/tools/utils.py +48 -0
  110. agent_coral-2.0.0/src/coral/web_server.py +224 -0
  111. agent_coral-2.0.0/tests/test_agent_event_detail_json.py +121 -0
  112. agent_coral-2.0.0/tests/test_agentic_state.py +397 -0
  113. agent_coral-2.0.0/tests/test_cron_parser.py +45 -0
  114. agent_coral-2.0.0/tests/test_log_streamer.py +74 -0
  115. agent_coral-2.0.0/tests/test_persistent_sessions.py +502 -0
  116. agent_coral-2.0.0/tests/test_pulse_wrapping.py +304 -0
  117. agent_coral-2.0.0/tests/test_schedule.py +229 -0
  118. agent_coral-2.0.0/tests/test_search_files.py +191 -0
  119. agent_coral-2.0.0/tests/test_session_store.py +178 -0
  120. agent_coral-2.0.0/tests/test_task_sync.py +370 -0
  121. agent_coral-2.0.0/tests/test_utils.py +23 -0
  122. agent_coral-2.0.0/tests/test_waiting_for_input.py +86 -0
  123. agent_coral-2.0.0/tests/test_web_server.py +21 -0
@@ -0,0 +1,297 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-coral
3
+ Version: 2.0.0
4
+ Summary: A multi-agent orchestration system for managing AI coding agents (Claude and Gemini) in parallel git worktrees with a real-time web dashboard.
5
+ Author: Chris Knorowski
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/cdknorow/coral
8
+ Project-URL: Repository, https://github.com/cdknorow/coral
9
+ Project-URL: Issues, https://github.com/cdknorow/coral/issues
10
+ Keywords: ai,agents,claude,gemini,orchestration,tmux,multi-agent,coding-agents,dashboard
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: fastapi>=0.104.0
25
+ Requires-Dist: uvicorn[standard]>=0.24.0
26
+ Requires-Dist: jinja2>=3.1.0
27
+ Requires-Dist: aiosqlite>=0.19.0
28
+ Requires-Dist: httpx>=0.25.0
29
+ Requires-Dist: python-multipart>=0.0.6
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
32
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
33
+ Requires-Dist: black>=23.0.0; extra == "dev"
34
+ Requires-Dist: build>=1.0.0; extra == "dev"
35
+ Requires-Dist: twine>=5.0.0; extra == "dev"
36
+
37
+ <img width="1024" height="250" alt="image" src="https://github.com/user-attachments/assets/8b7b1467-ecba-4b63-9151-137f2d2243ec" />
38
+
39
+ ---
40
+
41
+ ## The Pitch
42
+
43
+ Coral brings sanity to coding with AI agents without disrupting your workflow. The goal is to augment, not take over. Activity across all your agents is visible so you can see which ones need attention at a glance.
44
+
45
+ Stop losing track of what your AI coding agents are doing. As you scale your workflow, the chaos of scattered terminals, lost context, and untracked changes slows you down. Coral is the mission control center you need to effortlessly orchestrate your entire AI workforce. Maintain total visibility over every agent's progress, organize your history, and automate routine tasks so you can focus on building. Stop fighting your tools and start multiplying your productivity—with all your data completely secure and private on your own machine.
46
+
47
+ Coral is an MIT-licensed multi-agent orchestration application built with tmux, FastAPI, and vanilla HTML5/JS for easy extensibility and modification. We welcome feedback and contributions.
48
+
49
+ **[Read the full documentation →](https://cdknorow.github.io/coral/)**
50
+
51
+
52
+ ![main_loop](https://github.com/user-attachments/assets/6af60c92-1d72-45bd-9b46-7f1eab2ce5fe)
53
+
54
+ ## Features
55
+
56
+ - **Multi-agent support** — Launch and manage both Claude and Gemini agents side-by-side across worktrees
57
+ - **Web dashboard** — Real-time monitoring with pane capture, status tracking, and command input
58
+ - **Session history** — Browse past sessions with advanced filters (date range, agent type, tags, full-text search)
59
+ - **Full-text search** — Search across all session content using SQLite FTS5 with porter stemming
60
+ - **Auto-summarization** — Sessions are automatically summarized and indexed for search
61
+ - **Scheduled jobs** — Create cron-scheduled tasks that launch agents in isolated worktrees, send prompts, and clean up automatically
62
+ - **Webhook notifications** — Get notified via webhook when agents need input or complete work
63
+ - **Session notes & activity** — Add markdown notes and track activity that occurred in each session, live and historically
64
+ - **Remote control** — Send commands, navigate modes, and manage agents from the dashboard
65
+ - **Attach/Kill/Restart/Resume** — Open a terminal attached to any agent's tmux session, kill it, or relaunch as a new session
66
+ - **Git integration & PR linking** — Tracks commits, branches, and remote URLs per agent and session
67
+ - **Custom macros** — Add configurable toolbar buttons for frequently used commands
68
+
69
+ ## Installation
70
+
71
+ Install from PyPI:
72
+
73
+ ```bash
74
+ pip install agent-coral
75
+ ```
76
+
77
+ Or install directly from GitHub:
78
+
79
+ ```bash
80
+ pip install git+https://github.com/cdknorow/coral.git
81
+ ```
82
+
83
+ ## Launch agents and web dashboard
84
+
85
+ You can launch the web server directly using `coral` or `coral-dashboard`:
86
+
87
+ ```bash
88
+ # Start the web dashboard directly (default: http://localhost:8420)
89
+ coral
90
+
91
+ # Custom host/port
92
+ coral --host 127.0.0.1 --port 9000
93
+
94
+ ```
95
+
96
+ > **Note:** This system is currently mostly tested with Claude Code and to some extent Gemini CLI. However, the underlying architecture is extensible to any cli based agents.
97
+
98
+ ### Session history search and filtering
99
+
100
+ ![history](https://github.com/user-attachments/assets/3848aefe-e358-425b-ae14-ed2f41704a33)
101
+
102
+
103
+ The sidebar History section includes a search bar and filters for browsing your entire AI coding session history along with activity, notes, and git commit tracking
104
+
105
+ On startup, the server launches three background services:
106
+
107
+ 1. **Session indexer** (every 2 min) — Indexes all Claude sessions from `~/.claude/projects/**/*.jsonl` and Gemini sessions from `~/.gemini/tmp/*/chats/session-*.json`, builds a full-text search index (FTS5), and queues new sessions for auto-summarization
108
+ 2. **Batch summarizer** — Continuously processes the summarization queue using Claude CLI
109
+ 3. **Git poller** (every 2 min) — Polls git branch, commit, and remote URL for each live agent and stores snapshots in SQLite
110
+
111
+ Features:
112
+
113
+ - **Search** — Type in the search bar to find sessions by content (uses SQLite FTS5 with porter stemming)
114
+ - **Filter by tag** — Select a tag from the dropdown to narrow results
115
+ - **Filter by source** — Show only Claude or Gemini sessions
116
+ - **Filter by date** — Narrow results to a specific date range
117
+ - **Pagination** — Browse through all sessions with prev/next controls
118
+ - **URL bookmarking** — Session URLs use hash routing (`#session/<id>`) so you can bookmark or share links
119
+ - **Notes & tags** — Add markdown notes and color-coded tags to any session, stored in `~/.coral/sessions.db`
120
+
121
+
122
+ ### Managing sessions from the dashboard
123
+
124
+ <img width="1502" height="812" alt="image" src="https://github.com/user-attachments/assets/9a8d1b7b-1bef-414b-9002-c27dd928342b" />
125
+
126
+
127
+ The web dashboard provides quick-action buttons for each live session:
128
+
129
+ | Action | Description |
130
+ |---|---|
131
+ | **Esc / Arrow / Enter** | Send navigation keys to the agent |
132
+ | **Plan Mode** | Toggle Claude Code plan mode |
133
+ | **Accept Edits** | Toggle Claude Code auto-accept mode |
134
+ | **Bash Mode** | Send `!` command to enter bash mode |
135
+ | **Base Mode** | Toggle base mode |
136
+ | **/compact / /clear** | Send compress or clear commands (adapts per agent type) |
137
+ | **Reset** | Compress then clear the session |
138
+ | **Attach** | Open a local terminal window attached to the agent's tmux session |
139
+ | **Restart** | Restart the agent in the same tmux pane |
140
+ | **Kill** | Terminate the tmux session and remove it from the dashboard |
141
+
142
+ You can also type arbitrary commands in the input bar and send them to the selected agent.
143
+
144
+
145
+
146
+ ### Scheduled Jobs
147
+
148
+ Coral supports cron-scheduled jobs that automatically launch agents in isolated git worktrees. Create and manage them from the Scheduled section in the sidebar.
149
+
150
+ Each scheduled job:
151
+ - Creates a fresh git worktree from the specified branch
152
+ - Launches an agent (Claude or Gemini) with optional CLI flags
153
+ - Sends the configured prompt to the agent
154
+ - Monitors the session with a configurable timeout
155
+ - Cleans up the worktree on completion (optional)
156
+ - Tags the session as "scheduled" for easy filtering in history
157
+
158
+ Run history is tracked per job with links to view each session's full history.
159
+
160
+ ### Webhook Notifications
161
+
162
+ Configure webhooks from the dashboard settings to receive HTTP notifications when agents need input or when other events occur. Useful for integrating with Slack, Discord, or custom monitoring.
163
+
164
+ ### Claude Code Hooks (settings.json)
165
+
166
+ To fully integrate Claude Code's agentic state and task management into the Coral dashboard, configure the provided `coral-hook` scripts in your Claude Code `settings.json` (usually located at `~/.claude.json` or `~/.claude/settings.json`).
167
+
168
+ If you are already using other configuration options like a custom `statusLine` or other hooks, simply merge these hook definitions into your existing JSON:
169
+
170
+ ```json
171
+ "hooks": {
172
+ "PostToolUse": [
173
+ {
174
+ "matcher": "TaskCreate|TaskUpdate",
175
+ "hooks": [
176
+ {
177
+ "type": "command",
178
+ "command": "coral-hook-task-sync"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "matcher": "",
184
+ "hooks": [
185
+ {
186
+ "type": "command",
187
+ "command": "coral-hook-agentic-state"
188
+ }
189
+ ]
190
+ }
191
+ ],
192
+ "Stop": [
193
+ {
194
+ "matcher": "",
195
+ "hooks": [
196
+ {
197
+ "type": "command",
198
+ "command": "coral-hook-agentic-state"
199
+ }
200
+ ]
201
+ }
202
+ ],
203
+ "Notification": [
204
+ {
205
+ "matcher": "",
206
+ "hooks": [
207
+ {
208
+ "type": "command",
209
+ "command": "coral-hook-agentic-state"
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+
215
+ ```
216
+
217
+
218
+
219
+ Or use launcher which discovers worktree subdirectories, creates a agent for each one, and starts launches the dashboard:
220
+
221
+ ```bash
222
+ # Launch Claude agents and web dashboard for worktrees in the current directory
223
+ launch-coral
224
+
225
+ # Launch Gemini agents from a specific path
226
+ launch-coral <path-to-root> gemini
227
+
228
+ ```
229
+
230
+ ### Remote server development (SSH port forwarding)
231
+
232
+ If you're running Coral on a remote server, forward the dashboard port over SSH to access it in your local browser:
233
+
234
+ ```bash
235
+ # Forward remote port 8420 to localhost:8420
236
+ ssh -L 8420:localhost:8420 user@remote-host
237
+
238
+ # If using a custom port
239
+ ssh -L 9000:localhost:9000 user@remote-host
240
+ ```
241
+
242
+ Then open `http://localhost:8420` (or your custom port) in your local browser. You can add this to your `~/.ssh/config` to make it persistent:
243
+
244
+ ```
245
+ Host my-dev-server
246
+ HostName remote-host
247
+ User user
248
+ LocalForward 8420 localhost:8420
249
+ ```
250
+
251
+ ### Manual tmux management
252
+
253
+ ```bash
254
+ # Attach to a specific agent session
255
+ tmux attach -t claude-agent-1
256
+
257
+ # Switch between windows
258
+ Ctrl+b n # next
259
+ Ctrl+b p # previous
260
+
261
+ # Detach from tmux
262
+ Ctrl+b d
263
+ ```
264
+
265
+ ## Agent Protocol
266
+
267
+ Agents emit structured markers using the `||PULSE:<EVENT_TYPE> <payload>||` format. The dashboard parses these from agent output in real time:
268
+
269
+ ```
270
+ ||PULSE:STATUS <Short description of current task>||
271
+ ||PULSE:SUMMARY <One-sentence high-level goal>||
272
+ ||PULSE:CONFIDENCE <1-5> <short reason>||
273
+ ```
274
+
275
+ The protocol is automatically injected via `PROTOCOL.md` when launching agents. See [`src/coral/PROTOCOL.md`](src/coral/PROTOCOL.md) for the full specification.
276
+
277
+
278
+ ## Advanced Information
279
+
280
+ For information on project structure, API endpoints, and the database schema, please see [DEVELOP.md](DEVELOP.md).
281
+
282
+ ## Dependencies
283
+
284
+ - Python 3.8+
285
+ - [FastAPI](https://fastapi.tiangolo.com/) + [Uvicorn](https://www.uvicorn.org/) — Web server
286
+ - [Jinja2](https://jinja.palletsprojects.com/) — HTML templating
287
+ - [aiosqlite](https://github.com/omnilib/aiosqlite) — Async SQLite (WAL mode)
288
+ - tmux — Session management
289
+ - Claude CLI (optional) — Powers auto-summarization
290
+
291
+ ## Contributing
292
+
293
+ We welcome contributions! Whether it's adding support for new AI coding agents natively or improving the web dashboard, please feel free to open an issue or submit a pull request.
294
+
295
+ ## License
296
+
297
+ This project is licensed under the MIT License.
@@ -0,0 +1,261 @@
1
+ <img width="1024" height="250" alt="image" src="https://github.com/user-attachments/assets/8b7b1467-ecba-4b63-9151-137f2d2243ec" />
2
+
3
+ ---
4
+
5
+ ## The Pitch
6
+
7
+ Coral brings sanity to coding with AI agents without disrupting your workflow. The goal is to augment, not take over. Activity across all your agents is visible so you can see which ones need attention at a glance.
8
+
9
+ Stop losing track of what your AI coding agents are doing. As you scale your workflow, the chaos of scattered terminals, lost context, and untracked changes slows you down. Coral is the mission control center you need to effortlessly orchestrate your entire AI workforce. Maintain total visibility over every agent's progress, organize your history, and automate routine tasks so you can focus on building. Stop fighting your tools and start multiplying your productivity—with all your data completely secure and private on your own machine.
10
+
11
+ Coral is an MIT-licensed multi-agent orchestration application built with tmux, FastAPI, and vanilla HTML5/JS for easy extensibility and modification. We welcome feedback and contributions.
12
+
13
+ **[Read the full documentation →](https://cdknorow.github.io/coral/)**
14
+
15
+
16
+ ![main_loop](https://github.com/user-attachments/assets/6af60c92-1d72-45bd-9b46-7f1eab2ce5fe)
17
+
18
+ ## Features
19
+
20
+ - **Multi-agent support** — Launch and manage both Claude and Gemini agents side-by-side across worktrees
21
+ - **Web dashboard** — Real-time monitoring with pane capture, status tracking, and command input
22
+ - **Session history** — Browse past sessions with advanced filters (date range, agent type, tags, full-text search)
23
+ - **Full-text search** — Search across all session content using SQLite FTS5 with porter stemming
24
+ - **Auto-summarization** — Sessions are automatically summarized and indexed for search
25
+ - **Scheduled jobs** — Create cron-scheduled tasks that launch agents in isolated worktrees, send prompts, and clean up automatically
26
+ - **Webhook notifications** — Get notified via webhook when agents need input or complete work
27
+ - **Session notes & activity** — Add markdown notes and track activity that occurred in each session, live and historically
28
+ - **Remote control** — Send commands, navigate modes, and manage agents from the dashboard
29
+ - **Attach/Kill/Restart/Resume** — Open a terminal attached to any agent's tmux session, kill it, or relaunch as a new session
30
+ - **Git integration & PR linking** — Tracks commits, branches, and remote URLs per agent and session
31
+ - **Custom macros** — Add configurable toolbar buttons for frequently used commands
32
+
33
+ ## Installation
34
+
35
+ Install from PyPI:
36
+
37
+ ```bash
38
+ pip install agent-coral
39
+ ```
40
+
41
+ Or install directly from GitHub:
42
+
43
+ ```bash
44
+ pip install git+https://github.com/cdknorow/coral.git
45
+ ```
46
+
47
+ ## Launch agents and web dashboard
48
+
49
+ You can launch the web server directly using `coral` or `coral-dashboard`:
50
+
51
+ ```bash
52
+ # Start the web dashboard directly (default: http://localhost:8420)
53
+ coral
54
+
55
+ # Custom host/port
56
+ coral --host 127.0.0.1 --port 9000
57
+
58
+ ```
59
+
60
+ > **Note:** This system is currently mostly tested with Claude Code and to some extent Gemini CLI. However, the underlying architecture is extensible to any cli based agents.
61
+
62
+ ### Session history search and filtering
63
+
64
+ ![history](https://github.com/user-attachments/assets/3848aefe-e358-425b-ae14-ed2f41704a33)
65
+
66
+
67
+ The sidebar History section includes a search bar and filters for browsing your entire AI coding session history along with activity, notes, and git commit tracking
68
+
69
+ On startup, the server launches three background services:
70
+
71
+ 1. **Session indexer** (every 2 min) — Indexes all Claude sessions from `~/.claude/projects/**/*.jsonl` and Gemini sessions from `~/.gemini/tmp/*/chats/session-*.json`, builds a full-text search index (FTS5), and queues new sessions for auto-summarization
72
+ 2. **Batch summarizer** — Continuously processes the summarization queue using Claude CLI
73
+ 3. **Git poller** (every 2 min) — Polls git branch, commit, and remote URL for each live agent and stores snapshots in SQLite
74
+
75
+ Features:
76
+
77
+ - **Search** — Type in the search bar to find sessions by content (uses SQLite FTS5 with porter stemming)
78
+ - **Filter by tag** — Select a tag from the dropdown to narrow results
79
+ - **Filter by source** — Show only Claude or Gemini sessions
80
+ - **Filter by date** — Narrow results to a specific date range
81
+ - **Pagination** — Browse through all sessions with prev/next controls
82
+ - **URL bookmarking** — Session URLs use hash routing (`#session/<id>`) so you can bookmark or share links
83
+ - **Notes & tags** — Add markdown notes and color-coded tags to any session, stored in `~/.coral/sessions.db`
84
+
85
+
86
+ ### Managing sessions from the dashboard
87
+
88
+ <img width="1502" height="812" alt="image" src="https://github.com/user-attachments/assets/9a8d1b7b-1bef-414b-9002-c27dd928342b" />
89
+
90
+
91
+ The web dashboard provides quick-action buttons for each live session:
92
+
93
+ | Action | Description |
94
+ |---|---|
95
+ | **Esc / Arrow / Enter** | Send navigation keys to the agent |
96
+ | **Plan Mode** | Toggle Claude Code plan mode |
97
+ | **Accept Edits** | Toggle Claude Code auto-accept mode |
98
+ | **Bash Mode** | Send `!` command to enter bash mode |
99
+ | **Base Mode** | Toggle base mode |
100
+ | **/compact / /clear** | Send compress or clear commands (adapts per agent type) |
101
+ | **Reset** | Compress then clear the session |
102
+ | **Attach** | Open a local terminal window attached to the agent's tmux session |
103
+ | **Restart** | Restart the agent in the same tmux pane |
104
+ | **Kill** | Terminate the tmux session and remove it from the dashboard |
105
+
106
+ You can also type arbitrary commands in the input bar and send them to the selected agent.
107
+
108
+
109
+
110
+ ### Scheduled Jobs
111
+
112
+ Coral supports cron-scheduled jobs that automatically launch agents in isolated git worktrees. Create and manage them from the Scheduled section in the sidebar.
113
+
114
+ Each scheduled job:
115
+ - Creates a fresh git worktree from the specified branch
116
+ - Launches an agent (Claude or Gemini) with optional CLI flags
117
+ - Sends the configured prompt to the agent
118
+ - Monitors the session with a configurable timeout
119
+ - Cleans up the worktree on completion (optional)
120
+ - Tags the session as "scheduled" for easy filtering in history
121
+
122
+ Run history is tracked per job with links to view each session's full history.
123
+
124
+ ### Webhook Notifications
125
+
126
+ Configure webhooks from the dashboard settings to receive HTTP notifications when agents need input or when other events occur. Useful for integrating with Slack, Discord, or custom monitoring.
127
+
128
+ ### Claude Code Hooks (settings.json)
129
+
130
+ To fully integrate Claude Code's agentic state and task management into the Coral dashboard, configure the provided `coral-hook` scripts in your Claude Code `settings.json` (usually located at `~/.claude.json` or `~/.claude/settings.json`).
131
+
132
+ If you are already using other configuration options like a custom `statusLine` or other hooks, simply merge these hook definitions into your existing JSON:
133
+
134
+ ```json
135
+ "hooks": {
136
+ "PostToolUse": [
137
+ {
138
+ "matcher": "TaskCreate|TaskUpdate",
139
+ "hooks": [
140
+ {
141
+ "type": "command",
142
+ "command": "coral-hook-task-sync"
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ "matcher": "",
148
+ "hooks": [
149
+ {
150
+ "type": "command",
151
+ "command": "coral-hook-agentic-state"
152
+ }
153
+ ]
154
+ }
155
+ ],
156
+ "Stop": [
157
+ {
158
+ "matcher": "",
159
+ "hooks": [
160
+ {
161
+ "type": "command",
162
+ "command": "coral-hook-agentic-state"
163
+ }
164
+ ]
165
+ }
166
+ ],
167
+ "Notification": [
168
+ {
169
+ "matcher": "",
170
+ "hooks": [
171
+ {
172
+ "type": "command",
173
+ "command": "coral-hook-agentic-state"
174
+ }
175
+ ]
176
+ }
177
+ ]
178
+
179
+ ```
180
+
181
+
182
+
183
+ Or use launcher which discovers worktree subdirectories, creates a agent for each one, and starts launches the dashboard:
184
+
185
+ ```bash
186
+ # Launch Claude agents and web dashboard for worktrees in the current directory
187
+ launch-coral
188
+
189
+ # Launch Gemini agents from a specific path
190
+ launch-coral <path-to-root> gemini
191
+
192
+ ```
193
+
194
+ ### Remote server development (SSH port forwarding)
195
+
196
+ If you're running Coral on a remote server, forward the dashboard port over SSH to access it in your local browser:
197
+
198
+ ```bash
199
+ # Forward remote port 8420 to localhost:8420
200
+ ssh -L 8420:localhost:8420 user@remote-host
201
+
202
+ # If using a custom port
203
+ ssh -L 9000:localhost:9000 user@remote-host
204
+ ```
205
+
206
+ Then open `http://localhost:8420` (or your custom port) in your local browser. You can add this to your `~/.ssh/config` to make it persistent:
207
+
208
+ ```
209
+ Host my-dev-server
210
+ HostName remote-host
211
+ User user
212
+ LocalForward 8420 localhost:8420
213
+ ```
214
+
215
+ ### Manual tmux management
216
+
217
+ ```bash
218
+ # Attach to a specific agent session
219
+ tmux attach -t claude-agent-1
220
+
221
+ # Switch between windows
222
+ Ctrl+b n # next
223
+ Ctrl+b p # previous
224
+
225
+ # Detach from tmux
226
+ Ctrl+b d
227
+ ```
228
+
229
+ ## Agent Protocol
230
+
231
+ Agents emit structured markers using the `||PULSE:<EVENT_TYPE> <payload>||` format. The dashboard parses these from agent output in real time:
232
+
233
+ ```
234
+ ||PULSE:STATUS <Short description of current task>||
235
+ ||PULSE:SUMMARY <One-sentence high-level goal>||
236
+ ||PULSE:CONFIDENCE <1-5> <short reason>||
237
+ ```
238
+
239
+ The protocol is automatically injected via `PROTOCOL.md` when launching agents. See [`src/coral/PROTOCOL.md`](src/coral/PROTOCOL.md) for the full specification.
240
+
241
+
242
+ ## Advanced Information
243
+
244
+ For information on project structure, API endpoints, and the database schema, please see [DEVELOP.md](DEVELOP.md).
245
+
246
+ ## Dependencies
247
+
248
+ - Python 3.8+
249
+ - [FastAPI](https://fastapi.tiangolo.com/) + [Uvicorn](https://www.uvicorn.org/) — Web server
250
+ - [Jinja2](https://jinja.palletsprojects.com/) — HTML templating
251
+ - [aiosqlite](https://github.com/omnilib/aiosqlite) — Async SQLite (WAL mode)
252
+ - tmux — Session management
253
+ - Claude CLI (optional) — Powers auto-summarization
254
+
255
+ ## Contributing
256
+
257
+ We welcome contributions! Whether it's adding support for new AI coding agents natively or improving the web dashboard, please feel free to open an issue or submit a pull request.
258
+
259
+ ## License
260
+
261
+ This project is licensed under the MIT License.
@@ -0,0 +1,77 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agent-coral"
7
+ version = "2.0.0"
8
+ description = "A multi-agent orchestration system for managing AI coding agents (Claude and Gemini) in parallel git worktrees with a real-time web dashboard."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.8"
12
+ dependencies = [
13
+ "fastapi>=0.104.0",
14
+ "uvicorn[standard]>=0.24.0",
15
+ "jinja2>=3.1.0",
16
+ "aiosqlite>=0.19.0",
17
+ "httpx>=0.25.0",
18
+ "python-multipart>=0.0.6",
19
+ ]
20
+ authors = [
21
+ { name = "Chris Knorowski" }
22
+ ]
23
+ keywords = [
24
+ "ai",
25
+ "agents",
26
+ "claude",
27
+ "gemini",
28
+ "orchestration",
29
+ "tmux",
30
+ "multi-agent",
31
+ "coding-agents",
32
+ "dashboard",
33
+ ]
34
+ classifiers = [
35
+ "Development Status :: 4 - Beta",
36
+ "Intended Audience :: Developers",
37
+
38
+ "Programming Language :: Python :: 3",
39
+ "Programming Language :: Python :: 3.8",
40
+ "Programming Language :: Python :: 3.9",
41
+ "Programming Language :: Python :: 3.10",
42
+ "Programming Language :: Python :: 3.11",
43
+ "Programming Language :: Python :: 3.12",
44
+ "Programming Language :: Python :: 3.13",
45
+ "Topic :: Software Development :: Libraries",
46
+ "Topic :: Software Development :: Build Tools",
47
+ ]
48
+
49
+ [project.urls]
50
+ Homepage = "https://github.com/cdknorow/coral"
51
+ Repository = "https://github.com/cdknorow/coral"
52
+ Issues = "https://github.com/cdknorow/coral/issues"
53
+
54
+ [project.optional-dependencies]
55
+ dev = [
56
+ "pytest>=7.0.0",
57
+ "flake8>=6.0.0",
58
+ "black>=23.0.0",
59
+ "build>=1.0.0",
60
+ "twine>=5.0.0",
61
+ ]
62
+
63
+ [project.scripts]
64
+ coral = "coral.web_server:main"
65
+ coral-dashboard = "coral.web_server:main"
66
+ launch-coral = "coral.launch:main"
67
+ coral-hook-task-sync = "coral.hooks.task_state:main"
68
+ coral-hook-agentic-state = "coral.hooks.agentic_state:main"
69
+ # Legacy aliases (migration from corral -> coral)
70
+ corral = "coral.web_server:main"
71
+ launch-corral = "coral.launch:main"
72
+
73
+ [tool.setuptools.package-data]
74
+ coral = ["PROTOCOL.md", "launch_agents.sh", "templates/*.html", "templates/includes/*.html", "templates/includes/views/*.html", "static/*.css", "static/css/*.css", "static/*.js", "static/*.png", "static/*.ico", "bundled_themes/*.json"]
75
+
76
+ [tool.setuptools.packages.find]
77
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+