Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.svantic.com/llms.txt

Use this file to discover all available pages before exploring further.

Types

Canonical listing of the configuration and value types exported from @svantic/sdk. Individual class pages link back here for option details.

AgentConfig

Passed to new Agent(...). See Agent for methods.
FieldTypePurpose
namestringDisplay name in the agent card.
descriptionstringWhat the agent does. Shown to callers and LLMs.
public_url?stringPublic HTTPS URL. Set this only for hosted-mode agents.
port?numberPort for agent.start() in hosted mode. Ignored in connected mode and for expose(app).
mesh?{ svantic_url?, client_id?, client_secret?, token? }Svantic platform config. Omit to skip registration. svantic_url defaults to https://api.svantic.com.
instructions?stringSystem prompt for smart agent mode.
llm?LlmConfigLLM for smart agent mode.
version?stringAdvertised version. Default '1.0.0'.
agent_type?stringLogical type for mesh routing. Defaults to name.
instance_id?stringUnique per-process id. Auto-generated from hostname + port/pid if omitted.
context?Record<string, unknown>Live metadata surfaced on the card.
learning?LearningConfigControls platform learner behavior for this agent.

CapabilityConfig

Passed to agent.define_capability(...).
FieldTypePurpose
namestringUnique, snake_case.
descriptionstringShown to LLMs and remote callers. Invest here.
parametersCapabilitySchemaJSON Schema for the handler’s arguments.
tags?string[]Free-form labels shown on the agent card.
handler(args, context) => Promise<unknown>Async function that runs when the capability is invoked.

CapabilitySchema

JSON Schema subset used for capability parameters.
interface CapabilitySchema {
  type: 'object';
  properties: Record<string, SchemaProperty>;
  required?: string[];
}

interface SchemaProperty {
  type: 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object';
  description?: string;
  enum?: string[];
  default?: unknown;
  items?: SchemaProperty;
  properties?: Record<string, SchemaProperty>;
  required?: string[];
}

CapabilitySessionContext

Second argument to every capability handler.
FieldTypeDescription
session_idstringSvantic session id the invocation belongs to.
tenant_idstringTenant that owns the session.
propagation_headers?Record<string, string>Raw W3C headers (traceparent, baggage). Forward to downstream HTTP services.
parent_trace_id?string32-hex trace id parsed from traceparent.
parent_span_id?string16-hex span id parsed from traceparent.
baggage?Record<string, string>Parsed baggage. Empty when absent.

LlmConfig

FieldTypeDescription
provider'gemini' | 'openai' | 'anthropic'LLM provider.
model?stringProvider-specific model name. Sensible defaults per provider.
api_key?stringAPI key. Falls back to GOOGLE_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY.
temperature?numberSampling temperature.
max_tokens?numberResponse cap.

MeshConnectorConfig

Passed to new MeshConnector(agent, config). Same fields appear on AttachConfig.mesh and (partially) on AgentConfig.mesh.
FieldTypeDefaultPurpose
svantic_url?stringhttps://api.svantic.comSvantic platform URL.
client_id? / client_secret?stringCredentials for the OAuth2 client_credentials grant.
token?stringPre-issued JWT (skips credential exchange).
retries?number3Registration retry attempts.
retry_delay_ms?number2000Delay between retries.
session_count_provider?() => numberReports active-session count on heartbeat.
deployment_mode?'connected' | 'hosted'connectedTransport mode.
dispatch_auth?DispatchAuthConfigTurns on dispatch-auth envelopes. See Dispatch auth.

LearningConfig

Platform learner configuration, re-exported from @svantic/shared. Use it to opt this agent into (or out of) automated knowledge capture. Fields include enabled, scope, and capture filters; see the Knowledge Store concept page for semantics.

ExecutionContext

Structured execution context forwarded to the learner. Re-exported from @svantic/shared. Set via MessageBuilder.with_execution_context().

FilePayload

File attachment carried in a message DataPart.
FieldTypeDescription
namestringFilename shown to the agent.
mime_typestringIANA media type.
sizenumberBytes.
file_id?stringPreferred. Id returned by the platform file-upload endpoint. The mesh resolves it to LLM-native format at call time.
content? / data? / file_uri? / artifact_ref?stringDeprecated. Inline-content alternatives, kept for compatibility.

AgentStatus / AgentStatusValue

enum AgentStatus {
  AVAILABLE = 'available',
  BUSY      = 'busy',
  DRAINING  = 'draining',
  OFFLINE   = 'offline',
  UNHEALTHY = 'unhealthy',
  UNKNOWN   = 'unknown',
}
AgentStatusValue is the string-literal union ('available' | 'busy' | …). AGENT_STATUS_VALUES is the runtime array, handy for Zod enums.

Response types

Shapes returned by related platform APIs — re-exported so TypeScript consumers don’t have to re-declare them. See the API Reference for the REST contracts.
TypeEndpoint
McpRegistrationResponsePOST /config/add_mcp_default
McpListResponsePOST /config/get_mcp_defaults
McpRemoveResponsePOST /config/remove_mcp_default
GeminiFileResponsePOST /files/upload
SessionSummaryPOST /sessions/list
SessionHistory (SessionTurn)POST /sessions/get
ApprovalListResponsePOST /guard/get_approvals

A2A re-exports

The SDK re-exports A2A primitive types from @a2a-js/sdk so you don’t import them twice: AgentCard, AgentSkill, Message, Task, TaskState, TextPart, DataPart, FilePart, Part, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, and the A2AStreamEventData union used by streaming APIs.