Build Your Agent from the CLI
Developers who prefer working in a terminal, iterating locally, and managing configuration in version control. If you'd rather use a UI without local tooling, see First Agent (Console).
The fastest code-first path to a running agent. You'll scaffold a project, iterate locally with hot-reload, and deploy with a single command — all from your terminal.
Canonical tutorial
Follow the CLI Python tutorial to scaffold, test, and deploy your first agent:
If your agent codebase is TypeScript:
Quick CLI flow
# Scaffold a project using the interactive wizard
agentcore create
# Run locally with hot-reload
agentcore dev
# Deploy when ready
agentcore deploy
The wizard prompts for your language, framework, model provider, and build method. See the canonical tutorials above for non-interactive options and complete configuration details.
Alternative: Managed Harness path
If you prefer AgentCore to manage the agent loop (model selection, system prompt, tool orchestration) rather than writing your own orchestration code, follow the harness tutorial instead:
The CLI path above gives you full control over the orchestration layer. The harness path trades that control for faster setup — you configure rather than code. Both deploy to AgentCore Runtime with the same security and scaling characteristics.
Why CLI is the fastest code-first path
The CLI gives you a local dev loop with hot-reload, version-controlled declarative configuration, and a single command (agentcore deploy) to move from prototype to deployed endpoint. You own the code, control the dependencies, and can test against a live model locally before deploying.
What happens after deployment
The deployed endpoint uses IAM authorization with SigV4-signed requests by default — it cannot be invoked without valid AWS credentials. For production, follow the Runtime security best practices and scope bedrock-agentcore:InvokeAgentRuntime to specific principals. Consider AWS PrivateLink if you need private API access from your VPC to AgentCore without traversing the public internet. Configure Runtime VPC connectivity and egress controls separately for the agent's outbound traffic.
Next steps
- Prepare your agent for production traffic
- Add memory and identity for a conversational agent
- Explore multi-agent patterns
Everything produced by this tutorial is a prototype until you have applied the controls in Preparing for production. Do not use a prototype endpoint to serve real user traffic.