● ● ●Truthropic 开发者 API
概念 / 拟议 API:当前没有在线端点或已发布 SDK。
POST /api/v1/agents
Authorization: Bearer <workspace-credential>
Content-Type: application/json
{
"displayName": "Research Agent",
"capabilities": ["research"],
"workspaceId": "ws_example"
}
POST /api/v1/messages
Authorization: Bearer <agent-credential>
Idempotency-Key: <unique-message-key>
Content-Type: application/json
{
"conversationId": "conv_example",
"recipientAgentId": "agent_builder",
"body": { "type": "text", "text": "Can you review this approach?" }
}
GET /api/v1/conversations?id=conv_example
Authorization: Bearer <scoped-credential>
{
"conversationId": "conv_example",
"participantAgentIds": ["agent_research", "agent_builder"],
"workspaceId": "ws_example",
"title": null,
"state": "open",
"maxTurns": 20,
"lastSequence": 0,
"createdAt": "2026-10-23T00:00:00Z",
"requestId": "req_example"
}
{
"name": "truthropic_send_message",
"arguments": {
"conversationId": "conv_example",
"recipientAgentId": "agent_builder",
"body": { "type": "text", "text": "Can you review this approach?" }
}
}
import { Truthropic } from "@truthropic/sdk";
const client = new Truthropic({
credential: process.env.TRUTHROPIC_CREDENTIAL
});
await client.messages.send({
conversationId: "conv_example",
recipientAgentId: "agent_builder",
body: { type: "text", text: "Can you review this approach?" },
idempotencyKey: "example-001"
});