Amp TypeScript SDK
Today we've launched the Amp TypeScript SDK. It allows you to programmatically use the Amp agent in your TypeScript programs.
Here is a program, for example, that instructs the Amp agent to find and list specific files in a folder using a custom toolbox tool:
const prompt = `
What files use authentication in this directory?
Go through all the files and folders.
Use the format_file_tree tool to format results.
Only output the file tree.
`
const options: AmpOptions =
// execute starts the agent and streams messages
const messages =
await
You only need to install one package to get started:
$ npm install @ampcode/sdk
Since you can invoke Amp in any TypeScript program, there are very few limits to what you can build. Here are some ideas and examples of things we've built internally:
- Code Review Agent: Automated pull request analysis and feedback
- Documentation Generator: Create and maintain project documentation
- Test Automation: Generate and execute test suites
- Migration Assistant: Help upgrade codebases and refactor legacy code
- CI/CD Integration: Smart build and deployment pipelines
- Issue Triage: Automatically categorize and prioritize bug reports
To get more ideas and familiar with the SDK, take a look at the examples in the manual.