Docs/Getting Started/Quickstart Guide
Quickstart Guide
Get up and running with AgentCore in under 2 minutes. Learn how to instantiate an Agent, configure safety guardrails, and execute tool calling across multiple providers.
1. Install Package
Install @bablusingh-dev/agentcore into your Node.js or TypeScript project:
terminal
| npm install @bablusingh-dev/agentcore |
| # or |
| pnpm add @bablusingh-dev/agentcore |
2. Set Environment API Keys
Add your LLM provider keys to your environment file (.env):
.env
| OPENAI_API_KEY="sk-proj-..." |
| ANTHROPIC_API_KEY="sk-ant-..." |
| GEMINI_API_KEY="AIzaSy..." |
3. Create Your First Agent
Select execution mode (**Gateway**, **Provider**, **Custom**) or pick models from the dropdown below to generate the starter code:
| 1 | import { generateText } from '@bablusingh-dev/agentcore'; |
| 2 | |
| 3 | const { text } = await generateText({ |
| 4 | model: 'openai/gpt-4o-mini', |
| 5 | prompt: 'Explain architectural patterns.', |
| 6 | }); |
| 7 | |
| 8 | console.log(text); |