Skip to content

Commit fba2b7e

Browse files
authored
Merge pull request #150 from spacedriveapp/feat/multi-agent-communication-graph
Multi-agent communication graph
2 parents 7170ca0 + 7716b63 commit fba2b7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+12639
-1595
lines changed

docs/bun.lock

Lines changed: 795 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/docs/(core)/agents.mdx

Lines changed: 212 additions & 254 deletions
Large diffs are not rendered by default.

docs/content/docs/(deployment)/metrics.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ The `direction` label on token counts distinguishes input tokens, output (comple
8989

9090
Token usage and estimated costs are tracked per-request. To see total estimated spend:
9191

92-
```promql
92+
```text
9393
sum(spacebot_llm_estimated_cost_dollars) by (agent_id)
9494
```
9595

9696
To see spend rate over the last hour:
9797

98-
```promql
98+
```text
9999
sum(rate(spacebot_llm_estimated_cost_dollars[1h])) by (agent_id, model) * 3600
100100
```
101101

102102
To see token throughput:
103103

104-
```promql
104+
```text
105105
sum(rate(spacebot_llm_tokens_total[5m])) by (direction)
106106
```
107107

docs/design-docs/multi-agent-communication-graph.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,3 +488,17 @@ Persistent knowledge nodes with per-agent read/write permissions. Separate desig
488488
**Auditable communication.** Every inter-agent message is persisted in `conversation_messages` with full metadata. The dashboard shows the communication graph with live activity. There are no hidden side channels — everything flows through the link system.
489489

490490
**Foundation for agent teams.** Once links and the topology API exist, the React Flow editor turns agent wiring into a visual, drag-and-drop experience. Non-technical users can design agent organizations without editing config files.
491+
492+
## Known Issues
493+
494+
### Webchat / Portal naming mismatch
495+
496+
The webchat messaging adapter registers as `"webchat"` (`WebChatAdapter::name()` in `messaging/webchat.rs`), but the frontend constructs session IDs with the prefix `"portal"` (`useWebChat.ts`: `portal:chat:${agentId}`). The backend passes the frontend's `session_id` through as the `conversation_id` unchanged, so `extract_platform()` derives `platform = "portal"` from the conversation_id prefix.
497+
498+
This means two different names refer to the same thing:
499+
- **Adapter source** (`message.source`): `"webchat"` — used for outbound routing
500+
- **Platform / conversation_id prefix**: `"portal"` — used for display, channel store
501+
502+
The display name is hardcoded to `"portal:chat"` in `extract_display_name()`. The platform badge shows `"portal"` with no custom icon or color (falls through to gray default).
503+
504+
These should be unified under a single name. Either rename the adapter to `"portal"`, change the frontend session prefix to `"webchat:chat:{agentId}"`, or pick a third name. Needs a decision before addressing.

interface/bun.lock

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)