Skip to content

Çalışma Alanı Yapay Zeka Kaynakları ​

Aracılar, ikizler, araçlar, beceriler ve ikiz ilkeler de dahil olmak üzere ekip işbirliği için belirli bir çalışma alanına yönelik yapay zeka kaynaklarını yönetin.

Çalışma Alanı Temsilcileri ​

Ekip işbirliği için belirli bir çalışma alanını kapsamına alan aracıları yönetin.

Uç noktalar ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/agentsList workspace agentsJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/agentsCreate a workspace agentJWT + Entitlement10/min
GET/workspaces/:workspaceId/ai/agents/:agentId/runsList agent runsJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/agents/:agentId/runsCreate an agent runJWT + Entitlement10/min

Çalışma Alanı Aracısı Oluştur ​

Tanım ​

Verilen çalışma alanına uygun yeni bir aracı oluşturur. Model seçimi bu uç nokta aracılığıyla yapılandırılamaz; her çalışma alanı aracısı, platformun varsayılan modelini kullanır. Belirli bir "modelId" seçmeniz gerekiyorsa bunun yerine, çalışma alanına bağlı aracı örnekleri yerine yeniden kullanılabilir aracı şablonlarını temsil eden ayrı Aracı Tanımları kaynağını kullanın.

Rica etmek ​

FieldTypeRequiredDescription
namestringYesAgent display name
descriptionstringNoHuman-readable description of the agent's purpose
systemPromptstringNoSystem prompt that shapes the agent's behavior
toolIdsstring[]NoIDs of workspace tools the agent is allowed to call

Bu uç noktada "definitionId", "config", "modelId" veya "instructions" alanı yok. Bu dönüşlerden herhangi birinin gönderilmesi "400 Hatalı İstek" döndürür (örneğin, "özellik talimatları olmamalıdır; özellik modelId olmamalıdır").

Cevap ​

json
{
  "data": {
    "id": "cm5wagent01",
    "workspaceId": "$WORKSPACE_ID",
    "name": "Team Productivity Coach",
    "description": "Reviews team chain activity and suggests focus areas",
    "systemPrompt": "You are a productivity coach for a team workspace...",
    "toolIds": ["cm5wtool01"],
    "status": "active",
    "createdAt": "2026-03-17T10:00:00.000Z"
  }
}

Kod Örnekleri ​

bash
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/agents \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Team Productivity Coach",
    "description": "Reviews team chain activity and suggests focus areas",
    "systemPrompt": "You are a productivity coach for a team workspace...",
    "toolIds": ["cm5wtool01"]
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID; // from a workspace lookup call

const response = await fetch(`${BASE_URL}/workspaces/${workspaceId}/ai/agents`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Team Productivity Coach",
    description: "Reviews team chain activity and suggests focus areas",
    systemPrompt: "You are a productivity coach for a team workspace...",
    toolIds: ["cm5wtool01"],
  }),
});
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]  # from a workspace lookup call
response = requests.post(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/agents",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={
        "name": "Team Productivity Coach",
        "description": "Reviews team chain activity and suggests focus areas",
        "systemPrompt": "You are a productivity coach for a team workspace...",
        "toolIds": ["cm5wtool01"],
    },
)
data = response.json()["data"]

Workspace Agent'ı Çalıştır ​

Abonelik gereklidir. POST /workspaces/:workspaceId/ai/agents/:agentId/runs aktif bir ücretli abonelik gerektirir. Geçerli bir aboneliği olmayan arayanlar, { "code": "subscription_inactive" } ile 403 Yasak mesajı alırlar. Kredi bakiyesi tek başına yeterli değildir; aktif bir planın da mevcut olması gerekir.

`agentId', Create Workspace Agent yanıtından gelmelidir. 'agentId' yol segmenti, yukarıdaki Create Workspace Agent öğesinden 'data.id'de döndürülen gerçek 'id' alanı olmalıdır; asla ayarlanmamış, boş veya sabit kodlanmış bir yer tutucu değişken değildir. Boş veya hatalı biçimlendirilmiş bir "agentId" daha önce opak bir "500 Dahili Sunucu Hatası" döndürüyordu; artık doğru bir şekilde '400 Hatalı İstek' döndürüyor.

Tanım ​

Mevcut bir çalışma alanı aracısı için bir çalıştırma başlatır.

Rica etmek ​

FieldTypeRequiredDescription
inputobjectYesFreeform task input passed to the agent

Yol parametreleri

ParamDescription
workspaceIdFrom your workspace lookup or creation response's data.id
agentIdFrom Create Workspace Agent's data.id

Cevap ​

json
{
  "data": {
    "id": "cm5wrun01",
    "agentId": "$AGENT_ID",
    "workspaceId": "$WORKSPACE_ID",
    "status": "running",
    "input": {
      "task": "Analyze team productivity patterns for the past week",
      "scope": "all-members"
    },
    "startedAt": "2026-03-17T10:00:00.000Z",
    "createdAt": "2026-03-17T10:00:00.000Z"
  }
}

Müdahale vakaları

StatusCondition
201 CreatedRun started successfully
400 Bad RequestMalformed or empty agentId path segment
403 ForbiddenNo active paid subscription (subscription_inactive)

Kod Örnekleri ​

bash
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/agents/$AGENT_ID/runs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "task": "Analyze team productivity patterns for the past week",
      "scope": "all-members"
    }
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID; // from a workspace lookup call
const agentId = createdAgent.data.id; // from Create Workspace Agent's response

const response = await fetch(
  `${BASE_URL}/workspaces/${workspaceId}/ai/agents/${agentId}/runs`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${TOKEN}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      input: {
        task: "Analyze team productivity patterns for the past week",
        scope: "all-members",
      },
    }),
  }
);
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]  # from a workspace lookup call
agent_id = created_agent["data"]["id"]  # from Create Workspace Agent's response
response = requests.post(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/agents/{agent_id}/runs",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={"input": {"task": "Analyze team productivity patterns for the past week", "scope": "all-members"}},
)
data = response.json()["data"]

Tek Çalıştırma Alın ​

Çalışma alanı aracısı çalıştırmalarının yuvalanmış bir liste kaynağı vardır, ancak yuvalanmış tekil çalıştırma kaynağı yoktur. Bir çalıştırmayı kimliğine göre getirmek için AI Özellikleri bölümündeki üst düzey uç noktayı kullanın:

GET /ai/runs/{runId}

Çalışma Alanı Aracısını Çalıştır yanıtındaki (data.id) id alanını $RUN_ID olarak kullanın:


Çalışma Alanı İkizleri ​

Ekip düzeyindeki yapay zeka kişilikleri için çalışma alanı kapsamlı dijital ikizler.

Uç noktalar ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/twinsList workspace twinsJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/twins/:twinId/testTest twin interactionJWT + Entitlement20/min

Çalışma Alanı Twin'lerini Listeleyin ​

Rica etmek ​

Çalışma alanının "kimliğini" "$WORKSPACE_ID" olarak kullanın.

Cevap ​

json
{
  "data": [
    {
      "id": "YOUR_TWIN_ID",
      "workspaceId": "YOUR_WORKSPACE_ID"
    }
  ]
}

Kod Örnekleri ​

javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID;

const response = await fetch(`${BASE_URL}/workspaces/${workspaceId}/ai/twins`, {
  headers: { Authorization: `Bearer ${TOKEN}` },
});
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]
response = requests.get(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/twins",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

İkiz Etkileşimini Test Edin ​

Rica etmek ​

Çalışma Alanı Twin'lerini Listeleyin yanıtındaki bir id değerini $TWIN_ID olarak kullanın.

Cevap ​

json
{
  "data": {
    "twinId": "YOUR_TWIN_ID",
    "prompt": "Ekibin dünkü ilerlemesini özetle",
    "output": "Twin Team Standup would answer in persona mode.",
    "persona": {}
  }
}

Kod Örnekleri ​

bash
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/twins/$TWIN_ID/test \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Ekibin dünkü ilerlemesini özetle"
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID;
const twinId = process.env.TWIN_ID; // from List Workspace Twins

const response = await fetch(
  `${BASE_URL}/workspaces/${workspaceId}/ai/twins/${twinId}/test`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${TOKEN}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ prompt: "Ekibin dünkü ilerlemesini özetle" }),
  }
);
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]
twin_id = os.environ["TWIN_ID"]  # from List Workspace Twins
response = requests.post(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/twins/{twin_id}/test",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={"prompt": "Ekibin dünkü ilerlemesini özetle"},
)
data = response.json()["data"]

Çalışma Alanı Araçları ​

Bir çalışma alanındaki tüm temsilcilerin kullanabileceği araçları kaydedin.

Uç noktalar ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/toolsList workspace toolsJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/toolsCreate a workspace toolJWT + Entitlement10/min

Webhook Aracı Güvenlik Politikası ​

executionType: "http_webhook" içeren araçlar, giden istek güvenliğinin uygulanmasına tabidir:

  • Yalnızca HTTPS — "webhookUrl", "https:" şemasını kullanmalıdır. HTTP, dosya ve diğer şemalar yürütme sırasında reddedilir.
  • Özel adres yok — Geri döngü istekleri ('127.x.x.x'), RFC 1918 aralıkları ('10.x', '172.16–31.x', '192.168.x'), yerel bağlantı/bulut meta verileri ('169.254.x.x') ve benzer ayrılmış aralıklar engellenir.
  • Başlık kısıtlamaları — "tool_schema.headers"da sağlanan şu başlıklar giden istekten önce çıkarılır: "Yetkilendirme", "Çerez", "Host", "X-Forwarded-For", "X-Forwarded-Host", "X-Forwarded-Proto", "X-Real-IP" ve dahili hizmet başlıkları.

İhlaller, bir hata mesajıyla birlikte başarısız bir araç adımıyla sonuçlanır; arayan kişiye HTTP hataları olarak gösterilmez.

Çalışma Alanı Araçlarını Listeleme ​

Rica etmek ​

Çalışma alanının "kimliğini" "$WORKSPACE_ID" olarak kullanın.

Cevap ​

json
{
  "data": [
    {
      "id": "cm5wtool01",
      "name": "Slack Notifier",
      "type": "webhook",
      "createdAt": "2026-03-17T10:00:00.000Z"
    }
  ],
  "meta": { "total": 1 }
}

Kod Örnekleri ​

bash
curl https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/tools \
  -H "Authorization: Bearer $TOKEN"
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID;

const response = await fetch(`${BASE_URL}/workspaces/${workspaceId}/ai/tools`, {
  headers: { Authorization: `Bearer ${TOKEN}` },
});
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]
response = requests.get(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/tools",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
)
data = response.json()["data"]

Çalışma Alanı Becerileri ​

Temsilcilerin çağırabileceği yeniden kullanılabilir beceri modüllerini yönetin. Becerilerin sürüm sürümleri var.

Uç noktalar ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/skillsList skillsJWT + Entitlement60/min
GET/workspaces/:workspaceId/ai/skills/:idGet a skillJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/skillsCreate a skillJWT + Entitlement10/min
PATCH/workspaces/:workspaceId/ai/skills/:idUpdate a skillJWT + Entitlement30/min
DELETE/workspaces/:workspaceId/ai/skills/:idDelete a skillJWT + Entitlement10/min

Beceri Sürümleri ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/skills/:skillId/versionsList versionsJWT + Entitlement60/min
GET/workspaces/:workspaceId/ai/skills/:skillId/versions/:versionIdGet a versionJWT + Entitlement60/min
POST/workspaces/:workspaceId/ai/skills/:skillId/versionsCreate a versionJWT + Entitlement10/min
POST/workspaces/:workspaceId/ai/skills/:skillId/versions/:versionId/publishPublish a versionJWT + Entitlement10/min

Sahiplik uygulandı. GET .../versions/:versionId, sürümü döndürmeden önce :skillIdnin hesabınıza ait olduğunu doğrular. Mevcut olan ancak farklı bir beceriye veya hesaba ait olan bir "versionId" girildiğinde "404 Bulunamadı" değeri döndürülür.

Beceri Oluştur ​

Rica etmek ​

Çalışma alanının "kimliğini" "$WORKSPACE_ID" olarak kullanın.

Cevap ​

json
{
  "data": {
    "id": "cm5skill01",
    "workspaceId": "cm5ws01",
    "name": "completion history Analysis",
    "description": "Analyze chain completion history patterns and provide insights",
    "createdAt": "2026-03-17T10:00:00.000Z"
  }
}

Kod Örnekleri ​

bash
curl -X POST https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/skills \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "completion history Analysis",
    "description": "Analyze chain completion history patterns and provide insights",
    "inputSchema": {
      "chainId": { "type": "string", "required": true }
    }
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID;

const response = await fetch(`${BASE_URL}/workspaces/${workspaceId}/ai/skills`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "completion history Analysis",
    description: "Analyze chain completion history patterns and provide insights",
    inputSchema: { chainId: { type: "string", required: true } },
  }),
});
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]
response = requests.post(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/skills",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={
        "name": "completion history Analysis",
        "description": "Analyze chain completion history patterns and provide insights",
        "inputSchema": {"chainId": {"type": "string", "required": True}},
    },
)
data = response.json()["data"]

Workspace İkiz Politikaları ​

Bir çalışma alanındaki tüm ikizler için davranış ilkelerini yapılandırın.

Uç noktalar ​

MethodPathDescriptionAuthRate Limit
GET/workspaces/:workspaceId/ai/twin-policiesGet twin policiesJWT + Entitlement60/min
PUT/workspaces/:workspaceId/ai/twin-policiesUpsert twin policiesJWT + Entitlement10/min
DELETE/workspaces/:workspaceId/ai/twin-policiesRemove twin policiesJWT + Entitlement10/min

Upsert İkiz Politikalar ​

Rica etmek ​

Çalışma alanının "kimliğini" "$WORKSPACE_ID" olarak kullanın.

Cevap ​

json
{
  "data": {
    "workspaceId": "cm5ws01",
    "maxMemoryEntries": 100,
    "allowedActions": ["notification", "suggest", "analyze"],
    "restrictedTopics": [],
    "dataRetentionDays": 90,
    "updatedAt": "2026-03-17T10:00:00.000Z"
  }
}

Kod Örnekleri ​

bash
curl -X PUT https://api.chainabit.com/api/v1/workspaces/$WORKSPACE_ID/ai/twin-policies \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "maxMemoryEntries": 100,
    "allowedActions": ["notification", "suggest", "analyze"],
    "restrictedTopics": [],
    "dataRetentionDays": 90
  }'
javascript
const BASE_URL = process.env.BASE_URL;
const TOKEN = process.env.TOKEN;
const workspaceId = process.env.WORKSPACE_ID;

const response = await fetch(`${BASE_URL}/workspaces/${workspaceId}/ai/twin-policies`, {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    maxMemoryEntries: 100,
    allowedActions: ["notification", "suggest", "analyze"],
    restrictedTopics: [],
    dataRetentionDays: 90,
  }),
});
const { data } = await response.json();
python
import requests, os

workspace_id = os.environ["WORKSPACE_ID"]
response = requests.put(
    f"{os.environ['BASE_URL']}/workspaces/{workspace_id}/ai/twin-policies",
    headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
    json={
        "maxMemoryEntries": 100,
        "allowedActions": ["notification", "suggest", "analyze"],
        "restrictedTopics": [],
        "dataRetentionDays": 90,
    },
)
data = response.json()["data"]

Built with purpose.