CompactionControl — anthropic-sdk-python Architecture
Optimization logic to condense conversation history when context limits are reached.
Entity Profile
Dependency Diagram
graph TD subdomain_ToolRunner_CompactionControl["CompactionControl"] c5b7ccd3_986c_50b9_56e3_01c110920e7b["structured_outputs_streaming.py"] subdomain_ToolRunner_CompactionControl --> c5b7ccd3_986c_50b9_56e3_01c110920e7b 23df060f_bcf6_e4d3_ffe2_673407ac2ac8["text_completions_demo_async.py"] subdomain_ToolRunner_CompactionControl --> 23df060f_bcf6_e4d3_ffe2_673407ac2ac8 6f10ce67_ed2e_12f9_5e2a_8fd297fb064e["tools_runner.py"] subdomain_ToolRunner_CompactionControl --> 6f10ce67_ed2e_12f9_5e2a_8fd297fb064e 8b025a10_b10a_25d0_e99c_61ec0b21cab2["bedrock.py"] subdomain_ToolRunner_CompactionControl --> 8b025a10_b10a_25d0_e99c_61ec0b21cab2 42444afa_4607_84c5_69a7_f59c598c7baf["thinking_stream.py"] subdomain_ToolRunner_CompactionControl --> 42444afa_4607_84c5_69a7_f59c598c7baf 35f33edd_3535_2b0b_166b_f860820ac1dd["vertex.py"] subdomain_ToolRunner_CompactionControl --> 35f33edd_3535_2b0b_166b_f860820ac1dd ce60c29e_300b_252b_c967_4ea973cf114e["basic.py"] subdomain_ToolRunner_CompactionControl --> ce60c29e_300b_252b_c967_4ea973cf114e 47a4f214_8882_e893_236d_44dfd3d55fef["batch_results.py"] subdomain_ToolRunner_CompactionControl --> 47a4f214_8882_e893_236d_44dfd3d55fef 7d5dda34_14e3_9301_f390_3b157158ed06["messages_stream.py"] subdomain_ToolRunner_CompactionControl --> 7d5dda34_14e3_9301_f390_3b157158ed06 9888191d_2215_7fb1_9c2b_075451b28a4c["text_completions_streaming.py"] subdomain_ToolRunner_CompactionControl --> 9888191d_2215_7fb1_9c2b_075451b28a4c c68aebda_6f3b_5859_0961_e6373af4da64["tools_stream.py"] subdomain_ToolRunner_CompactionControl --> c68aebda_6f3b_5859_0961_e6373af4da64 70f75ad5_3821_2a66_3467_a533c8764ae2["auto_compaction.py"] subdomain_ToolRunner_CompactionControl --> 70f75ad5_3821_2a66_3467_a533c8764ae2 3547b823_cd4a_1ff4_1115_67a1a607c143["thinking.py"] subdomain_ToolRunner_CompactionControl --> 3547b823_cd4a_1ff4_1115_67a1a607c143 939a9b9a_24c2_d0c6_af07_99994d4e6c8a["web_search.py"] subdomain_ToolRunner_CompactionControl --> 939a9b9a_24c2_d0c6_af07_99994d4e6c8a style subdomain_ToolRunner_CompactionControl fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Domain
Functions
- RuntimeError()
- __aiter__()
- __call__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __iter__()
- __run__()
- __run__()
- _get_description_from_docstring()
- _get_last_message()
- _get_last_message()
- _handle_request()
- _handle_request()
- _spin()
- _validate_path()
- append_messages()
- async_client()
- async_stream()
- asyncio()
- batch_id()
- block()
- call()
- clear_all_memory()
- content_block()
- conversation_loop()
- create()
- curr_msg_count()
- delete()
- done()
- event()
- get_weather()
- insert()
- kw_arguments_schema()
- main()
- main()
- main()
- main()
- main()
- name()
- name()
- print()
- rename()
- rich()
- search()
- start()
- stop()
- str_replace()
- stream_error()
- sync_client()
- sync_stream()
- text()
- thinking()
- to_dict()
- to_dict()
- to_dict()
- view()
Source Files
- examples/auto_compaction.py
- examples/memory/basic.py
- examples/batch_results.py
- examples/bedrock.py
- examples/messages_stream.py
- examples/structured_outputs_streaming.py
- examples/text_completions_demo_async.py
- examples/text_completions_demo_sync.py
- examples/text_completions_streaming.py
- examples/thinking.py
- examples/thinking_stream.py
- examples/tools_runner.py
- examples/tools_stream.py
- examples/vertex.py
- examples/web_search.py
Source
- examples/auto_compaction.py
- examples/memory/basic.py
- examples/batch_results.py
- examples/bedrock.py
- examples/messages_stream.py
- examples/structured_outputs_streaming.py
- examples/text_completions_demo_async.py
- examples/text_completions_demo_sync.py
- examples/text_completions_streaming.py
- examples/thinking.py
- examples/thinking_stream.py
- examples/tools_runner.py
- examples/tools_stream.py
- examples/vertex.py
- examples/web_search.py
Frequently Asked Questions
What is the CompactionControl subdomain?
CompactionControl is a subdomain in the anthropic-sdk-python codebase, part of the ToolRunner domain. Optimization logic to condense conversation history when context limits are reached. It contains 15 source files.
Which domain does CompactionControl belong to?
CompactionControl belongs to the ToolRunner domain.
What functions are in CompactionControl?
The CompactionControl subdomain contains 60 function(s): RuntimeError, __aiter__, __call__, __init__, __init__, __init__, __init__, __init__, and 52 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free