sdk-typescript AGENTS.md

sdk-typescript AGENTS.md is an instructions file for Codex, OpenCode from strands-agents/sdk-typescript. It costs 10,611 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for the Strands TypeScript SDK, a software development kit for building agents in TypeScript. They explain the code layout, development workflow, coding patterns, and tests; an npm workspace monorepo is one repository containing multiple related packages.

In plain words
What is it for?
Navigating the SDK, developing agent features, running checks, and working with its shared npm workspace structure.
Why use it?
They give an agent the project context needed to change the right files and follow the repository’s build, test, and style practices.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/strands-agents/sdk-typescript/agents-md
Clone the repo
git clone --depth 1 https://github.com/strands-agents/sdk-typescript

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sdk-typescript AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/strands-agents/sdk-typescript/agents-md.svg)](https://agentmods.dev/instructions/strands-agents/sdk-typescript/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/strands-agents/sdk-typescript/agents-md"><img src="https://agentmods.dev/badge/instructions/strands-agents/sdk-typescript/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 10,611 This file is loaded in full into every session.
When invoked 10,611 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.10611 $0.10611
Opus 5 $0.05306 $0.05306
Sonnet 5 $0.02122 $0.02122
Haiku 4.5 $0.01061 $0.01061

Measured 3d ago against content hash aeaccd12c5dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sdk-typescript AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 1,079 lines

How it starts

The opening of the file, as written. The whole thing — 1,079 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Development Guide - Strands TypeScript SDK

This document provides guidance specifically for AI agents working on the Strands TypeScript SDK codebase. For human contributor guidelines, see CONTRIBUTING.md.

Purpose and Scope

AGENTS.md contains agent-specific repository information including:

  • Directory structure with summaries of what is included in each directory
  • Development workflow instructions for agents to follow when developing features
  • Coding patterns and testing patterns to follow when writing code
  • Style guidelines, organizational patterns, and best practices

For human contributors: See CONTRIBUTING.md for setup, testing, and contribution guidelines.

Directory Structure

The repo is an npm workspace monorepo. The root package.json delegates all build/test/lint commands to the strands-ts workspace package.

sdk-typescript/
├── strands-ts/                   # SDK workspace package
│   ├── src/                      # All production code
│   │   ├── __fixtures__/         # Shared test fixtures (mocks, helpers)
│   │   ├── __tests__/            # Unit tests for root-level source files
│   │   │
│   │   ├── a2a/                  # Agent-to-agent protocol
│   │   │   ├── __tests__/
│   │   │   ├── a2a-agent.ts      # A2A agent client
│   │   │   ├── adapters.ts       # Strands/A2A type converters
│   │   │   ├── events.ts         # A2A streaming events
│   │   │   ├── executor.ts       # A2A executor
│   │   │   ├── express-server.ts # Express-based A2A server
│   │   │   ├── logging.ts        # A2A-specific logging
│   │   │   ├── server.ts         # A2A server base
│   │   │   └── index.ts
│   │   │
│   │   ├── agent/                # Agent loop and streaming
│   │   │   ├── __tests__/
│   │   │   ├── agent.ts          # Core agent implementation
│   │   │   ├── agent-as-tool.ts  # Wrap agent as a tool
│   │   │   ├── printer.ts        # Agent output printing
│   │   │   ├── snapshot.ts       # Agent state snapshots
│   │   │   └── tool-caller.ts     # Direct tool calling via agent.tool accessor
│   │   │
│   │   ├── conversation-manager/ # Conversation history strategies
│   │   │   ├── __tests__/
│   │   │   ├── conversation-manager.ts
│   │   │   ├── null-conversation-manager.ts
│   │   │   ├── sliding-window-conversation-manager.ts
│   │   │   ├── summarizing-conversation-manager.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── hooks/                # Hooks system for extensibility
│   │   │   ├── __tests__/
│   │   │   ├── events.ts
│   │   │   ├── registry.ts
│   │   │   ├── types.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── logging/              # Structured logging
│   │   │   ├── __tests__/
│   │   │   ├── logger.ts
│   │   │   ├── warn-once.ts      # Dedupe warnings by message content
│   │   │   ├── types.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── models/               # Model provider implementations
│   │   │   ├── __tests__/
│   │   │   ├── google/           # Google Gemini provider
│   │   │   │   ├── adapters.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── model.ts
│   │   │   │   ├── types.ts
│   │   │   │   └── index.ts
│   │   │   ├── openai/           # OpenAI provider (Chat Completions + Responses API)
│   │   │   │   ├── __tests__/    # Unit tests (chat.test.ts, responses.test.ts)
│   │   │   │   ├── chat-adapter.ts
│   │   │   │   ├── responses-adapter.ts
│   │   │   │   ├── formatting.ts
│   │   │   │   ├── errors.ts
│   │   │   │   ├── model.ts
│   │   │   │   ├── types.ts
│   │   │   │   └── index.ts
│   │   │   ├── anthropic.ts      # Anthropic Claude
│   │   │   ├── bedrock.ts        # AWS Bedrock
│   │   │   ├── vercel.ts         # Vercel AI SDK
│   │   │   ├── defaults.ts       # Centralized model defaults + warning messages
│   │   │   ├── model.ts          # Base model interface
│   │   │   └── streaming.ts      # Streaming event types
│   │   │
│   │   ├── multiagent/           # Multi-agent orchestration
│   │   │   ├── __tests__/
│   │   │   ├── graph.ts          # Graph orchestrator (DAG)
│   │   │   ├── swarm.ts          # Swarm orchestrator (handoff)
│   │   │   ├── multiagent.ts     # Base multi-agent class
│   │   │   ├── nodes.ts          # Node types
│   │   │   ├── state.ts          # State management
│   │   │   ├── events.ts         # Streaming events
│   │   │   ├── edge.ts           # Edge definitions
│   │   │   ├── queue.ts          # Execution queue
│   │   │   ├── snapshot.ts       # Multi-agent snapshots
│   │   │   ├── plugins.ts        # Multi-agent plugins
│   │   │   └── index.ts
│   │   │
│   │   ├── interventions/         # Intervention system for authorization, guardrails, steering
│   │   │   ├── __tests__/
│   │   │   ├── actions.ts
│   │   │   ├── handler.ts
│   │   │   ├── registry.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── plugins/              # Plugin system
│   │   │   ├── __tests__/
│   │   │   ├── plugin.ts
│   │   │   ├── registry.ts
│   │   │   ├── model-plugin.ts   # Clears agent messages after invocation when model is stateful
│   │   │   └── index.ts
│   │   │
│   │   ├── registry/             # Tool registry
│   │   │   ├── __tests__/
│   │   │   └── tool-registry.ts
│   │   │
│   │   ├── retry/                # Retry strategies for model calls
│   │   │   ├── __tests__/
│   │   │   ├── backoff-strategy.ts
│   │   │   ├── model-retry-strategy.ts         # Abstract ModelRetryStrategy base class
│   │   │   ├── default-model-retry-strategy.ts
│   │   │   ├── retry-strategy.ts               # RetryStrategy union type + dedup helper
│   │   │   └── index.ts
│   │   │
│   │   ├── sandbox/              # Sandbox abstraction for agent code execution
│   │   │   ├── __tests__/
│   │   │   ├── base.ts           # Abstract Sandbox class
│   │   │   ├── posix-shell.ts    # PosixShellSandbox with shell-based defaults
│   │   │   ├── docker.ts         # DockerSandbox — runs commands in a Docker container
│   │   │   ├── ssh.ts            # SshSandbox — runs commands on a remote host via SSH
│   │   │   ├── stream-process.ts # Process spawn + AsyncGenerator stream bridge
│   │   │   ├── constants.ts      # Language validation pattern
│   │   │   └── types.ts          # ExecutionResult, StreamChunk, FileInfo, OutputFile
│   │   │
│   │   ├── session/              # Session management
│   │   │   ├── __tests__/
│   │   │   ├── session-manager.ts
│   │   │   ├── storage.ts        # Storage interface
│   │   │   ├── file-storage.ts   # File-based storage
│   │   │   ├── s3-storage.ts     # S3 storage
│   │   │   ├── types.ts
│   │   │   ├── validation.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── telemetry/            # OpenTelemetry tracing and metrics
│   │   │   ├── __tests__/
│   │   │   ├── tracer.ts
│   │   │   ├── meter.ts
│   │   │   ├── config.ts
│   │   │   ├── json.ts
│   │   │   ├── types.ts
│   │   │   ├── utils.ts
│   │   │   └── index.ts
│   │   │
│   │   ├── tools/                # Tool definitions and types
│   │   │   ├── __tests__/
│   │   │   ├── function-tool.ts
│   │   │   ├── mcp-tool.ts
│   │   │   ├── noop-tool.ts
│   │   │   ├── structured-output-tool.ts
│   │   │   ├── tool-factory.ts
│   │   │   ├── tool.ts
│   │   │   ├── zod-tool.ts
│   │   │   ├── zod-utils.ts
│   │   │   └── types.ts
│   │   │
│   │   ├── types/                # Core type definitions
│   │   │   ├── __tests__/
│   │   │   ├── agent.ts
│   │   │   ├── citations.ts
│   │   │   ├── elicitation.ts
│   │   │   ├── interrupt.ts
│   │   │   ├── json.ts
│   │   │   ├── lifecycle-observer.ts
│   │   │   ├── media.ts
│   │   │   ├── messages.ts
│   │   │   ├── serializable.ts
│   │   │   ├── snapshot.ts
│   │   │   └── validation.ts
│   │   │
│   │   ├── vended-interventions/ # Optional vended intervention handlers
│   │   │   ├── hitl/             # Human-in-the-loop approval handler
│   │   │   │   ├── __tests__/
│   │   │   │   ├── hitl.ts
│   │   │   │   └── index.ts
│   │   │   └── steering/         # Steering handler base + LLM-driven steering
│   │   │       ├── __tests__/
│   │   │       ├── handlers/
│   │   │       │   ├── handler.ts
│   │   │       │   └── llm.ts
│   │   │       ├── providers/
│   │   │       │   ├── context-provider.ts
│   │   │       │   └── tool-ledger.ts
│   │   │       └── index.ts
│   │   │
│   │   ├── vended-plugins/       # Optional vended plugins
│   │   │   ├── index.ts          # Barrel export for all plugins
│   │   │   ├── context-offloader/ # Context offloading plugin
│   │   │   │   ├── __tests__/
│   │   │   │   ├── plugin.ts
│   │   │   │   ├── storage.ts
│   │   │   │   └── index.ts
│   │   │   ├── goal/             # Iterative-refinement plugin (validator-driven retry loop)
│   │   │   │   ├── __tests__/
│   │   │   │   ├── plugin.ts
│   │   │   │   ├── judge.ts      # NL-judge prompt + outcome schema
│   │   │   │   └── index.ts
│   │   │   └── skills/           # AgentSkills plugin
│   │   │       ├── __tests__/
│   │   │       ├── agent-skills.ts
│   │   │       ├── skill.ts
│   │   │       └── index.ts
│   │   │
│   │   ├── vended-tools/         # Optional vended tools
│   │   │   ├── index.ts          # Barrel export for all tools
│   │   │   ├── bash/
│   │   │   ├── file-editor/
│   │   │   ├── http-request/
│   │   │   └── notebook/
│   │   │
│   │   ├── errors.ts             # Custom error classes
│   │   ├── index.ts              # Main SDK entry point
│   │   ├── interrupt.ts          # Interrupt handling
│   │   ├── mcp.ts                # MCP client implementation
│   │   ├── mime.ts               # MIME type utilities
│   │   └── state-store.ts        # State store implementation
│   │
│   ├── generated/                # Auto-generated WIT type declarations
│   │   ├── interfaces/           # Per-interface type definitions
│   │   └── strands:agent.d.ts    # Top-level WIT agent declaration
│   │
│   ├── test/                     # Tests outside of source
│   │   ├── integ/                # Integration tests
│   │   │   ├── __fixtures__/     # Integration test fixtures
│   │   │   ├── __resources__/    # Static resources for integration tests
│   │   │   ├── a2a/
│   │   │   ├── conversation-manager/
│   │   │   ├── goal/
│   │   │   ├── mcp/
│   │   │   ├── models/
│   │   │   │   └── openai/
│   │   │   ├── multiagent/
│   │   │   ├── skills/
│   │   │   ├── tools/
│   │   │   └── agent.test.ts
│   │   └── packages/             # Package compatibility tests (CJS/ESM)
│   │
│   ├── examples/                 # Example applications
│   │   ├── agents-as-tools/
│   │   ├── browser-agent/
│   │   ├── first-agent/
│   │   ├── graph/
│   │   ├── mcp/
│   │   ├── swarm/
│   │   └── telemetry/
│   │
│   ├── package.json              # SDK package config and dependencies
│   ├── tsconfig.base.json        # TypeScript configuration
│   ├── vitest.config.ts          # Testing configuration
│   └── eslint.config.js          # Linting configuration
│
├── strands-wasm/                 # WASM build tooling
│   ├── __fixtures__/             # Vitest module mocks for WIT imports
│   ├── __tests__/                # Unit tests for entry.ts internals
│   ├── generated/                # Auto-generated WIT type declarations
│   │   └── interfaces/           # Per-interface type definitions
│   ├── test/                     # Tests outside of source
│   │   └── guest/                # Tests that load the compiled WASM component
│   ├── docs/                     # WASM-specific documentation
│   ├── patches/                  # Runtime patches for WASM compatibility
│   │   └── getChunkedStream.js
│   ├── entry.ts                  # WASM entry point (TS SDK surface for WASM compilation)
│   ├── build.js                  # Build script for WASM compilation
│   ├── package.json              # WASM package configuration
│   ├── vitest.config.ts          # Test configuration (unit + guest projects)
│   └── tsconfig.json             # TypeScript type-check configuration
│
├── strands-py-wasm/               # Python SDK bindings (WASM-based)
│   ├── strands/                  # Python package source
│   │   ├── _generated/           # Auto-generated type bindings
│   │   ├── agent/                # Agent implementation
│   │   │   └── conversation_manager/
│   │   ├── event_loop/           # Event loop and retry logic
│   │   ├── models/               # Model providers (Bedrock, Anthropic, OpenAI, Gemini)
│   │   ├── multiagent/           # Multi-agent orchestration (Graph, Swarm)
│   │   ├── session/              # Session management (file, S3)
│   │   ├── tools/                # Tool definitions and MCP client
│   │   │   └── mcp/
│   │   ├── types/                # Type definitions
│   │   ├── _conversions.py       # Type conversions between TS and Python
│   │   ├── _wasm_host.py         # WASM host runtime bridge
│   │   ├── hooks.py              # Hooks system
│   │   └── interrupt.py          # Interrupt handling
│   ├── scripts/                  # Build/codegen scripts
│   │   └── generate_types.py     # Type generation from WIT definitions
│   ├── examples/                 # Example applications
│   ├── tests_integ/              # Integration tests
│   ├── pyproject.toml            # Python package configuration
│   └── pyrightconfig.json        # Python type checking configuration
│
├── strandly/                     # Developer CLI tooling
│   ├── scripts/
│   │   └── generate_types.py     # Type generation script
│   ├── src/
│   │   └── cli.ts                # CLI entry point
│   ├── package.json              # Dev CLI package configuration
│   └── tsconfig.json             # TypeScript configuration
│
├── wit/                          # WebAssembly Interface Type definitions
│   ├── deps/                     # WIT dependency interfaces
│   │   ├── clocks/clocks.wit
│   │   └── io/io.wit
│   ├── agent.wit                 # Top-level WIT world definition
│   ├── conversation.wit          # Conversation management interfaces
│   ├── logging.wit               # Logging interfaces
│   ├── mcp.wit                   # MCP protocol interfaces
│   ├── messages.wit              # Message type definitions
│   ├── models.wit                # Model provider interfaces
│   ├── multiagent.wit            # Multi-agent interfaces
│   ├── retry.wit                 # Retry strategy interfaces
│   ├── sessions.wit              # Session management interfaces
│   ├── streaming.wit             # Streaming event interfaces
│   ├── tools.wit                 # Tool interfaces
│   └── vended.wit                # Vended plugin/tool interfaces
│
├── dev-docs/                     # Project documentation
│   ├── TESTING.md                # Comprehensive testing guidelines
│   ├── DEPENDENCIES.md           # Dependency management guidelines
│   ├── DIVERGENCES.md            # Divergences from Python SDK
│   └── PR.md                     # Pull request guidelines and template
│
├── .github/                      # GitHub configuration
│   ├── ISSUE_TEMPLATE/           # Issue templates (bug report, feature request)
│   ├── PULL_REQUEST_TEMPLATE.md  # PR template
│   └── workflows/                # CI/CD workflows
│
├── .husky/                       # Git hooks (pre-commit checks)
│
├── package.json                  # Root workspace config (delegates to strands-ts)
├── .prettierrc                   # Code formatting configuration
├── .gitignore                    # Git ignore rules
│
├── AGENTS.md                     # This file (agent guidance)
├── COMPATIBILITY.MD              # Compatibility documentation
├── CONTRIBUTING.md               # Human contributor guidelines
└── README.md                     # Project overview and usage

Read the full file on GitHub · 1,079 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 1,079 lines · 10,611 tokens per session scan A aeaccd12c5dc

Subscribe to this mod's changes

sdk-typescript AGENTS.md is an instructions file published in the GitHub repository strands-agents/sdk-typescript (693 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 10,611 tokens to every session, about $0.0531 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.