systemprompt_models/services/external_agent.rs
1//! External-agent ("super-agent") catalog config.
2//!
3//! External agents are native apps and CLI tools that run **off** our
4//! infrastructure (Claude Desktop, Codex CLI, Claude Code) and connect to the
5//! gateway via the systemprompt-bridge binary
6//! (`systemprompt-core/bin/bridge`). They are intentionally distinct from
7//! [`AgentConfig`](super::AgentConfig), which describes server-side A2A agents
8//! we run.
9//!
10//! The bridge owns its own static `HostApp` registry; this gateway-side YAML
11//! is the catalog the admin UI lists and the operator's `enabled` flag.
12//! The `id` field MUST equal the bridge's `HostApp::id()` for the same host
13//! (e.g. `claude_desktop`, `codex_cli`).
14//!
15//! Copyright (c) systemprompt.io — Business Source License 1.1.
16//! See <https://systemprompt.io> for licensing details.
17
18use serde::{Deserialize, Serialize};
19use systemprompt_identifiers::ExternalAgentId;
20
21#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
22#[serde(rename_all = "snake_case")]
23pub enum ExternalAgentKind {
24 DesktopApp,
25 CliTool,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(deny_unknown_fields)]
30pub struct ExternalAgentConfig {
31 pub id: ExternalAgentId,
32 pub display_name: String,
33 pub kind: ExternalAgentKind,
34 pub enabled: bool,
35 #[serde(default)]
36 pub description: String,
37 #[serde(default)]
38 pub platforms: Vec<String>,
39 #[serde(default)]
40 pub docs_url: Option<String>,
41}