Getting Started
ThinkWork deploys entirely into your AWS account. There is no SaaS control plane, no shared infrastructure, and no black-box hosted harness. You own everything, the code runs in your VPC, data lives in your Aurora database, and models run through your Bedrock endpoint.
This guide walks you from zero to a running agent invoke. The point is not just that ThinkWork is powerful. It is that production-grade agent infrastructure can be straightforward to deploy without surrendering ownership of the runtime.
Prerequisites
Section titled “Prerequisites”Before you start, make sure you have:
- AWS account with the ability to create IAM roles, Lambda functions, Aurora clusters, and AppSync APIs
- AWS credentials configured locally (
~/.aws/credentialsor environment variables) - Node.js 20+ — the CLI is distributed via npm
- Terraform 1.6+ — the CLI shells out to
terraformunder the hood - Bedrock model access — enable at least one Claude model (e.g.
anthropic.claude-3-5-sonnet-20241022-v2:0) in your target region
Step 1 — Install the CLI
Section titled “Step 1 — Install the CLI”npm install -g thinkwork-cliConfirm it installed correctly:
thinkwork --version# 1.0.0Step 2 — Login
Section titled “Step 2 — Login”thinkwork login connects the CLI to your AWS account and stores a named environment profile.
thinkwork loginYou’ll be prompted for:
- Environment name — a short label for this deployment (e.g.
dev,prod,acme-staging) - AWS region — where to deploy (e.g.
us-east-1) - AWS profile — which profile from
~/.aws/credentialsto use (ordefault)
Credentials are stored at ~/.thinkwork/environments/<name>.json. You can have multiple environments pointing at different accounts or regions.
# Log in to a second environmentthinkwork login# When prompted, enter a different environment name and accountStep 3 — Initialize a deployment
Section titled “Step 3 — Initialize a deployment”thinkwork init scaffolds a ThinkWork deployment directory with a terraform.tfvars file and a local state configuration.
thinkwork init -s devThis creates a thinkwork/ directory (or uses the current directory if you’re already inside one) with:
thinkwork/├── terraform.tfvars # Your deployment variables├── .terraform.lock.hcl # Provider lock file (committed to git)└── .thinkwork/ # Local CLI metadata └── stage.jsonOpen terraform.tfvars and fill in the required values:
stage = "dev"region = "us-east-1"account_id = "123456789012"db_password = "change-me-before-deploy"
# Optional — defaults showndatabase_engine = "aurora-serverless" # or "rds-postgres"# enable_hindsight = true # optional Hindsight add-on (ECS+ALB)AgentCore managed memory is always on — every agent gets automatic
per-turn retention with zero config. Set enable_hindsight = true to
additionally provision the Hindsight ECS service for semantic +
entity-graph retrieval alongside it.
Step 4 — Deploy
Section titled “Step 4 — Deploy”thinkwork deploy -s devThis command runs terraform init followed by terraform apply inside the ThinkWork module. The first deploy provisions approximately 260 AWS resources across three tiers:
- Foundation — VPC, subnets, Cognito user pool, KMS keys, Route53 records
- Data — Aurora Postgres cluster, S3 buckets, Bedrock Knowledge Base
- App — AppSync API, API Gateway, AgentCore Lambda, Step Functions, SES
A typical first deploy takes 12–18 minutes. Subsequent deploys that don’t touch the database or VPC take 2–4 minutes.
thinkwork deploy -s dev
Initializing Terraform...Planning changes...
+ 264 resources to create
Applying... this will take ~15 minutes on first deploy.
✓ Foundation tier complete (4m 12s)✓ Data tier complete (6m 33s)✓ App tier complete (3m 44s)
Deploy complete. Run `thinkwork outputs -s dev` to see endpoints.Step 5 — Run doctor
Section titled “Step 5 — Run doctor”thinkwork doctor validates your deployment end-to-end. It checks that every major service is reachable and configured correctly.
thinkwork doctor -s devthinkwork doctor -s dev
Checking deployment: dev (us-east-1)
✓ Terraform state readable ✓ Aurora cluster: available ✓ Cognito user pool: active ✓ AppSync API: reachable ✓ API Gateway: reachable ✓ AgentCore Lambda: responding ✓ Bedrock model access: anthropic.claude-3-5-sonnet-20241022-v2:0 ✓ S3 skill bucket: accessible ✓ SES sending: verified
All checks passed.If any check fails, doctor prints the specific error and a remediation hint.
Step 6 — Invoke your first agent
Section titled “Step 6 — Invoke your first agent”Use the GraphQL API to create a thread and send a message. Grab your AppSync endpoint from outputs:
thinkwork outputs -s devAppSync API URL: https://abc123.appsync-api.us-east-1.amazonaws.com/graphqlAPI Gateway URL: https://xyz789.execute-api.us-east-1.amazonaws.comAdmin App URL: https://app.thinkwork.dev.example.comCognito Pool ID: us-east-1_ABC123XYZThen send your first message. You can use the admin web app, a GraphQL client, or the test harness:
# 1. Create a threadcurl -X POST https://xyz789.execute-api.us-east-1.amazonaws.com/graphql \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "mutation CreateThread($input: CreateThreadInput!) { createThread(input: $input) { id prefix status } }", "variables": { "input": { "channel": "CHAT", "title": "My first thread" } } }'
# 2. Send a messagecurl -X POST https://xyz789.execute-api.us-east-1.amazonaws.com/graphql \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "mutation SendMessage($input: SendMessageInput!) { sendMessage(input: $input) { id body role } }", "variables": { "input": { "threadId": "CHAT-0001", "body": "What can you help me with?" } } }'Navigate to your Admin App URL, sign in with your Cognito user, click New Thread, and type your first message. The agent response streams back in real time via AppSync subscription.
What’s next
Section titled “What’s next”- Read Concepts: Threads to understand the universal work container
- Read Concepts: Agents to understand how AgentCore, Bedrock, templates, and skill packs fit together
- Read Concepts: Memory to understand document knowledge, long-term memory, and retrieval context
- Read Concepts: Connectors to see how ThinkWork connects to external channels, events, and MCP-based tool systems
- See Deploy: Greenfield for a detailed walkthrough of what gets created
- See Deploy: BYO Infrastructure if you want to bring your own VPC, database, or Cognito