systemprompt-agent 0.2.2

Agent-to-Agent (A2A) protocol for systemprompt.io AI governance: streaming, JSON-RPC models, task lifecycle, .well-known discovery, and governed agent orchestration.
Documentation
use serde::{Deserialize, Serialize};
use systemprompt_models::ai::ToolModelOverrides;

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AgentRuntimeInfo {
    pub name: String,
    pub port: u16,
    pub is_enabled: bool,
    pub is_primary: bool,
    pub system_prompt: Option<String>,
    pub mcp_servers: Vec<String>,
    pub provider: Option<String>,
    pub model: Option<String>,
    pub max_output_tokens: Option<u32>,
    #[serde(default)]
    pub skills: Vec<String>,
    #[serde(default)]
    pub tool_model_overrides: ToolModelOverrides,
}

impl From<systemprompt_models::AgentConfig> for AgentRuntimeInfo {
    fn from(config: systemprompt_models::AgentConfig) -> Self {
        Self {
            name: config.name,
            port: config.port,
            is_enabled: config.enabled,
            is_primary: config.is_primary,
            system_prompt: config.metadata.system_prompt,
            mcp_servers: config.metadata.mcp_servers,
            provider: config.metadata.provider,
            model: config.metadata.model,
            max_output_tokens: config.metadata.max_output_tokens,
            skills: config.metadata.skills,
            tool_model_overrides: config.metadata.tool_model_overrides,
        }
    }
}