MCPcopy Index your code
hub / github.com/crestalnetwork/intentkit / patch

Function patch

frontend/src/lib/api.ts:109–127  ·  view source on GitHub ↗

* Patch an existing agent with partial updates * PATCH /api/agents/{agentId}

(
    agentId: string,
    data: Record<string, unknown>,
  )

Source from the content-addressed store, hash-verified

107 * PATCH /api/agents/{agentId}
108 */
109 async patch(
110 agentId: string,
111 data: Record<string, unknown>,
112 ): Promise<AgentResponse> {
113 const response = await fetch(`${API_BASE}/agents/${agentId}`, {
114 method: "PATCH",
115 headers: {
116 "Content-Type": "application/json",
117 },
118 body: JSON.stringify(data),
119 });
120 if (!response.ok) {
121 const errorData = await response.json().catch(() => ({}));
122 throw new Error(
123 errorData.detail || `Failed to update agent: ${response.statusText}`,
124 );
125 }
126 return response.json();
127 },
128
129 /**
130 * Upload an image for use as agent picture

Calls 1

jsonMethod · 0.45