Skip to content

Latest commit

 

History

History

agent

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Agent

Give a model a tool and let it decide when to call it.

Level: LLM · Concept: Agents · Needs: a model API key (DEEPSEEK_API_KEY as written; any provider works)

flowchart LR
  Q([question]) --> A[Agent]
  A -- tool call --> T[multiply]
  T -- result --> A
  A --> R([answer])
Loading

What it shows

  • The agent loops: ask the model, run requested tools, send results back.
  • maxIterations bounds the loop. output.toolCalls records every call.

Run

# Once, from the repository root
pnpm install && pnpm build

export DEEPSEEK_API_KEY=sk-...
pnpm --filter @astack-examples/agent start

The full program is index.ts.

Next: Custom model