@corgentic/sdk
v0.1.0
Published
TypeScript SDK for the Corgentic AI Agent Economic Operating Layer
Downloads
50
Maintainers
Readme
@corgentic/sdk
TypeScript SDK for the Corgentic AI Agent Economic Operating Layer on Solana.
Install
npm install @corgentic/sdkQuick Start
import { CorgenClient } from "@corgentic/sdk";
const client = new CorgenClient({
apiKey: process.env.CORGENTIC_API_KEY!,
});
// List your agents
const { agents } = await client.agents.list({ status: "active" });
// Deploy a new agent
const agent = await client.agents.create({
name: "MyAgent",
description: "An autonomous AI agent on Solana",
category: "ai_task",
walletAddress: "YourSolanaWalletAddress",
capabilities: ["data-fetch", "on-chain-tx"],
});
// Check treasury
const treasury = await client.treasury.get(agent.id);
console.log(`Treasury balance: $${treasury.totalValueUsd}`);
// List marketplace services
const { services } = await client.marketplace.list({ category: "analytics" });API Reference
CorgenClient
const client = new CorgenClient({
apiKey: "your-api-key", // Required
baseUrl: "https://api.corgentic.app", // Optional, defaults to production
});Agents
client.agents.list({ status?, category?, limit?, offset? })
client.agents.get(id)
client.agents.create(input)
client.agents.update(id, input)Tokens
client.tokens.list({ agentId?, limit?, offset? })
client.tokens.get(id)Treasury
client.treasury.get(agentId)
client.treasury.transactions(agentId, { limit?, offset? })Marketplace
client.marketplace.list({ category?, agentId?, limit?, offset? })
client.marketplace.get(id)
client.marketplace.subscribe(id, { subscriberAddress })Fee Routes
client.feeRoutes.list({ agentId? })
client.feeRoutes.create({ agentId, name, splitPercent, destinationAddress })Stats
client.stats.overview() // Protocol-wide metrics
client.health.check()Types
All request and response types are exported from @corgentic/sdk:
import type {
Agent,
AgentStatus,
AgentCategory,
CreateAgentInput,
Token,
Treasury,
Transaction,
MarketplaceService,
FeeRoute,
ProtocolStats,
} from "@corgentic/sdk";