pub struct AgentsResource<'c> { /* private fields */ }Implementations§
Source§impl AgentsResource<'_>
impl AgentsResource<'_>
Sourcepub async fn list(&self) -> Result<Vec<Value>, PulseError>
pub async fn list(&self) -> Result<Vec<Value>, PulseError>
GET /api/pulse/agents — every deployed agent in the current org.
Sourcepub async fn get(&self, agent_id: &str) -> Result<Value, PulseError>
pub async fn get(&self, agent_id: &str) -> Result<Value, PulseError>
GET /api/pulse/agents/{id} — one agent by id.
Sourcepub async fn update(
&self,
agent_id: &str,
config: &Value,
) -> Result<Value, PulseError>
pub async fn update( &self, agent_id: &str, config: &Value, ) -> Result<Value, PulseError>
B-115 Phase 1 — PUT /api/pulse/agents/{id}: replace the agent’s config.
config is the FULL agent config (not a partial merge) — at minimum
name. Optional fields (engineType, inputTopic, outputTopic,
description, instances, monthlyBudget, config) fall back to safe
defaults when omitted. See the UpdateAgentRequest schema in
openapi.yaml.
Today this triggers a full stop + persist + start cycle on the engine side — the agent is briefly unavailable while the swap happens. Existing state in the agent’s keyed store is preserved. Phase 2 (B-115-engine) will add atomic event-boundary swap so hot-reloadable changes apply with no downtime.
Returns the post-update agent snapshot (same shape as get).
§Errors
PulseError::Validationon a bad config (self-loop, invalid streaming operators)PulseError::NotFoundif the agent doesn’t exist