Skip to developer guide

YOUR WORKFLOW, CONNECTED

Build with Veyl.

Read project context, queue work, save memory and prepare drafts from your own application.

Scoped access. One token belongs to one project. These interfaces cannot fund wallets, trade, alter treasury settings, approve posts or publish.

01Create accessA wallet-owned project, explicit permissions and expiry.
  1. Sign in to your hosted workspace and open an agent’s Developer tab.
  2. Name a token and select only the permissions your integration needs. Read-only is the default.
  3. Save the token once to your secret manager or protected environment. Revoke it from the same tab when it is no longer needed.
Token scopes
ScopePermission
readProject, models, jobs, artifacts, memory and drafts.
jobsSubmit work under the project’s model and spending limits. This can consume funded inference allowance.
memoryAdd project notes.
draftsPrepare X or Telegram drafts for an existing connection. Publication still requires owner approval.

Tokens expire after up to 90 days and are displayed once. Keep them out of browser bundles, URLs, logs, shared screenshots and source control. The server stores a token hash in its encrypted registry, not a recoverable copy.

02JavaScript SDKA small typed client, with no automatic mutation retries.

Requires Node 22 or later. The versioned package is distributed from this site; it is not published to the npm registry.

npm install https://veyl.sh/downloads/veyl-sdk-0.1.0.tgz
import { VeylClient } from '@veyl/sdk';

const veyl = new VeylClient({ token: process.env.VEYL_API_TOKEN });
const { project } = await veyl.project();
const { jobs } = await veyl.jobs();

To explicitly queue a task, first grant jobs and save a stable request key in your application:

const requestKey = crypto.randomUUID();
const { job } = await veyl.submitJob({
  requestKey,
  prompt: 'Summarize our saved project context.'
});
const result = await veyl.job(job.id);

Methods: project(), models(), jobs({requestKey?}), job(id), submitJob({requestKey,prompt}), memory(), saveMemory({requestKey,content}), drafts(), prepareDraft({channel,text,idempotencyKey,madeWithAi?}). Responses keep their named API wrapper, such as {job} or {memory}.

Download package ↗
03Local MCPBring project tools to an MCP-capable desktop host.

The same package includes veyl-mcp. Supply VEYL_API_TOKEN through your host’s protected environment, then run:

npx --package https://veyl.sh/downloads/veyl-sdk-0.1.0.tgz veyl-mcp

This is a local stdio MCP server with a project token. It is not a hosted OAuth MCP endpoint. The host must support local command-based MCP servers. Tools are veyl_project, veyl_models, veyl_jobs, veyl_job, veyl_memory, veyl_drafts, veyl_submit_job, veyl_save_memory and veyl_prepare_draft. They mirror the SDK: project/model/job reads, task submission, memory and draft preparation. Mutation tools require caller-provided request keys and the matching token scope.

Use a read-only token for browsing. Enabling the jobs scope allows the host to request potentially paid work within the project’s existing budget; configure host approvals accordingly. The MCP adapter never receives wallet keys and cannot publish or sign chain transactions.

04HTTP APIJSON, Bearer authorization and one fixed project.

Base: https://veyl.sh/api/developer/v1. Send Authorization: Bearer YOUR_PROJECT_TOKEN; mutation requests also require Content-Type: application/json. The token determines the project, so no project selector is accepted.

Available endpoints
Method & routeBody / result
GET /project · /models{project} / {models}
GET /jobs?requestKey=…{jobs}; optional exact-key lookup.
GET /jobs/:id{job,artifact}; artifact may be null.
POST /jobs{requestKey,prompt} → {job}
GET /memory · POST /memoryRead {memory:[...]}; append {requestKey,content} → {memory:note}.
GET /drafts · POST /draftsRead {drafts}; prepare {channel,text,idempotencyKey,madeWithAi?} → {draft}.

Job and memory request keys use 16 to 80 letters, digits or hyphens; a UUID is recommended. Draft keys use 8 to 128 letters, digits, underscores or hyphens. Prompts and notes allow 8,000 characters. Drafts use x or telegram and the channel’s text limits.

05Failures & uncertaintyInspect first. Never assume a timed-out mutation did nothing.

The SDK performs one request and never retries a mutation automatically. VeylApiError includes status, code, requestId and uncertain. A timeout or server failure can occur after the task was accepted.

const { jobs } = await veyl.jobs({ requestKey });
// Inspect the recorded job before deciding whether to submit again.

The server binds idempotency keys to exact payloads. Reusing the same key and content returns its existing record; changed content is rejected. Keep the original key durable. A lost token-creation response cannot reveal that token again: inspect the owner’s token list and revoke an unexpected entry.

Protocol fixtures and local contract forks test these interfaces. Live paid inference and real-provider social acceptance were deliberately not performed. Funding, model availability, owner policy and service capacity can still prevent a task from running.