1 view
strands-agents/harness-sdk
Build an agent harness and control it end-to-end. Open-source SDK for production AI agents in Python & TypeScript - any model, any cloud.
Python★ 8,321+455 that day#8 on trending
D53.9/100
Duplication57
7% in python, typescript, astro, tsx, javascript, bash, perlDead code64
4.9%Complexity44
60.2% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.59%duplicated code · 3,224 of 202,823 lines
260clones in code
1,000code files of 2,448 scanned
7.14%duplicated over all files · 3,117 clones
Most complex files
- strands-cli/src/tui/view/setup-wizard/index.tsx955 cx
- strands-cli/src/tui/chat/controller.ts529 cx
- strands-ts/src/models/__tests__/bedrock.test.ts438 cx
- strands-cli/src/tui/view/app.tsx432 cx
- strands-py/src/strands/tools/mcp/mcp_client.py413 cx
- strands-py/tests/strands/models/test_bedrock.py397 cx
- strands-py/src/strands/models/bedrock.py346 cx
- strands-ts/src/models/bedrock.ts339 cx
- strands-ts/src/agent/agent.ts323 cx
- strands-cli/test/tui-chat.test.ts309 cx
Dead code 4.9% unused · 317 findings
- strands-cli/src/tui/view/app.tsxunused-file
- strands-cli/src/tui/view/frog-intro-renderer.tsunused-file
- site/src/content/docs/user-guide/sdk/agents/hooks.tsunused-file
- strands-cli/src/tui/view/chat-view.tsxunused-file
- strands-cli/src/tui/view/panels.tsxunused-file
- strands-cli/src/tui/view/custom-theme-editor.tsxunused-file
- site/src/content/docs/user-guide/sdk/tools/tools.tsunused-file
- strands-cli/src/tui/view/frog-drawing.tsunused-file
- site/src/components/community/CoursesSection.astrounused-file
- strands-cli/src/tui/view/settings-panel.tsxunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 37 lines in 2 placespython462 tokens
921This method implements the conversational interface with multiple input patterns: 922- String input: Simple text input 923- ContentBlock list: Multi-modal content blocks 924- Message list: Complete messages with roles 925- No input: Use existing conversation history 926 927Args: 928 prompt: User input in various formats: 929 - str: Simple text input 930 - list[ContentBlock]: Multi-modal content blocksFirst 10 of 37 lines.
- 36 lines in 2 placespython439 tokens
831- No input: `agent()` - uses existing conversation history 832 833Args: 834 prompt: User input in various formats: 835 - str: Simple text input 836 - list[ContentBlock]: Multi-modal content blocks 837 - list[Message]: Complete messages with roles 838 - None: Use existing conversation history 839 invocation_state: Additional parameters to pass through the event loop. 840 structured_output_model: Pydantic model type(s) for structured output (overrides agent default).First 10 of 36 lines.
- 31 lines in 2 placespython351 tokensstrands-py/src/strands/tools/mcp/mcp_client.py:1022–1052strands-py/src/strands/tools/mcp/mcp_client.py:1087–1117
1022This method automatically uses task-augmented execution when the client 1023opted in via ``tasks_config`` and the server advertises task support (on 1024the mcp 1.x line, the tool's ``taskSupport`` setting is also honored). 1025 1026Args: 1027 tool_use_id: Unique identifier for this tool use 1028 name: Name of the tool to call 1029 arguments: Optional arguments to pass to the tool 1030 read_timeout_seconds: Optional timeout for the tool call. On the mcp 2.x line, the timeout 1031 bounds each request round of a multi round-trip tool call rather than the call as aFirst 10 of 31 lines.
7 more
- 32 lines in 2 placespython250 tokens
- 42 lines in 2 placespython227 tokens
- 13 lines in 3 placespython106 tokens
- 9 lines in 5 placespython51 tokens
- 13 lines in 3 placespython93 tokens
- 36 lines in 2 placespython180 tokens
- 6 lines in 4 placespython60 tokens
Largest clones over all files, tests and data included
- 88 lines in 4 placesjsondocs and examples321 tokenssite/docs/examples/cdk/deploy_to_apprunner/cdk.json:1–88site/docs/examples/cdk/deploy_to_ec2/cdk.json:1–88site/docs/examples/cdk/deploy_to_fargate/cdk.json:1–88site/docs/examples/cdk/deploy_to_lambda/cdk.json:1–88
1{ 2 "app": "npx tsx bin/cdk-app.ts", 3 "watch": { 4 "include": ["**"], 5 "exclude": [ 6 "README.md", 7 "cdk*.json", 8 "**/*.d.ts", 9 "**/*.js", 10 "tsconfig.json",First 10 of 88 lines.
- 170 lines in 2 placestypescripttests739 tokensstrands-ts/src/models/__tests__/bedrock.test.ts:3295–3464strands-ts/src/models/__tests__/bedrock.test.ts:3731–3900
3295 }) 3296 }) 3297}) 3298 3299describe('media blocks in tool results', () => { 3300 const mockConverseStreamCommand = vi.mocked(ConverseStreamCommand) 3301 3302 it('formats image block in tool result', async () => { 3303 const provider = new BedrockModel() 3304 const imageBytes = new Uint8Array([1, 2, 3])First 10 of 170 lines.
- 12 lines in 5 placestypescripttests178 tokensstrands-ts/src/context-manager/strategies/__tests__/offload-strategy.test.ts:346–357strands-ts/src/context-manager/strategies/__tests__/offload-strategy.test.ts:367–378strands-ts/src/context-manager/strategies/__tests__/offload-strategy.test.ts:388–399strands-ts/src/context-manager/strategies/__tests__/offload-strategy.test.ts:558–569strands-ts/src/context-manager/strategies/__tests__/offload-strategy.test.ts:582–593
346it('drop("assistantText") repairs alternation after removing assistant messages', async () => { 347 const messages = [ 348 new Message({ role: 'user', content: [new TextBlock('q1')] }), 349 new Message({ role: 'assistant', content: [new TextBlock('a1')] }), 350 new Message({ role: 'user', content: [new TextBlock('q2')] }), 351 new Message({ role: 'assistant', content: [new TextBlock('a2')] }), 352 new Message({ role: 'user', content: [new TextBlock('q3')] }), 353 new Message({ role: 'assistant', content: [new TextBlock('a3')] }), 354 new Message({ role: 'user', content: [new TextBlock('q4')] }), 355 new Message({ role: 'assistant', content: [new TextBlock('a4')] }),First 10 of 12 lines.
- 6 lines in 9 placestypescripttests87 tokensstrands-ts/src/models/openai/__tests__/chat.test.ts:1437–1442strands-ts/src/models/openai/__tests__/chat.test.ts:1505–1510strands-ts/src/models/openai/__tests__/chat.test.ts:1542–1547strands-ts/src/models/openai/__tests__/chat.test.ts:1580–1585strands-ts/src/models/openai/__tests__/chat.test.ts:1615–1624and 4 more
- 27 lines in 6 placespythondocs and examples126 tokenssite/docs/examples/evals-sdk/coherence_evaluator.py:7–33site/docs/examples/evals-sdk/correctness_evaluator.py:7–32site/docs/examples/evals-sdk/faithfulness_evaluator.py:7–32site/docs/examples/evals-sdk/goal_success_rate_evaluator.py:7–32site/docs/examples/evals-sdk/harmfulness_evaluator.py:7–32and 1 more
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 337 | 78,508 | 182 | 2,337 | 2.98% |
| typescript | 432 | 88,845 | 52 | 649 | 0.73% |
| css | 45 | 5,155 | 15 | 132 | 2.56% |
| html | 48 | 2,117 | 7 | 69 | 3.26% |
| tsx | 33 | 10,342 | 3 | 26 | 0.25% |
| javascript | 40 | 4,130 | 1 | 11 | 0.27% |
| astro | 50 | 12,182 | 0 | 0 | 0% |
| bash | 14 | 1,370 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 962 | 232,681 | 1,610 | 17,897 | 7.69% |
| python | 757 | 234,338 | 1,224 | 16,185 | 6.91% |
| yaml | 210 | 11,062 | 172 | 2,974 | 26.88% |
| markdown | 118 | 22,415 | 53 | 858 | 3.83% |
| json | 53 | 4,108 | 21 | 656 | 15.97% |
| css | 49 | 6,433 | 17 | 156 | 2.42% |
| html | 48 | 2,117 | 7 | 69 | 3.26% |
| javascript | 55 | 5,551 | 5 | 100 | 1.8% |
| tsx | 33 | 10,342 | 3 | 26 | 0.25% |
| markup | 41 | 1,528 | 3 | 40 | 2.62% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 25, 2026 | #8 | 8,321 (+455) | 2,448 | 546,401 | 3,117 | 7.14% | 1.59% | D 53.9 | 7ae759d |
| Sep 24, 2026 | #7 | 7,943 (+115) | 2,448 | 546,494 | 3,117 | 7.13% | 1.59% | D 54.5 | 43b15b7 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.