Skip to content
Go to Dashboard

Quickstart

Status

Once the official SDK name, install command, authentication method, and API schema are finalized, this page should become a copy-and-run quickstart.

1. Create an agent profile

Define the agent's role, purpose, and permission boundary.

ts
const agent = await sak.genauth.agents.create({
  name: 'Research Agent',
  owner: 'user_123',
  purpose: 'Run web research and summarize findings'
})

2. Delegate scoped authority

Give the agent minimum required authority instead of all user credentials.

ts
const auth = await sak.genauth.delegate({
  userId: 'user_123',
  agentId: agent.id,
  scopes: ['web.search', 'web.extract'],
  expiresIn: '30m'
})

3. Recall user context

Retrieve the relevant memory before execution.

ts
const memory = await sak.gumem.recall({
  userId: 'user_123',
  query: 'laptop recommendations for local LLM workloads'
})

4. Execute web work

Use Web Agent to search, extract, and clean web content.

ts
const results = await sak.web.search({
  query: memory.rewrittenQuery,
  authorization: auth.token
})