TypeScript SDK
@joytoken/agent-sdk-ts is a lightweight TypeScript runtime for multi-step agents. It uses @joytoken/client-sdk-ts for model calls and keeps tool execution, state storage, permissions, and human approval in your application.
Install
For monorepo development:
joytoken-sdks
Create a provider
provider.ts
Define tools
tools.ts
Create an agent
agent.ts
Run the agent
run.ts
Agent.run() returns finalText, messages, steps, usage, and optionally stoppedBy.
Persist state
state.ts
JoyToken does not store agent memory. Your application owns thread state, tool results, checkpoints, permissions, and audit records.
Stop conditions
stop.ts
Combine runtime stop conditions with JoyToken API key quota, wallet, and policy controls.
Validate
joytoken-sdks